Package org.apache.catalina.storeconfig
Class StoreContextAppender
- java.lang.Object
-
- org.apache.catalina.storeconfig.StoreAppender
-
- org.apache.catalina.storeconfig.StoreContextAppender
-
public class StoreContextAppender extends StoreAppender
store StandardContext Attributes ...
-
-
Constructor Summary
Constructors Constructor Description StoreContextAppender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
defaultInstance(java.lang.Object bean)
Generate a real default StandardContext TODO read and interpret the default context.xml and context.xml.default TODO Cache a Default StandardContext ( with reloading strategy) TODO remove really all elements, but detection is hard...protected java.io.File
getAppBase(StandardHost host)
protected java.lang.String
getDefaultWorkDir(StandardContext context)
Make default Work Dir.protected java.io.File
getDocBase(StandardContext context, java.io.File appBase)
boolean
isPrintValue(java.lang.Object bean, java.lang.Object bean2, java.lang.String attrName, StoreDescription desc)
Print Context Values.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)
Store the specified of the specified JavaBean.-
Methods inherited from class org.apache.catalina.storeconfig.StoreAppender
checkAttribute, isPersistable, printAttributes, printAttributes, printCloseTag, printIndent, printOpenTag, printTag, printTagArray, printTagContent, printTagValueArray, printValue
-
-
-
-
Method Detail
-
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)
Store the specified of the specified JavaBean. Adds special handling fordocBase
.- Overrides:
printAttribute
in classStoreAppender
- Parameters:
writer
- PrintWriter to which we are storingindent
- Indentation levelbean
- The current beandesc
- RegistryDescriptor from this beanattributeName
- The attribute name to storebean2
- A default instance of the bean for comparisonvalue
- The attribute value
-
isPrintValue
public boolean isPrintValue(java.lang.Object bean, java.lang.Object bean2, java.lang.String attrName, StoreDescription desc)
Print Context Values.- Special handling to default workDir.
- Don't save path at external context.xml
- Don't generate docBase for host.appBase webapps
- Overrides:
isPrintValue
in classStoreAppender
- Parameters:
bean
- original beanbean2
- default beanattrName
- attribute namedesc
- StoreDescription from bean- Returns:
true
if the value should be stored- See Also:
StoreAppender.isPrintValue(java.lang.Object, java.lang.Object, java.lang.String, org.apache.catalina.storeconfig.StoreDescription)
-
getAppBase
protected java.io.File getAppBase(StandardHost host)
-
getDocBase
protected java.io.File getDocBase(StandardContext context, java.io.File appBase)
-
getDefaultWorkDir
protected java.lang.String getDefaultWorkDir(StandardContext context)
Make default Work Dir.- Parameters:
context
- The context- Returns:
- The default working directory for the context.
-
defaultInstance
public java.lang.Object defaultInstance(java.lang.Object bean) throws java.lang.ReflectiveOperationException
Generate a real default StandardContext TODO read and interpret the default context.xml and context.xml.default TODO Cache a Default StandardContext ( with reloading strategy) TODO remove really all elements, but detection is hard... To Listener or Valve from same class?- Overrides:
defaultInstance
in classStoreAppender
- Parameters:
bean
- The bean- Returns:
- an object from same class as bean parameter
- Throws:
java.lang.ReflectiveOperationException
- Error creating a new instance- See Also:
StoreAppender.defaultInstance(java.lang.Object)
-
-