Package cz.metacentrum.perun.core.api
Class AttributeDefinition
java.lang.Object
cz.metacentrum.perun.core.api.PerunBean
cz.metacentrum.perun.core.api.Auditable
cz.metacentrum.perun.core.api.AttributeDefinition
- All Implemented Interfaces:
Serializable,Comparable<PerunBean>
- Direct Known Subclasses:
Attribute
This class represents definition of attribute. All attributes comes from some definition. Attribute definition is
attribute without connection to some object.
- Author:
- Slavek Licehammer invalid input: '<'glory@ics.muni.cz>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeDefinition(AttributeDefinition attributeDefinition) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidCompares this instance to other instance, throws exception if they are different.intbooleanGet the first part from the friendlyName if the friendlyName contains parameter friendlyName = name:param.Returns name of the entity from the attribute name (urn:perun:[entity]:attribute-def). e.g. member, facility, userReturns parameter of the friendly name, e.g. fiendlyName=name:param.getName()Returns the whole attribute name including namespacegetType()booleaninthashCode()booleanisUnique()voidsetDescription(String description) voidsetDisplayName(String displayName) voidsetFriendlyName(String friendlyName) voidsetNamespace(String namespace) voidvoidsetUnique(boolean unique) voidsetWritable(boolean writable) toString()Methods inherited from class cz.metacentrum.perun.core.api.Auditable
getCreatedAt, getCreatedBy, getCreatedByUid, getModifiedAt, getModifiedBy, getModifiedByUid, setCreatedAt, setCreatedBy, setCreatedByUid, setModifiedAt, setModifiedBy, setModifiedByUidMethods inherited from class cz.metacentrum.perun.core.api.PerunBean
getBeanName, getId, setId
-
Constructor Details
-
AttributeDefinition
public AttributeDefinition() -
AttributeDefinition
Copy constructor. New attribute will be exactly the same as attribute from parameter.- Parameters:
attributeDefinition- attribute to copy
-
-
Method Details
-
checkEquality
Compares this instance to other instance, throws exception if they are different. Used to check that Attribute has correct AttributeDefinition fields.- Parameters:
a- other instance to be checked for equality- Throws:
ConsistencyErrorException- thrown if any of class attributes differ
-
compareTo
- Specified by:
compareToin interfaceComparable<PerunBean>- Overrides:
compareToin classPerunBean
-
equals
-
getBaseFriendlyName
Get the first part from the friendlyName if the friendlyName contains parameter friendlyName = name:param. Otherwise, returns firendlyName. -
getDescription
-
setDescription
-
getDisplayName
-
setDisplayName
-
getEntity
Returns name of the entity from the attribute name (urn:perun:[entity]:attribute-def). e.g. member, facility, user -
getFriendlyName
-
setFriendlyName
-
getFriendlyNameParameter
Returns parameter of the friendly name, e.g. fiendlyName=name:param. -
getName
Returns the whole attribute name including namespace- Returns:
- attribute namespace + friendly name
-
getNamespace
-
setNamespace
-
getType
-
setType
-
getWritable
public boolean getWritable() -
setWritable
public void setWritable(boolean writable) -
hashCode
public int hashCode() -
isUnique
public boolean isUnique() -
setUnique
public void setUnique(boolean unique) -
serializeToString
- Overrides:
serializeToStringin classAuditable
-
toString
-