Class ToolInstance
- java.lang.Object
-
- org.silverpeas.core.admin.component.model.ToolInstance
-
- All Implemented Interfaces:
Serializable
,SilverpeasComponentInstance
,SilverpeasPersonalComponentInstance
,Identifiable
,Nameable
public class ToolInstance extends Object implements SilverpeasPersonalComponentInstance
- Author:
- silveryocha
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Optional<ToolInstance>
from(String toolId)
Gets the tool instance from an instance identifier.String
getDescription()
Gets the description of the component (from a functional point of view).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 ofDisplayI18NHelper.defaultLanguage
is returned.String
getId()
Gets the unique identifier of the object in Silverpeas.String
getLabel()
Gets the name of the component (from a functional point of view).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 ofDisplayI18NHelper.getDefaultLanguage()
is returned.String
getName()
Gets the component name of the component instance.int
getOrderPosition()
Gets the position index of the component against the others into a space.String
getSpaceId()
Gets the identifier of the space which the component instance belong to.User
getUser()
Gets the user associated to the personal component instance.-
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.SilverpeasComponentInstance
getHighestSilverpeasRolesFor, getParameterValue, isHidden, isPublic, isRemoved, isTopicTracker, isWorkflow
-
Methods inherited from interface org.silverpeas.core.admin.component.model.SilverpeasPersonalComponentInstance
getSilverpeasRolesFor, isPersonal
-
-
-
-
Method Detail
-
from
public static Optional<ToolInstance> from(String toolId)
Gets the tool instance from an instance identifier.- Parameters:
toolId
- identifier of a tool.- Returns:
- optionally an instance of
ToolInstance
.
-
getUser
public User getUser()
Description copied from interface:SilverpeasPersonalComponentInstance
Gets the user associated to the personal component instance.- Specified by:
getUser
in interfaceSilverpeasPersonalComponentInstance
- Returns:
- a
User
instance.
-
getId
public String getId()
Description copied from interface:Identifiable
Gets the unique identifier of the object in Silverpeas. If he's also identified by a local identifier, then this method should return the one global to Silverpeas.- Specified by:
getId
in interfaceIdentifiable
- Returns:
- the identifier encoded as a String. If the identifier is a complex one, that is made up of several identification parts, then the returned representation should take care of such a structure.
-
getSpaceId
public String getSpaceId()
Description copied from interface:SilverpeasComponentInstance
Gets the identifier of the space which the component instance belong to.- Specified by:
getSpaceId
in interfaceSilverpeasComponentInstance
- Returns:
- an identifier as string.
-
getName
public String getName()
Description copied from interface:SilverpeasComponentInstance
Gets the component name of the component instance.- Specified by:
getName
in interfaceNameable
- Specified by:
getName
in interfaceSilverpeasComponentInstance
- Returns:
- the name of the component instance.
-
getLabel
public String getLabel()
Description copied from interface:SilverpeasComponentInstance
Gets the name of the component (from a functional point of view).- Specified by:
getLabel
in interfaceSilverpeasComponentInstance
- Returns:
- the name of the component.
-
getLabel
public String getLabel(String language)
Description copied from interface:SilverpeasComponentInstance
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 ofDisplayI18NHelper.getDefaultLanguage()
is returned.- Specified by:
getLabel
in interfaceSilverpeasComponentInstance
- Returns:
- the translated name of the component.
-
getDescription
public String getDescription()
Description copied from interface:SilverpeasComponentInstance
Gets the description of the component (from a functional point of view).- Specified by:
getDescription
in interfaceNameable
- Specified by:
getDescription
in interfaceSilverpeasComponentInstance
- Returns:
- the description of the component.
-
getDescription
public String getDescription(String language)
Description copied from interface:SilverpeasComponentInstance
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 ofDisplayI18NHelper.defaultLanguage
is returned.- Specified by:
getDescription
in interfaceSilverpeasComponentInstance
- Returns:
- the translated description of the component.
-
getOrderPosition
public int getOrderPosition()
Description copied from interface:SilverpeasComponentInstance
Gets the position index of the component against the others into a space.- Specified by:
getOrderPosition
in interfaceSilverpeasComponentInstance
- Returns:
- a position as int.
-
-