Class WAComponent

  • All Implemented Interfaces:
    SilverpeasComponent

    public class WAComponent
    extends AbstractSilverpeasComponent

    WAComponent stands for Web Application Component and it represents an application that is available in Silverpeas and that can be instantiated to a ComponentInst object into collaborative spaces (Space). The instances of these applications can be then accessed by the users in Silverpeas according to their access rights. The access rights are provided by the set of user profiles defined by the application itself; a user profile being a mix between a role and some privileges on the application instance it is applied.

    The Web Application components available in Silverpeas are loaded by the org.silverpeas.core.admin.component.WAComponentRegistry registry from their XML descriptor. They can be the accessed either by the registry itself or by the WAComponent class (it delegates the access to the registry). The XML descriptor of an application component is defined by the following XSD: https://www.silverpeas.org/xsd/component.xsd.

    • Field Detail

      • inheritSpaceRightsByDefault

        protected boolean inheritSpaceRightsByDefault
      • publicByDefault

        protected boolean publicByDefault
      • visible

        protected boolean visible
      • visibleInPersonalSpace

        protected boolean visibleInPersonalSpace
      • portlet

        protected boolean portlet
      • router

        protected String router
    • Constructor Detail

      • WAComponent

        public WAComponent()
    • Method Detail

      • getByName

        public static Optional<WAComponent> getByName​(String componentName)
        Gets the WAComponent object with the specified name.
        Parameters:
        componentName - the unique name of the WAComponent to return.
        Returns:
        optionally a WAComponent instance with the given name.
      • getByInstanceId

        public static Optional<WAComponent> getByInstanceId​(String componentInstanceId)
        Gets the WAComponent object representing the component to which the specified instance is related.
        Parameters:
        componentInstanceId - the unique identifier of a component instance.
        Returns:
        optionally a WAComponent object related to the component instance.
      • getAll

        public static Collection<WAComponent> getAll()
        Gets all the available WAComponent instances.
        Returns:
        a collection of WAComponent instance.
      • getName

        public String getName()
        Gets the value of the name property.
        Returns:
        possible object is String
      • setName

        public void setName​(String value)
        Sets the value of the name property.
        Parameters:
        value - allowed object is String
      • setBehaviors

        public void setBehaviors​(ComponentBehaviors value)
        Sets all the behaviors this component has to satisfy.
        Parameters:
        value - allowed object is ComponentBehaviors
      • putLabel

        public void putLabel​(String language,
                             String label)
        Puts a localized label directly linked to the WAComponent instance.
        Parameters:
        language - the language the label is localized into.
        label - a localized label.
      • putDescription

        public void putDescription​(String language,
                                   String description)
        Puts a localized description directly linked to the WAComponent instance.
        Parameters:
        language - the language the description is localized into.
        description - a localized description.
      • getSuite

        protected Map<String,​String> getSuite()
        Gets the value of the suite property.
        Returns:
        possible object is Multilang
      • putSuite

        public void putSuite​(String language,
                             String suite)
        Puts a localized suite directly linked to the WAComponent instance.
        Parameters:
        language - the language the suite is localized into.
        suite - a localized suite.
      • isInheritSpaceRightsByDefault

        public boolean isInheritSpaceRightsByDefault()
        Gets the value of the inheritSpaceRights property.
      • setInheritSpaceRightsByDefault

        public void setInheritSpaceRightsByDefault​(boolean inheritSpaceRightsByDefault)
        Sets the value of the inheritSpaceRights property.
      • isPublicByDefault

        public boolean isPublicByDefault()
        Gets the value of the publicByDefault property.
      • setPublicByDefault

        public void setPublicByDefault​(boolean publicByDefault)
        Sets the value of the publicByDefault property.
      • isVisible

        public boolean isVisible()
        Gets the value of the visible property.
      • setVisible

        public void setVisible​(boolean value)
        Sets the value of the visible property.
      • isVisibleInPersonalSpace

        public boolean isVisibleInPersonalSpace()
        Gets the value of the visibleInPersonalSpace property.
        Returns:
        possible object is Boolean
      • setVisibleInPersonalSpace

        public void setVisibleInPersonalSpace​(boolean value)
        Sets the value of the visibleInPersonalSpace property.
        Parameters:
        value - allowed object is Boolean
      • isPortlet

        public boolean isPortlet()
        Gets the value of the portlet property.
      • setPortlet

        public void setPortlet​(boolean value)
        Sets the value of the portlet property.
      • getRouter

        public String getRouter()
        Gets the value of the router property.
        Returns:
        possible object is String
      • setRouter

        public void setRouter​(String value)
        Sets the value of the router property.
        Parameters:
        value - allowed object is String
      • getProfiles

        public List<Profile> getProfiles()
        Gets the user profiles defined for this application.
        Returns:
        list of Profile
      • setProfiles

        public void setProfiles​(List<Profile> profiles)
        Sets explicitly a new list of user profiles to this application.
        Parameters:
        profiles - list of Profile
      • getParameters

        public List<Parameter> getParameters()
        Gets all the instance parameters of this application.
        Returns:
        list of Parameter
      • setParameters

        public void setParameters​(List<Parameter> parameters)
        Sets explicitly the instance parameters to this application.
        Parameters:
        parameters - list of Parameter
      • hasParameterDefined

        public boolean hasParameterDefined​(String parameterName)
        Indicates if a parameter is defined which name is equal to the given method parameter.
        Parameters:
        parameterName - the parameter name to perform.
        Returns:
        true if a parameter is defined behind the specified method parameter, false otherwise.
      • getGroupsOfParameters

        public List<GroupOfParameters> getGroupsOfParameters()
        Description copied from interface: SilverpeasComponent
        Gets groups of parameters.
        Returns:
        the list of groups of parameters.
      • isWorkflow

        public boolean isWorkflow()
        Description copied from interface: SilverpeasComponent
        Is this component is a workflow?
        Returns:
        true if this component satisfies the behavior of a workflow, that is to say if it defines a workflow. False if it is a regular Silverpeas. application.
      • isTopicTracker

        public boolean isTopicTracker()
        Description copied from interface: SilverpeasComponent
        Is this component is a topic tracker?
        Returns:
        true if this component satisfies the behavior of a topic tracker.