Class InitialiserPlugin

  • All Implemented Interfaces:
    org.apache.struts.action.PlugIn

    public class InitialiserPlugin
    extends java.lang.Object
    implements org.apache.struts.action.PlugIn
    Initialiser for the InterMine web application. Anything that needs global initialisation goes here.
    Author:
    Andrew Varley, Thomas Riley
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.List<java.lang.String> PUBLIC_TAG_LIST
      The list of tags that mark something as public
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static void cleanTags​(TagManager tagManager)
      Remove class tags from the user profile that refer to classes that non longer exist
      void destroy()
      Destroy method called at Servlet destroy.
      protected static java.util.Set<java.lang.String> getChildren​(ClassDescriptor cld)
      Get the names of the type of this ClassDescriptor and all its descendants
      protected static void getChildren​(ClassDescriptor cld, java.util.Set<java.lang.String> children)
      Add the names of the descendents of a ClassDescriptor to a Set
      void init​(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig config)
      Init method called at Servlet initialisation
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PUBLIC_TAG_LIST

        public static final java.util.List<java.lang.String> PUBLIC_TAG_LIST
        The list of tags that mark something as public
    • Constructor Detail

      • InitialiserPlugin

        public InitialiserPlugin()
    • Method Detail

      • init

        public void init​(org.apache.struts.action.ActionServlet servlet,
                         org.apache.struts.config.ModuleConfig config)
                  throws javax.servlet.ServletException
        Init method called at Servlet initialisation
        Specified by:
        init in interface org.apache.struts.action.PlugIn
        Parameters:
        servlet - ActionServlet that is managing all the modules in this web application
        config - ModuleConfig for the module with which this plug-in is associated
        Throws:
        javax.servlet.ServletException - if this PlugIn cannot be successfully initialized
      • destroy

        public void destroy()
        Destroy method called at Servlet destroy. Close connection pools and the mail queue thread pool.
        Specified by:
        destroy in interface org.apache.struts.action.PlugIn
      • cleanTags

        protected static void cleanTags​(TagManager tagManager)
        Remove class tags from the user profile that refer to classes that non longer exist
        Parameters:
        tagManager - tag manager
      • getChildren

        protected static java.util.Set<java.lang.String> getChildren​(ClassDescriptor cld)
        Get the names of the type of this ClassDescriptor and all its descendants
        Parameters:
        cld - the ClassDescriptor
        Returns:
        a Set of class names
      • getChildren

        protected static void getChildren​(ClassDescriptor cld,
                                          java.util.Set<java.lang.String> children)
        Add the names of the descendents of a ClassDescriptor to a Set
        Parameters:
        cld - the ClassDescriptor
        children - the Set of child names