Class Unit

  • All Implemented Interfaces:
    fr.paris.lutece.portal.service.rbac.RBACResource

    public class Unit
    extends java.lang.Object
    implements fr.paris.lutece.portal.service.rbac.RBACResource
    Unit
    • 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
      • getCode

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

        public void setCode​(java.lang.String strCode)
        Set the code
        Parameters:
        strCode - the code
      • getLabel

        public java.lang.String getLabel()
        Get the label
        Returns:
        the label
      • setLabel

        public void setLabel​(java.lang.String strLabel)
        Set the label
        Parameters:
        strLabel - the label
      • getDescription

        public java.lang.String getDescription()
        Get the description
        Returns:
        the description
      • setDescription

        public void setDescription​(java.lang.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​(java.lang.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 java.lang.String getResourceId()
        Specified by:
        getResourceId in interface fr.paris.lutece.portal.service.rbac.RBACResource
      • getResourceTypeCode

        public java.lang.String getResourceTypeCode()
        Specified by:
        getResourceTypeCode in interface fr.paris.lutece.portal.service.rbac.RBACResource
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object