Package org.apache.catalina.storeconfig
Class StoreAppender
java.lang.Object
org.apache.catalina.storeconfig.StoreAppender
- Direct Known Subclasses:
- CertificateStoreAppender,- ConnectorStoreAppender,- StoreContextAppender
StoreAppends generate really the xml tag elements
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected ObjectcheckAttribute(StoreDescription desc, PropertyDescriptor descriptor, String attributeName, Object bean, Object bean2) Check if the attribute should be printed.defaultInstance(Object bean) Generate default Instance for the specified bean.protected booleanisPersistable(Class<?> clazz) Is the specified property type one for which we should generate a persistence attribute?booleanisPrintValue(Object bean, Object bean2, String attrName, StoreDescription desc) Determine if the attribute value needs to be stored.protected voidprintAttribute(PrintWriter writer, int indent, Object bean, StoreDescription desc, String attributeName, Object bean2, Object value) Store the specified of the specified JavaBean.voidprintAttributes(PrintWriter writer, int indent, boolean include, Object bean, StoreDescription desc) Store the relevant attributes of the specified JavaBean.voidprintAttributes(PrintWriter writer, int indent, Object bean, StoreDescription desc) Store the relevant attributes of the specified JavaBean, plus aclassNameattribute defining the fully qualified Java class name of the bean.voidprintCloseTag(PrintWriter aWriter, StoreDescription aDesc) Print the closing tag.voidprintIndent(PrintWriter aWriter, int indent) Print some spaces.voidprintOpenTag(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) Print only the open tag with all attributes.voidprintTag(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) Print tag with all attributesvoidprintTagArray(PrintWriter aWriter, String tag, int indent, String[] elements) Print an array of elements.voidprintTagContent(PrintWriter aWriter, String tag, String content) Print the value from tag as content.voidprintTagValueArray(PrintWriter aWriter, String tag, int indent, String[] elements) Print an array of values.voidprintValue(PrintWriter writer, int indent, String name, Object value) Print an attribute value.
- 
Constructor Details- 
StoreAppenderpublic StoreAppender()
 
- 
- 
Method Details- 
printCloseTagPrint the closing tag.- Parameters:
- aWriter- The output writer
- aDesc- Store description of the current element
- Throws:
- Exception- A store error occurred
 
- 
printOpenTagpublic void printOpenTag(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) throws Exception Print only the open tag with all attributes.- Parameters:
- aWriter- The output writer
- indent- Indentation level
- bean- The current bean that is stored
- aDesc- Store description of the current element
- Throws:
- Exception- A store error occurred
 
- 
printTagpublic void printTag(PrintWriter aWriter, int indent, Object bean, StoreDescription aDesc) throws Exception Print tag with all attributes- Parameters:
- aWriter- The output writer
- indent- Indentation level
- bean- The current bean that is stored
- aDesc- Store description of the current element
- Throws:
- Exception- A store error occurred
 
- 
printTagContentPrint the value from tag as content.- Parameters:
- aWriter- The output writer
- tag- The element name
- content- Element content
- Throws:
- Exception- A store error occurred
 
- 
printTagValueArrayPrint an array of values.- Parameters:
- aWriter- The output writer
- tag- The element name
- indent- Indentation level
- elements- Array of element values
 
- 
printTagArraypublic void printTagArray(PrintWriter aWriter, String tag, int indent, String[] elements) throws Exception Print an array of elements.- Parameters:
- aWriter- The output writer
- tag- The element name
- indent- Indentation level
- elements- Array of elements
- Throws:
- Exception- Store error occurred
 
- 
printIndentPrint some spaces.- Parameters:
- aWriter- The output writer
- indent- The number of spaces
 
- 
printAttributespublic void printAttributes(PrintWriter writer, int indent, Object bean, StoreDescription desc) throws Exception Store the relevant attributes of the specified JavaBean, plus aclassNameattribute defining the fully qualified Java class name of the bean.- Parameters:
- writer- PrintWriter to which we are storing
- indent- Indentation level
- bean- Bean whose properties are to be rendered as attributes,
- desc- Store description of the current element
- Throws:
- Exception- if an exception occurs while storing
 
- 
printAttributespublic void printAttributes(PrintWriter writer, int indent, boolean include, Object bean, StoreDescription desc) throws Exception Store the relevant attributes of the specified JavaBean.- Parameters:
- writer- PrintWriter to which we are storing
- indent- Indentation level
- include- Should we include a- classNameattribute?
- bean- Bean whose properties are to be rendered as attributes,
- desc- RegistryDescriptor from this bean
- Throws:
- Exception- if an exception occurs while storing
 
- 
checkAttributeprotected Object checkAttribute(StoreDescription desc, PropertyDescriptor descriptor, String attributeName, Object bean, Object bean2) Check if the attribute should be printed.- Parameters:
- desc- RegistryDescriptor from this bean
- descriptor- PropertyDescriptor from this bean property
- attributeName- The attribute name to store
- bean- The current bean
- bean2- A default instance of the bean for comparison
- Returns:
- null if the value should be skipped, the value to print otherwise
 
- 
printAttributeprotected void printAttribute(PrintWriter writer, int indent, Object bean, StoreDescription desc, String attributeName, Object bean2, Object value) Store the specified of the specified JavaBean.- Parameters:
- writer- PrintWriter to which we are storing
- indent- Indentation level
- bean- The current bean
- desc- RegistryDescriptor from this bean
- attributeName- The attribute name to store
- bean2- A default instance of the bean for comparison
- value- The attribute value
 
- 
isPrintValueDetermine if the attribute value needs to be stored.- Parameters:
- bean- original bean
- bean2- default bean
- attrName- attribute name
- desc- StoreDescription from bean
- Returns:
- trueif the value should be stored
 
- 
defaultInstanceGenerate default Instance for the specified bean.- Parameters:
- bean- The bean
- Returns:
- an object from same class as bean parameter
- Throws:
- ReflectiveOperationException- Error creating a new instance
 
- 
printValuePrint an attribute value.- Parameters:
- writer- PrintWriter to which we are storing
- indent- Indentation level
- name- Attribute name
- value- Attribute value
 
- 
isPersistableIs the specified property type one for which we should generate a persistence attribute?- Parameters:
- clazz- Java class to be tested
- Returns:
- trueif the specified class should be stored
 
 
-