Interface IClassManager

All Superinterfaces:
IComponent, IComponentProvider, IInitializable, IURIResolver

public interface IClassManager extends IComponentProvider
Manages dynamically deployed classes.
  • Field Details

  • Method Details

    • getClass

      Class<?> getClass(String className) throws ClassNotFoundException
      Returns Class object for the given className. If the class cannot be loaded throws exception.
      Parameters:
      className - the class name
      Returns:
      Class object for this class name or throws exception
      Throws:
      ClassNotFoundException
    • getClassPath

      String getClassPath() throws PortalException
      Returns full class path
      Returns:
      full class path for the application
      Throws:
      PortalException
    • registerClass

      void registerClass(String className, String groupName, byte[] classData) throws PortalException
      Registers class with a given className. The groupName is the name of the class loader instance. Classes with the same groupName are phy meaning they can use instanceof and cast operations
      Parameters:
      className - the class name
      groupName -
      classData -
      Throws:
      PortalException
    • registerClasses

      void registerClasses(Map<String,byte[]> classes, String groupName) throws PortalException
      Throws:
      PortalException
    • unregisterClass

      void unregisterClass(String className) throws PortalException
      Unregisters (deletes) class from the MDS and dynamic classes folder
      Parameters:
      className - the class name to unregister
      Throws:
      PortalException
    • isClassRegistered

      boolean isClassRegistered(String className) throws PortalException
      Checks whether or not the class is registered
      Parameters:
      className - the class name to check
      Returns:
      true if the class is registeed
      Throws:
      PortalException
    • reloadClass

      void reloadClass(String className) throws PortalException
      Reloads class specified by className, this eventually calls reloadClasses(java.lang.String) for whole group
      Parameters:
      className - the class name
      Throws:
      PortalException
    • reloadClasses

      void reloadClasses(String groupName) throws PortalException
      Reloads all classes for the given group.
      Parameters:
      groupName - the class group name
      Throws:
      PortalException
    • setAutoReload

      void setAutoReload(String groupName, boolean enabled) throws PortalException
      Marks classes group as autoreloadable from the 'dynamic classes folder'
      Parameters:
      groupName -
      Throws:
      PortalException
    • getAutoReload

      boolean getAutoReload(String groupName) throws PortalException
      Returns current auto reload status for class group
      Parameters:
      groupName - the class group name
      Returns:
      true if this group checks for auto reload
      Throws:
      PortalException
    • checkForAutoReload

      void checkForAutoReload() throws PortalException
      Throws:
      PortalException
    • getFilePathForClass

      String getFilePathForClass(String className, String contextName)