Class Unit
java.lang.Object
fr.paris.lutece.plugins.unittree.business.unit.Unit
- All Implemented Interfaces:
fr.paris.lutece.portal.service.rbac.RBACResource,Serializable
public class Unit
extends Object
implements fr.paris.lutece.portal.service.rbac.RBACResource, Serializable
Unit
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(IUnitAttribute<?> attribute) Add an attributeboolean<T> IUnitAttribute<T>getAttribute(String strKey) Get the attribute from a given keygetCode()Get the codeGet the descriptionintGet the id parentintGet the id unitgetLabel()Get the labelinthashCode()booleanisRoot()Check if the unit is the root unitvoidSet the codevoidsetDescription(String strDescription) Set the descriptionvoidsetIdParent(int nIdParent) Set the id parentvoidsetIdUnit(int nIdUnit) Set the id unitvoidSet the label
-
Field Details
-
RESOURCE_TYPE
- See Also:
-
ID_ROOT
public static final int ID_ROOT- See Also:
-
ID_NULL
public static final int ID_NULL- See Also:
-
-
Constructor Details
-
Unit
public Unit()
-
-
Method Details
-
getIdUnit
public int getIdUnit()Get the id unit- Returns:
- the id unit
-
setIdUnit
public void setIdUnit(int nIdUnit) Set the id unit- Parameters:
nIdUnit- the id unit
-
getCode
Get the code- Returns:
- the code
-
setCode
Set the code- Parameters:
strCode- the code
-
getLabel
Get the label- Returns:
- the label
-
setLabel
Set the label- Parameters:
strLabel- the label
-
getDescription
Get the description- Returns:
- the description
-
setDescription
Set the description- Parameters:
strDescription- the description
-
setIdParent
public void setIdParent(int nIdParent) Set the id parent- Parameters:
nIdParent- the nIdParent to set
-
getIdParent
public int getIdParent()Get the id parent- Returns:
- the nIdParent
-
isRoot
public boolean isRoot()Check if the unit is the root unit- Returns:
- true if the unit is the root unit, false otherwise
-
getAttribute
Get the attribute from a given key- Type Parameters:
T- the class of the attribute- Parameters:
strKey- the key of the attribute- Returns:
- the attribute
-
addAttribute
Add an attribute- Parameters:
attribute- the attribute to add
-
getResourceId
- Specified by:
getResourceIdin interfacefr.paris.lutece.portal.service.rbac.RBACResource
-
getResourceTypeCode
- Specified by:
getResourceTypeCodein interfacefr.paris.lutece.portal.service.rbac.RBACResource
-
hashCode
public int hashCode() -
equals
-