Class WFRole

  • All Implemented Interfaces:
    java.lang.Comparable

    public class WFRole
    extends java.lang.Object
    implements java.lang.Comparable
    This class represent a Role. A role is a list of members and a list of weighted group.
    Since:
    jcms-4.0.2
    Version:
    $Revision: 72542 $
    Author:
    Olivier Dedieu
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ID_SEPARATOR  
      static java.lang.String REVISION  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String buildRoleUID​(java.lang.String wfId, java.lang.String roleId)
      Build the unique role ID.
      int compareTo​(java.lang.Object o)
      Must be implemented with the interface Comparable Used in different comparator for sorting
      boolean equals​(java.lang.Object obj)  
      java.lang.String getDescription​(java.lang.String lang)
      Returns the localized name of this description according the lang attribute.
      java.util.Map<java.lang.String,​java.lang.String> getDescriptionMap()
      Returns the map of localized description.
      java.lang.String getId()
      Returns the unique id of this role.
      java.lang.String getName​(java.lang.String lang)
      Returns the localized name of this role according the lang attribute.
      java.util.Map<java.lang.String,​java.lang.String> getNameMap()
      Returns the map of localized name.
      java.lang.String getRoleId()
      Returns the roleId of this role.
      java.lang.String getWfId()
      Returns the workflow ID this role belongs to.
      org.jdom.Element getXmlElt()
      Returns the XML Element of this role.
      void reloadI18N()
      Reload all I18N informations for this WFRole.
      void setDescriptionMap​(java.util.Map<java.lang.String,​java.lang.String> descriptionMap)
      Sets the map of localized description.
      void setNameMap​(java.util.Map<java.lang.String,​java.lang.String> nameMap)
      Sets the map of localized name.
      void setRoleId​(java.lang.String roleId)
      Sets the roleId of this role.
      void setWfId​(java.lang.String wfId)
      Sets the workflow ID this role belongs to.
      void setXmlElt​(org.jdom.Element xmlElt)
      Sets the XML Element of this role.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WFRole

        public WFRole()
      • WFRole

        public WFRole​(WFRole other)
      • WFRole

        public WFRole​(WFRole other,
                      boolean clone)
    • Method Detail

      • reloadI18N

        public void reloadI18N()
        Reload all I18N informations for this WFRole. This includes : label and description.
        Since:
        jcms-8.0.2
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • compareTo

        public int compareTo​(java.lang.Object o)
        Must be implemented with the interface Comparable Used in different comparator for sorting
        Specified by:
        compareTo in interface java.lang.Comparable
      • getName

        public java.lang.String getName​(java.lang.String lang)
        Returns the localized name of this role according the lang attribute.
        Parameters:
        lang - the language.
        Returns:
        the localized name of this role.
        Since:
        jcms-5.7.0
      • getDescription

        public java.lang.String getDescription​(java.lang.String lang)
        Returns the localized name of this description according the lang attribute.
        Parameters:
        lang - the language.
        Returns:
        the localized name of this description.
        Since:
        jcms-5.7.0
      • getId

        public java.lang.String getId()
        Returns the unique id of this role.
        Returns:
        the unique id of this role.
        Since:
        jcms-9.0.0
      • buildRoleUID

        public static java.lang.String buildRoleUID​(java.lang.String wfId,
                                                    java.lang.String roleId)
        Build the unique role ID.
        Parameters:
        wfId - the ID of the workflow of the role
        roleId - the ID of the role.
        Returns:
        the unique role ID.
        Since:
        jcms-9.0.0
      • getRoleId

        public java.lang.String getRoleId()
        Returns the roleId of this role. Generally you should targets a role with getId() instead of getRoleId().
        Returns:
        the roleId of this role.
        Since:
        jcms-9.0.0
      • setRoleId

        public void setRoleId​(java.lang.String roleId)
        Sets the roleId of this role.
        Parameters:
        roleId - the roleId.
        Since:
        jcms-9.0.0
      • getNameMap

        public java.util.Map<java.lang.String,​java.lang.String> getNameMap()
        Returns the map of localized name.
        Returns:
        the map of localized name.
        Since:
        jcms-5.7.0
      • setNameMap

        public void setNameMap​(java.util.Map<java.lang.String,​java.lang.String> nameMap)
        Sets the map of localized name.
        Parameters:
        nameMap - the map of localized name.
        Since:
        jcms-5.7.0
      • getDescriptionMap

        public java.util.Map<java.lang.String,​java.lang.String> getDescriptionMap()
        Returns the map of localized description.
        Returns:
        the map of localized description.
        Since:
        jcms-5.7.0
      • setDescriptionMap

        public void setDescriptionMap​(java.util.Map<java.lang.String,​java.lang.String> descriptionMap)
        Sets the map of localized description.
        Parameters:
        descriptionMap - the map of localized description.
        Since:
        jcms-5.7.0
      • getWfId

        public java.lang.String getWfId()
        Returns the workflow ID this role belongs to.
        Returns:
        the workflow ID this role belongs to.
        Since:
        jcms-9.0.0
      • setWfId

        public void setWfId​(java.lang.String wfId)
        Sets the workflow ID this role belongs to.
        Parameters:
        wfId - the workflow ID
        Since:
        jcms-9.0.0
      • getXmlElt

        public org.jdom.Element getXmlElt()
        Returns the XML Element of this role.
        Returns:
        the XML Element of this role.
        Since:
        jcms-9.0.0
      • setXmlElt

        public void setXmlElt​(org.jdom.Element xmlElt)
        Sets the XML Element of this role.
        Parameters:
        xmlElt - XML Element of this role.
        Since:
        jcms-9.0.0
      • equals

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