Class AttributeDefinition

All Implemented Interfaces:
Serializable, Comparable<PerunBean>
Direct Known Subclasses:

public class AttributeDefinition extends Auditable implements Comparable<PerunBean>, Serializable
This class represents definition of attribute. All attributes comes from some definition. Attribute definition is attribute without connection to some object.
Slavek Licehammer <>
See Also:
  • Constructor Details

    • AttributeDefinition

      public AttributeDefinition()
    • AttributeDefinition

      public AttributeDefinition(AttributeDefinition attributeDefinition)
      Copy constructor. New attribute will be exactly the same as attribute from parameter.
      attributeDefinition - attribute to copy
  • Method Details

    • checkEquality

      public void checkEquality(AttributeDefinition a)
      Compares this instance to other instance, throws exception if they are different. Used to check that Attribute has correct AttributeDefinition fields.
      a - other instance to be checked for equality
      ConsistencyErrorException - thrown if any of class attributes differ
    • compareTo

      public int compareTo(PerunBean perunBean)
      Specified by:
      compareTo in interface Comparable<PerunBean>
      compareTo in class PerunBean
    • equals

      public boolean equals(Object obj)
      equals in class Auditable
    • getBaseFriendlyName

      public String getBaseFriendlyName()
      Get the first part from the friendlyName if the friendlyName contains parameter friendlyName = name:param. Otherwise, returns firendlyName.
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getDisplayName

      public String getDisplayName()
    • setDisplayName

      public void setDisplayName(String displayName)
    • getEntity

      public String getEntity()
      Returns name of the entity from the attribute name (urn:perun:[entity]:attribute-def). e.g. member, facility, user
    • getFriendlyName

      public String getFriendlyName()
    • setFriendlyName

      public void setFriendlyName(String friendlyName)
    • getFriendlyNameParameter

      public String getFriendlyNameParameter()
      Returns parameter of the friendly name, e.g. fiendlyName=name:param.
    • getName

      public String getName()
      Returns the whole attribute name including namespace
      attribute namespace + friendly name
    • getNamespace

      public String getNamespace()
    • setNamespace

      public void setNamespace(String namespace)
    • getType

      public String getType()
    • setType

      public void setType(String type)
    • getWritable

      public boolean getWritable()
    • setWritable

      public void setWritable(boolean writable)
    • hashCode

      public int hashCode()
      hashCode in class Auditable
    • isUnique

      public boolean isUnique()
    • setUnique

      public void setUnique(boolean unique)
    • serializeToString

      public String serializeToString()
      serializeToString in class Auditable
    • toString

      public String toString()
      toString in class Auditable