Class StoreContextAppender


  • public class StoreContextAppender
    extends StoreAppender
    store StandardContext Attributes ...
    • Constructor Detail

      • StoreContextAppender

        public StoreContextAppender()
    • 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 for docBase.
        Overrides:
        printAttribute in class StoreAppender
        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
      • 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 class StoreAppender
        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)