Class ProjectXsltHelper

    • Method Detail

      • project

        public static String project()
        Returns the current project
        Returns:
        the current project
      • projectTitle

        public static String projectTitle()
        Returns the title of the current project
        Returns:
        the title of the current project
      • projectTitle

        public static String projectTitle​(String projectName)
        Returns the title of the given project
        Parameters:
        projectName - The project to consider
        Returns:
        the title of the given project or empty otherwise
      • projectDescription

        public static String projectDescription()
        Returns the description of the current project
        Returns:
        the description of the current project
      • projectDescription

        public static String projectDescription​(String projectName)
        Returns the description of the given project
        Parameters:
        projectName - The project to consider
        Returns:
        the description of the given project or empty otherwise
      • projectCreationDate

        public static String projectCreationDate()
        Returns the creation date of the current project
        Returns:
        the creation date of the current project at the ISO format or empty otherwise
      • projectCreationDate

        public static String projectCreationDate​(String projectName)
        Returns the creation date of the given project
        Parameters:
        projectName - The project to consider
        Returns:
        the creation date of the given project at the ISO format or empty otherwise
      • projectCategoryColor

        public static MapElement projectCategoryColor()
        Return the color associated to the first category associated to the current project
        Returns:
        the hexa code color or the default color if no color is associated to the first category or if not category is associated. <color> <main>#FFFFFF</main> <text>#000000</text> </color>
      • projectCategoryColor

        public static MapElement projectCategoryColor​(String projectName)
        Return the color associated to the first category associated to the given project
        Parameters:
        projectName - The project to consider
        Returns:
        the hexa code color or the default color if no color is associated to the first category or if not category is associated <color> <main>#FFFFFF</main> <text>#000000</text> </color>
      • projectCategoryLabel

        public static String projectCategoryLabel()
        Return the color associated to the first category associated to the current project
        Returns:
        the hexa code color or the default color if no color is associated to the first category or if not category is associated
      • projectCategoryLabel

        public static String projectCategoryLabel​(String projectName)
        Return the color associated to the first category associated to the given project
        Parameters:
        projectName - The project to consider
        Returns:
        the label or empty if no category
      • isResourceFromWorkspace

        public static boolean isResourceFromWorkspace​(String resourceId)
        True if the resource comes from workspaces
        Parameters:
        resourceId - the resource id
        Returns:
        true if the resource comes from workspaces
      • resourceSite

        public static Node resourceSite​(String projectResourceId)
        Get the site of a project's resource
        Parameters:
        projectResourceId - The resource id
        Returns:
        The site <site id="site://xxx" name="siteName"><title>Site's titleX</title><url>http://...</url>/site>
      • canInviteUsersToProject

        public static boolean canInviteUsersToProject​(String projectName,
                                                      String lang)
        Check if the current user is allowed to invite users, and if the invitations are correctly configured
        Parameters:
        projectName - The project name
        lang - The project language
        Returns:
        True if users can be invited