public class AttributeDescriptionImpl extends java.lang.Object implements AttributeDescription
AttributeDescription
.MAXOCCURS_1, MAXOCCURS_UNBOUNDED, MINOCCURS_0, MINOCCURS_1, TYPE_ANY_SIMPLE_TYPE, TYPE_BOOLEAN, TYPE_DATE, TYPE_DATE_TIME, TYPE_DECIMAL, TYPE_DOUBLE, TYPE_DURATION, TYPE_NUMBER, TYPE_STRING, TYPE_TIME, TYPE_URL
Constructor and Description |
---|
AttributeDescriptionImpl(com.centrasite.jaxr.type.CentraSiteAttribute csAttribute)
Creates an AttributeDescription using the provided CentraSiteAttribute.
|
Modifier and Type | Method and Description |
---|---|
com.centrasite.jaxr.type.CentraSiteAttribute |
getCentraSiteAttribute()
Returns the CentraSite attribute.
|
com.centrasite.jaxr.type.CentraSiteAttribute |
getCsAttribute()
Returns the CentraSiteAttribute object associated with the
AttributeDescription.
|
java.lang.String |
getDataType()
Gets the data type of the attribute.
|
java.lang.Object |
getDefaultValue()
The default value for this attribute.
|
java.lang.String |
getDescription()
Gets the attribute description.
|
java.lang.String |
getDisplayName()
Get the attribute's display name.
|
java.lang.String[] |
getEnumValues()
Retrieves the enumeration values for string attribute.
|
java.lang.String |
getLocalName()
Derive local part from complete name.
|
java.lang.String |
getMaxOccurs()
Returns the maximum occurence.
|
java.lang.String |
getMinOccurs()
Returns the minimum occurence.
|
java.lang.String |
getName()
Get the attribute name.
|
int |
getPrecision()
Get the precision for a "number" attribute.
|
AttributeType |
getType()
Get the attribute type.
|
java.lang.String |
getUnitLabel()
Return this slot's unit label.
|
boolean |
isIndexed()
Checks whether a database index is defined for this attribute.
|
boolean |
isPrefix()
Return whether this slot's unit label is a prefix or suffix value.
|
boolean |
isReadOnly()
Checks whether the attribute value can be edited in an object.
|
boolean |
isSystemDefined()
Tells whether the attribute is system defined or not.
|
boolean |
isUsed()
Checks if this attribute is being used in object instance.
|
void |
setCsAttribute(com.centrasite.jaxr.type.CentraSiteAttribute csAttribute)
Sets the CentraSiteAttribute object associated with the
AttributeDescription.
|
void |
setDefaultValue(java.lang.Object value)
Default value for object properties represented by this attribute.
|
void |
setDescription(java.lang.String description)
Sets the attribute description.
|
void |
setEnumValues(java.lang.String[] enumValues)
Sets the enumeration values for this attribute, in case it is of type
string.
|
void |
setIndexed(boolean indexed)
Sets whether a database index should be defined for this attribute.
|
void |
setMaxOccurs(java.lang.String maxOccurs)
Sets the maximum occurence.
|
void |
setMinOccurs(java.lang.String minOccurs)
Sets the minimum occurence.
|
void |
setName(java.lang.String name)
Set the attribute name.
|
void |
setPrecision(int precision)
Set the precision for a "number" attribute.
|
void |
setPrefix(boolean prefix)
Specify whether this slot's unit label is to be a prefix or suffix value.
|
void |
setReadOnly(boolean readOnly)
Sets whether the attribute value can be edited in an object.
|
void |
setUnitLabel(java.lang.String unitLabel)
Set this slot's unit label.
|
java.lang.String |
toXML()
Return the XML representation of this attribute.
|
public AttributeDescriptionImpl(com.centrasite.jaxr.type.CentraSiteAttribute csAttribute)
csAttribute
- the centraSite attribute.public com.centrasite.jaxr.type.CentraSiteAttribute getCsAttribute()
public void setCsAttribute(com.centrasite.jaxr.type.CentraSiteAttribute csAttribute)
csAttribute
- the CentraSiteAttribute object.public java.lang.String getDataType()
getDataType
in interface AttributeDescription
public java.lang.Object getDefaultValue() throws CSAppFrameworkException
getDefaultValue
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurs.public java.lang.String getDescription() throws CSAppFrameworkException
getDescription
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurspublic java.lang.String[] getEnumValues() throws CSAppFrameworkException
getEnumValues
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurs.public java.lang.String getLocalName() throws CSAppFrameworkException
getLocalName
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurs.public java.lang.String getMaxOccurs() throws CSAppFrameworkException
getMaxOccurs
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurs.public java.lang.String getMinOccurs() throws CSAppFrameworkException
getMinOccurs
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurs.public java.lang.String getName() throws CSAppFrameworkException
getName
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurs.public java.lang.String getDisplayName() throws CSAppFrameworkException
getDisplayName
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurs.public boolean isReadOnly() throws CSAppFrameworkException
isReadOnly
in interface AttributeDescription
true
if the attribute value is editable,
false
otherwise.CSAppFrameworkException
- if an internal error occurs.public boolean isUsed() throws CSAppFrameworkException
isUsed
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurs.public void setDefaultValue(java.lang.Object value) throws java.lang.Exception
setDefaultValue
in interface AttributeDescription
value
- the default value.java.lang.Exception
- if an internal error occurs.public void setDescription(java.lang.String description) throws CSAppFrameworkException
setDescription
in interface AttributeDescription
description
- the attribute description.CSAppFrameworkException
- if an internal error occurs.public void setEnumValues(java.lang.String[] enumValues) throws CSAppFrameworkException
AttributeDescription
setEnumValues
in interface AttributeDescription
enumValues
- the enumeration values for this attributeCSAppFrameworkException
- if an internal error occurs.public void setMaxOccurs(java.lang.String maxOccurs) throws CSAppFrameworkException
setMaxOccurs
in interface AttributeDescription
maxOccurs
- the maximum occurence.CSAppFrameworkException
- if an internal error occurs.public void setMinOccurs(java.lang.String minOccurs) throws CSAppFrameworkException
setMinOccurs
in interface AttributeDescription
minOccurs
- the minimum occurence.CSAppFrameworkException
- if an internal error occurspublic void setName(java.lang.String name) throws CSAppFrameworkException
setName
in interface AttributeDescription
name
- name in the form "{uri}local-name".CSAppFrameworkException
- if an internal error occurs.public void setReadOnly(boolean readOnly) throws CSAppFrameworkException
setReadOnly
in interface AttributeDescription
readOnly
- true
if the attribute is read only.CSAppFrameworkException
- if an internal error occurs.public AttributeType getType()
getType
in interface AttributeDescription
public boolean isIndexed()
AttributeType.SLOT
can be indexed.isIndexed
in interface AttributeDescription
AttributeType.SLOT
and a database index is defined for itpublic void setIndexed(boolean indexed)
AttributeType.SLOT
can be indexed.setIndexed
in interface AttributeDescription
indexed
- true
if database index should be defined.public com.centrasite.jaxr.type.CentraSiteAttribute getCentraSiteAttribute()
public int getPrecision() throws CSAppFrameworkException
AttributeDescription
getPrecision
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurs.public java.lang.String getUnitLabel()
AttributeDescription
getUnitLabel
in interface AttributeDescription
public boolean isPrefix()
AttributeDescription
isPrefix
in interface AttributeDescription
public boolean isSystemDefined() throws CSAppFrameworkException
AttributeDescription
isSystemDefined
in interface AttributeDescription
true
if it is system defined.CSAppFrameworkException
- if an internal error occurs.public void setPrecision(int precision) throws CSAppFrameworkException
AttributeDescription
setPrecision
in interface AttributeDescription
precision
- the precisionCSAppFrameworkException
- if an internal error occurs.public void setPrefix(boolean prefix)
AttributeDescription
setPrefix
in interface AttributeDescription
prefix
- true if the unit label is a prefix, false
for suffix.public void setUnitLabel(java.lang.String unitLabel)
AttributeDescription
setUnitLabel
in interface AttributeDescription
unitLabel
- the unit labelpublic java.lang.String toXML() throws CSAppFrameworkException
AttributeDescription
toXML
in interface AttributeDescription
CSAppFrameworkException
- if an internal error occurs.