Interface WorkspaceModule

    • Method Detail

      • getId

        String getId()
        Get the module Id
        Returns:
        The module ID
      • activateModule

        void activateModule​(Project project)
        Activate the module for the project, creating the module pages
        Parameters:
        project - The project
      • initializeSitemap

        void initializeSitemap​(Sitemap sitemap)
        Initialize the sitemap for the module
        Parameters:
        sitemap - The sitemap
      • deactivateModule

        void deactivateModule​(Project project)
        Delete all data related to the module in the project, and the module pages
        Parameters:
        project - The project
      • getAllowedEventTypes

        Set<StringgetAllowedEventTypes()
        Get the set of allowed event type for the module
        Returns:
        The set of allowed event types
      • getModuleRoot

        ModifiableResourceCollection getModuleRoot​(Project project,
                                                   boolean create)
        Get the module root node for the given project
        Parameters:
        project - The project containing the module
        create - True to create the node if it does not exists
        Returns:
        The root node, or null if it does not exists and was not created
      • getModulePages

        AmetysObjectIterable<PagegetModulePages​(Project project,
                                                  String language)
        Retrieves the pages of the module
        Parameters:
        project - The project
        language - the sitemap language or null for all sitemap languages.
        Returns:
        the pages iterator
      • getModuleUrl

        String getModuleUrl​(Project project,
                            String language)
        Get the URL of the first module's page
        Parameters:
        project - The project
        language - the sitemap language. Cannot be null.
        Returns:
        the module url