public class Unit extends Object implements fr.paris.lutece.portal.service.rbac.RBACResource
Modifier and Type | Field and Description |
---|---|
static int |
ID_NULL |
static int |
ID_ROOT |
static String |
RESOURCE_TYPE |
Constructor and Description |
---|
Unit() |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(IUnitAttribute<?> attribute)
Add an attribute
|
<T> IUnitAttribute<T> |
getAttribute(String strKey)
Get the attribute from a given key
|
String |
getDescription()
Get the description
|
int |
getIdParent()
Get the id parent
|
int |
getIdUnit()
Get the id unit
|
String |
getLabel()
Get the label
|
String |
getResourceId() |
String |
getResourceTypeCode() |
boolean |
isRoot()
Check if the unit is the root unit
|
void |
setDescription(String strDescription)
Set the description
|
void |
setIdParent(int nIdParent)
Set the id parent
|
void |
setIdUnit(int nIdUnit)
Set the id unit
|
void |
setLabel(String strLabel)
Set the label
|
public static final String RESOURCE_TYPE
public static final int ID_ROOT
public static final int ID_NULL
public int getIdUnit()
public void setIdUnit(int nIdUnit)
nIdUnit
- the id unitpublic String getLabel()
public void setLabel(String strLabel)
strLabel
- the labelpublic String getDescription()
public void setDescription(String strDescription)
strDescription
- the descriptionpublic void setIdParent(int nIdParent)
nIdParent
- the nIdParent to setpublic int getIdParent()
public boolean isRoot()
public <T> IUnitAttribute<T> getAttribute(String strKey)
T
- the class of the attributestrKey
- the key of the attributepublic void addAttribute(IUnitAttribute<?> attribute)
attribute
- the attribute to addpublic String getResourceId()
getResourceId
in interface fr.paris.lutece.portal.service.rbac.RBACResource
public String getResourceTypeCode()
getResourceTypeCode
in interface fr.paris.lutece.portal.service.rbac.RBACResource
Copyright © 2017 City of Paris. All rights reserved.