Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.storeconfig
Class StoreAppender

    java.lang.Object
      org.apache.catalina.storeconfig.StoreAppender

Direct Known Subclasses:
  ConnectorStoreAppender, IDynamicPropertyStoreAppender, StoreContextAppender

public class StoreAppender
extends java.lang.Object

StoreAppends generate really the xml tag elements

Author:
  Peter Rossbach

Constructor Summary
`StoreAppender()`

Method Summary
`java.lang.String` | `convertStr(java.lang.String input)` Given a string, this method replaces all occurrences of ' <', '>', '&', and '"'.
`java.lang.Object` | `defaultInstance(java.lang.Object bean)` generate default Instance
`protected boolean` | `isPersistable(java.lang.Class clazz)` Is the specified property type one for which we should generate a persistence attribute?
`boolean` | `isPrintValue(java.lang.Object bean, java.lang.Object bean2, java.lang.String attrName, StoreDescription desc)` print this Attribute value or not
`protected void` | `printAttribute(java.io.PrintWriter writer, int indent, java.lang.Object bean, StoreDescription desc, java.lang.String attributeName, java.lang.Object bean2, java.lang.Object value)`
`void` | `printAttributes(java.io.PrintWriter writer, int indent, boolean include, java.lang.Object bean, StoreDescription desc)` Store the relevant attributes of the specified JavaBean.
`void` | `printAttributes(java.io.PrintWriter writer, int indent, java.lang.Object bean, StoreDescription desc)` Store the relevant attributes of the specified JavaBean, plus a `className` attribute defining the fully qualified Java class name of the bean.
`void` | `printCloseTag(java.io.PrintWriter aWriter, StoreDescription aDesc)` print the closing tag
`void` | `printIndent(java.io.PrintWriter aWriter, int indent)` Print some spaces
`void` | `printOpenTag(java.io.PrintWriter aWriter, int indent, java.lang.Object bean, StoreDescription aDesc)` print only the open tag with all attributes
`void` | `printTag(java.io.PrintWriter aWriter, int indent, java.lang.Object bean, StoreDescription aDesc)` Print tag with all attributes
`void` | `printTagArray(java.io.PrintWriter aWriter, java.lang.String tag, int indent, java.lang.String[] elements)` print a array of elements
`void` | `printTagContent(java.io.PrintWriter aWriter, java.lang.String tag, java.lang.String content)` print the value from tag as content
`void` | `printTagValueArray(java.io.PrintWriter aWriter, java.lang.String tag, int indent, java.lang.String[] elements)` print an array of values
`void` | `printValue(java.io.PrintWriter writer, int indent, java.lang.String name, java.lang.Object value)` print an attribute value

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StoreAppender

    public StoreAppender()

Method Detail

### printCloseTag

    public void printCloseTag(java.io.PrintWriter aWriter,
                              StoreDescription aDesc)
                       throws java.lang.Exception

  print the closing tag

  Parameters:
    `aWriter` -
    `aDesc` -
  Throws:
    `java.lang.Exception`

### printOpenTag

    public void printOpenTag(java.io.PrintWriter aWriter,
                             int indent,
                             java.lang.Object bean,
                             StoreDescription aDesc)
                      throws java.lang.Exception

  print only the open tag with all attributes

  Parameters:
    `aWriter` -
    `indent` -
    `bean` -
    `aDesc` -
  Throws:
    `java.lang.Exception`

### printTag

    public void printTag(java.io.PrintWriter aWriter,
                         int indent,
                         java.lang.Object bean,
                         StoreDescription aDesc)
                  throws java.lang.Exception

  Print tag with all attributes

  Parameters:
    `aWriter` -
    `indent` -
    `bean` -
    `aDesc` -
  Throws:
    `java.lang.Exception`

### printTagContent

    public void printTagContent(java.io.PrintWriter aWriter,
                                java.lang.String tag,
                                java.lang.String content)
                         throws java.lang.Exception

  print the value from tag as content

  Parameters:
    `aWriter` -
    `tag` -
    `content` -
  Throws:
    `java.lang.Exception`

### printTagValueArray

    public void printTagValueArray(java.io.PrintWriter aWriter,
                                   java.lang.String tag,
                                   int indent,
                                   java.lang.String[] elements)

  print an array of values

  Parameters:
    `aWriter` -
    `tag` -
    `indent` -
    `elements` -

### printTagArray

    public void printTagArray(java.io.PrintWriter aWriter,
                              java.lang.String tag,
                              int indent,
                              java.lang.String[] elements)
                       throws java.lang.Exception

  print a array of elements

  Parameters:
    `aWriter` -
    `tag` -
    `indent` -
    `elements` -
  Throws:
    `java.lang.Exception`

### printIndent

    public void printIndent(java.io.PrintWriter aWriter,
                            int indent)

  Print some spaces

  Parameters:
    `aWriter` -
    `indent` - number of spaces

### printAttributes

    public void printAttributes(java.io.PrintWriter writer,
                                int indent,
                                java.lang.Object bean,
                                StoreDescription desc)
                         throws java.lang.Exception

  Store the relevant attributes of the specified JavaBean, plus a `className` attribute defining the fully qualified Java class name of the bean.

  Parameters:
    `writer` - PrintWriter to which we are storing
    `bean` - Bean whose properties are to be rendered as attributes,
  Throws:
    `java.lang.Exception` - if an exception occurs while storing

### printAttributes

    public void printAttributes(java.io.PrintWriter writer,
                                int indent,
                                boolean include,
                                java.lang.Object bean,
                                StoreDescription desc)
                         throws java.lang.Exception

  Store the relevant attributes of the specified JavaBean.

  Parameters:
    `writer` - PrintWriter to which we are storing
    `include` - Should we include a `className` attribute?
    `bean` - Bean whose properties are to be rendered as attributes,
    `desc` - RegistryDescrpitor from this bean
  Throws:
    `java.lang.Exception` - if an exception occurs while storing

### printAttribute

    protected void printAttribute(java.io.PrintWriter writer,
                                  int indent,
                                  java.lang.Object bean,
                                  StoreDescription desc,
                                  java.lang.String attributeName,
                                  java.lang.Object bean2,
                                  java.lang.Object value)

  Parameters:
    `writer` -
    `indent` -
    `bean` -
    `desc` -
    `attributeName` -
    `bean2` -
    `value` -

### isPrintValue

    public boolean isPrintValue(java.lang.Object bean,
                                java.lang.Object bean2,
                                java.lang.String attrName,
                                StoreDescription desc)

  print this Attribute value or not

  Parameters:
    `bean` - orginal bean
    `bean2` - default bean
    `attrName` - attribute name
    `desc` - StoreDescription from bean
  Returns:
    True if it's a printing value

### defaultInstance

    public java.lang.Object defaultInstance(java.lang.Object bean)
                                     throws java.lang.InstantiationException,
                                            java.lang.IllegalAccessException

  generate default Instance

  Parameters:
    `bean` -
  Returns:
    an object from same class as bean parameter
  Throws:
    `java.lang.InstantiationException`
    `java.lang.IllegalAccessException`

### printValue

    public void printValue(java.io.PrintWriter writer,
                           int indent,
                           java.lang.String name,
                           java.lang.Object value)

  print an attribute value

  Parameters:
    `writer` -
    `name` -
    `value` -

### convertStr

    public java.lang.String convertStr(java.lang.String input)

  Given a string, this method replaces all occurrences of ' <', '>', '&', and '"'.

### isPersistable

    protected boolean isPersistable(java.lang.Class clazz)

  Is the specified property type one for which we should generate a persistence attribute?

  Parameters:
    `clazz` - Java class to be tested

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.