Interface SilverpeasComponentInstance

    • Method Detail

      • getComponentName

        static String getComponentName​(String componentInstanceId)
        Gets the name of the Silverpeas component from which the specified instance was spawn.
        Parameters:
        componentInstanceId - the unique identifier of a component instance.
        Returns:
        the name of a component.
      • getSpaceId

        String getSpaceId()
        Gets the identifier of the space which the component instance belong to.
        Returns:
        an identifier as string.
      • getName

        String getName()
        Gets the component name of the component instance.
        Specified by:
        getName in interface Nameable
        Returns:
        the name of the component instance.
      • getLabel

        String getLabel()
        Gets the name of the component (from a functional point of view).
        Returns:
        the name of the component.
      • getLabel

        String getLabel​(String language)
        Gets the translated name of the component according to given language (from a functional point of view).
        If no translation exists for given language, then the one of DisplayI18NHelper.getDefaultLanguage() is returned.
        Returns:
        the translated name of the component.
      • getDescription

        String getDescription()
        Gets the description of the component (from a functional point of view).
        Specified by:
        getDescription in interface Nameable
        Returns:
        the description of the component.
      • getDescription

        String getDescription​(String language)
        Gets the translated description of the component according to given language (from a functional point of view).
        If no translation exists for given language, then the one of DisplayI18NHelper.defaultLanguage is returned.
        Returns:
        the translated description of the component.
      • isPersonal

        default boolean isPersonal()
        Indicates if the component instance is a personal one.
        A personal component instance is linked to a user.
        Returns:
        true if it is a personal one, false otherwise.
      • isPublic

        default boolean isPublic()
        Indicates if the component instance is public.
        Returns:
        true if public, false otherwise.
      • isHidden

        default boolean isHidden()
        Indicates if the component instance is hidden.
        Returns:
        true if hidden, false otherwise.
      • isWorkflow

        default boolean isWorkflow()
        Indicates if the component instance is a workflow one.
        Returns:
        true if it is a workflow, false otherwise.
      • isTopicTracker

        default boolean isTopicTracker()
        Indicates if the component instance is a topic tracker.
        Returns:
        true if it is a topic tracker, false otherwise.
      • isRemoved

        default boolean isRemoved()
        Indicates if the component instance is into a REMOVED state.
        Returns:
        true if into removed state, false otherwise.
      • getOrderPosition

        int getOrderPosition()
        Gets the position index of the component against the others into a space.
        Returns:
        a position as int.
      • getSilverpeasRolesFor

        Collection<SilverpeasRole> getSilverpeasRolesFor​(User user)
        Gets the silverpeas role the given user has on the component instance.
        BE CAREFUL, the manager role is never returned as it corresponds to a space role.
        Parameters:
        user - the user for which the roles are retrieved.
        Returns:
        a list of SilverpeasRole, empty of no roles.
      • getHighestSilverpeasRolesFor

        default SilverpeasRole getHighestSilverpeasRolesFor​(User user)
        Gets the highest silverpeas role the given user has on the component instance.
        BE CAREFUL, the manager role is never returned as it corresponds to a space role.
        Parameters:
        user - the user for which the roles are retrieved.
        Returns:
        a role if any, null otherwise.
      • getParameterValue

        default String getParameterValue​(String parameterName)
        Gets the value of component instance parameter.
        Parameters:
        parameterName - the name of the parameter.
        Returns:
        the value of the parameter, empty string when the parameter does not exist.