java.lang.Object
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 Details

  • 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

      public String getCode()
      Get the code
      Returns:
      the code
    • setCode

      public void setCode(String strCode)
      Set the code
      Parameters:
      strCode - the code
    • 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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object