fr.paris.lutece.plugins.unittree.business.unit
Class Unit

java.lang.Object
  extended by fr.paris.lutece.plugins.unittree.business.unit.Unit
All Implemented Interfaces:
fr.paris.lutece.portal.service.rbac.RBACResource

public class Unit
extends Object
implements fr.paris.lutece.portal.service.rbac.RBACResource

Unit


Field Summary
static int ID_NULL
           
static int ID_ROOT
           
static String RESOURCE_TYPE
           
 
Constructor Summary
Unit()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_TYPE

public static final String RESOURCE_TYPE
See Also:
Constant Field Values

ID_ROOT

public static final int ID_ROOT
See Also:
Constant Field Values

ID_NULL

public static final int ID_NULL
See Also:
Constant Field Values
Constructor Detail

Unit

public Unit()
Method Detail

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

getLabel

public String getLabel()
Get the label

Returns:
the label

setLabel

public void setLabel(String strLabel)
Set the label

Parameters:
strLabel - the label

getDescription

public String getDescription()
Get the description

Returns:
the description

setDescription

public void setDescription(String strDescription)
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

public <T> IUnitAttribute<T> getAttribute(String strKey)
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

public void addAttribute(IUnitAttribute<?> attribute)
Add an attribute

Parameters:
attribute - the attribute to add

getResourceId

public String getResourceId()

Specified by:
getResourceId in interface fr.paris.lutece.portal.service.rbac.RBACResource

getResourceTypeCode

public String getResourceTypeCode()

Specified by:
getResourceTypeCode in interface fr.paris.lutece.portal.service.rbac.RBACResource


Copyright © 2013 Mairie de Paris. All Rights Reserved.