Class ThemeRegisterHelper


  • public class ThemeRegisterHelper
    extends java.lang.Object
    Helper that handles theme registration in a module.
    Since:
    7.0.0
    Version:
    $Revision: 18613 $ $Date: 2016-03-30 13:10:58 -0300 (Wed, 30 Mar 2016) $
    • Constructor Detail

      • ThemeRegisterHelper

        public ThemeRegisterHelper​(IModule module,
                                   java.util.Collection<IModule> currentlyInstalledModules,
                                   boolean forceReprocess)
      • ThemeRegisterHelper

        public ThemeRegisterHelper​(IComponent component,
                                   java.util.Collection<IModule> currentlyInstalledModules,
                                   boolean forceReprocess)
    • Method Detail

      • shouldUnregister

        protected boolean shouldUnregister​(SessionConfig sessionConfig,
                                           IDeployObject definition,
                                           ITransaction transaction)
                                    throws PortalException
        Indicates whether a definition item is to be unregistered. This is usually the case if the item is currently registered but does not exist anymore with the changes done in the current deployment.

        This method is called before calling #unregister(SessionConfig, String, ITransaction) to decide which items will be unregistered.

        Parameters:
        sessionConfig - user session information.
        transaction - transaction for persistence access.
        Returns:
        true if the item is to be unregistered, false otherwise.
        Throws:
        PortalException
      • registerModuleDefinitions

        public void registerModuleDefinitions()
                                       throws PortalException
        Register the definitions in a module.
        Parameters:
        module - the module.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        7.1.0
      • findModuleObjects

        protected java.util.Collection<IDeployObject> findModuleObjects​(Module module,
                                                                        IDeployObject.ObjectType objectType,
                                                                        java.util.EnumSet<IDeployObject.ObjectType> allowedInnerObjects)
        Finds the objects of the given type in the given module.
        Parameters:
        module - the module.
        objectType - the object type.
        allowedInnerObjects - the allowed inner object types.
        Returns:
        the found objects.
        Since:
        8.1.0
      • registerComponentDefinitions

        public void registerComponentDefinitions​(IComponent component)
                                          throws PortalException
        Register the definitions in a component.
        Parameters:
        component - the component.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        7.1.0
      • findComponentDefinitions

        protected java.util.Collection<IDeployObject> findComponentDefinitions​(IComponent component,
                                                                               java.util.EnumSet<IDeployObject.ObjectType> allowedInnerObjects)
        Finds objects in the given component.
        Parameters:
        component - the component.
        allowedInnerObjects - the allowed inner object types.
        Returns:
        the found objects.
        Since:
        8.1.0
      • unregisterModuleDefinitions

        public void unregisterModuleDefinitions()
                                         throws PortalException
        Unregister the definitions in a module.
        Parameters:
        module - the module.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        7.1.0
      • unregisterComponentDefinitions

        public void unregisterComponentDefinitions​(IComponent component)
                                            throws PortalException
        Unregister the definitions in a component.
        Parameters:
        component - the component.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        7.1.0