Class WAComponent
- java.lang.Object
-
- org.silverpeas.core.admin.component.model.AbstractSilverpeasComponent
-
- org.silverpeas.core.admin.component.model.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 Summary
Fields Modifier and Type Field Description protected ComponentBehaviors
behaviors
protected Map<String,String>
description
protected List<GroupOfParameters>
groupsOfParameters
protected boolean
inheritSpaceRightsByDefault
protected Map<String,String>
label
protected String
name
protected List<Parameter>
parameters
protected boolean
portlet
protected List<Profile>
profiles
protected boolean
publicByDefault
protected String
router
protected Map<String,String>
suite
protected boolean
visible
protected boolean
visibleInPersonalSpace
-
Fields inherited from class org.silverpeas.core.admin.component.model.AbstractSilverpeasComponent
indexedParametersByName
-
-
Constructor Summary
Constructors Constructor Description WAComponent()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Collection<WAComponent>
getAll()
Gets all the available WAComponent instances.ComponentBehaviors
getBehaviors()
Gets the different behaviors this component satisfies.static Optional<WAComponent>
getByInstanceId(String componentInstanceId)
Gets the WAComponent object representing the component to which the specified instance is related.static Optional<WAComponent>
getByName(String componentName)
Gets the WAComponent object with the specified name.protected Map<String,String>
getDescription()
Gets the value of the description property.List<GroupOfParameters>
getGroupsOfParameters()
Gets groups of parameters.protected Map<String,String>
getLabel()
Gets the value of the label property.String
getName()
Gets the value of the name property.List<Parameter>
getParameters()
Gets all the instance parameters of this application.Profile
getProfile(String name)
List<Profile>
getProfiles()
Gets the user profiles defined for this application.String
getRouter()
Gets the value of the router property.protected Map<String,String>
getSuite()
Gets the value of the suite property.boolean
hasParameterDefined(String parameterName)
Indicates if a parameter is defined which name is equal to the given method parameter.boolean
isInheritSpaceRightsByDefault()
Gets the value of the inheritSpaceRights property.boolean
isPortlet()
Gets the value of the portlet property.boolean
isPublicByDefault()
Gets the value of the publicByDefault property.boolean
isTopicTracker()
Is this component is a topic tracker?boolean
isVisible()
Gets the value of the visible property.boolean
isVisibleInPersonalSpace()
Gets the value of the visibleInPersonalSpace property.boolean
isWorkflow()
Is this component is a workflow?void
putDescription(String language, String description)
Puts a localized description directly linked to theWAComponent
instance.void
putLabel(String language, String label)
Puts a localized label directly linked to theWAComponent
instance.void
putSuite(String language, String suite)
Puts a localized suite directly linked to theWAComponent
instance.void
setBehaviors(ComponentBehaviors value)
Sets all the behaviors this component has to satisfy.void
setInheritSpaceRightsByDefault(boolean inheritSpaceRightsByDefault)
Sets the value of the inheritSpaceRights property.void
setName(String value)
Sets the value of the name property.void
setParameters(List<Parameter> parameters)
Sets explicitly the instance parameters to this application.void
setPortlet(boolean value)
Sets the value of the portlet property.void
setProfiles(List<Profile> profiles)
Sets explicitly a new list of user profiles to this application.void
setPublicByDefault(boolean publicByDefault)
Sets the value of the publicByDefault property.void
setRouter(String value)
Sets the value of the router property.void
setVisible(boolean value)
Sets the value of the visible property.void
setVisibleInPersonalSpace(boolean value)
Sets the value of the visibleInPersonalSpace property.-
Methods inherited from class org.silverpeas.core.admin.component.model.AbstractSilverpeasComponent
getDescription, getIndexedParametersByName, getLabel, getSortedGroupsOfParameters, getSortedParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.admin.component.model.SilverpeasComponent
getAllParameters, isPersonal
-
-
-
-
Field Detail
-
name
protected String name
-
behaviors
protected ComponentBehaviors behaviors
-
inheritSpaceRightsByDefault
protected boolean inheritSpaceRightsByDefault
-
publicByDefault
protected boolean publicByDefault
-
visible
protected boolean visible
-
visibleInPersonalSpace
protected boolean visibleInPersonalSpace
-
portlet
protected boolean portlet
-
router
protected String router
-
groupsOfParameters
protected List<GroupOfParameters> groupsOfParameters
-
-
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 isString
-
getBehaviors
public ComponentBehaviors getBehaviors()
Gets the different behaviors this component satisfies.- Returns:
- possible object is
ComponentBehaviors
-
setBehaviors
public void setBehaviors(ComponentBehaviors value)
Sets all the behaviors this component has to satisfy.- Parameters:
value
- allowed object isComponentBehaviors
-
getLabel
protected Map<String,String> getLabel()
Gets the value of the label property.- Specified by:
getLabel
in classAbstractSilverpeasComponent
- Returns:
- possible object is
Multilang
-
putLabel
public void putLabel(String language, String label)
Puts a localized label directly linked to theWAComponent
instance.- Parameters:
language
- the language the label is localized into.label
- a localized label.
-
getDescription
protected Map<String,String> getDescription()
Gets the value of the description property.- Specified by:
getDescription
in classAbstractSilverpeasComponent
- Returns:
- possible object is
Multilang
-
putDescription
public void putDescription(String language, String description)
Puts a localized description directly linked to theWAComponent
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 theWAComponent
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 isBoolean
-
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 isString
-
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 ofProfile
-
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 ofParameter
-
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.
-
-