Interface I_CmsModuleAction

    • Method Detail

      • initialize

        void initialize​(CmsObject adminCms,
                        CmsConfigurationManager configurationManager,
                        CmsModule module)
        Will be called by the OpenCms system during server startup.

        If a module requires special initialization code, this is a good place to to implement this functions.

        Moreover, if the module requires special "one time" setup code, this should also be implemented here. For example if the module requires special DB tables to be created, you should implement a check if theses tables exist in this method, and if they don't exist create them as needed.

        Parameters:
        adminCms - an initialized CmsObject with "Admin" permissions
        configurationManager - the initialized OpenCms configuration manager
        module - the module of this action instance
      • moduleUninstall

        void moduleUninstall​(CmsModule module)
        Will be called if a module is uninstalled from an OpenCms system.

        If you require special code to be executed if a module is uninstalled, implement it in this function.

        Please note that there is no install() method. This is because the class loader will not have the module class instance available after module installation/upload. If you need to execute setup/install code, do this in the initialize(CmsObject, CmsConfigurationManager, CmsModule) method during the next server startup.

        This method is not called if the module this action instance belongs to is "replaced". In this case moduleUpdate(CmsModule) is called after the new version of the module is installed.

        Parameters:
        module - the module of this action instance
        See Also:
        initialize(CmsObject, CmsConfigurationManager, CmsModule)
      • moduleUpdate

        void moduleUpdate​(CmsModule module)
        Will be called if the module this action instance belongs to is updated.

        Parameters:
        module - the module of this action instance with the updated values
      • publishProject

        void publishProject​(CmsObject cms,
                            CmsPublishList publishList,
                            int publishTag,
                            I_CmsReport report)
        Will be called during a the publish process after the resources have been published, but before the publish event is fired.

        If you require special code to be executed after a resource is published, implement it in this function any analyze the publish list for "interesting" resources.

        Parameters:
        cms - the user context the publish was executed with
        publishList - the list of published resources
        publishTag - the publish tag
        report - the report to write messages to
      • shutDown

        void shutDown​(CmsModule module)
        Will be called by the OpenCms system during server shutdown.

        If a module requires special "clean up" functions, for example removing temporary files, this is a good place to implement this functions.

        Parameters:
        module - the module of this action instance