|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AttributeDefinition
This interface provides methods pertaining to an attribute definition within a Spec object. This is known as a SpecNode in Script.
Nested Class Summary | |
---|---|
static class |
AttributeDefinition.Type
Attribute definition types. |
Field Summary | |
---|---|
static java.lang.String |
copyright
|
Method Summary | |
---|---|
AttributeDefinitionProperty |
createProperty(AttributeDefinitionProperty.Name name)
Factory method to create a new property for this attribute |
java.util.List<AttributeDefinition> |
getChildren()
Returns the children of this AttributeDefinition, returns an empty collection if no children are present |
java.util.Collection<java.util.Locale> |
getLocales()
Get locales for this attribute, if it is localized; returns empty collection otherwise. |
AttributeDefinition |
getLocalized(java.util.Locale locale)
Get the localized attribute, according to the locale passed in |
java.lang.String |
getLocalizedName()
Returns the localized name for this AttributeDefinition, based on currently selected Locale for Item and Category data display. |
java.lang.String |
getLocalizedNameforLocale(java.util.Locale locale)
Returns Localized Name for particular Locale. |
java.util.Map<java.util.Locale,java.lang.String> |
getLocalizedNames()
Returns all localized names for each of the selected Locale for the spec. |
int |
getMaxOccurrence()
Returns the value of the MAX_OCCURRENCE attribute of this AttributeDefinition |
int |
getMinOccurrence()
Returns the value of the MIN_OCCURRENCE attribute of this AttributeDefinition |
java.lang.String |
getName()
Returns the name of the AttributeDefinition. |
java.util.Collection<AttributeDefinitionProperty> |
getOptionalProperties()
Retrieve attributes of this AttributeDefinition (optional attributes only) |
AttributeDefinition |
getParent()
Return the parent AttributeDefinition of this AttributeDefinition, if applicable |
java.lang.String |
getPath()
Returns the complete path of this AttributeDefinition in the format SpecName/AttributeDefinitionName |
java.util.Collection<AttributeDefinitionProperty> |
getProperties()
Retrieve attributes of this AttributeDefinition (both required and optional attributes) |
AttributeDefinitionProperty |
getProperty(AttributeDefinitionProperty.Name propertyType)
Get a property of this attribute |
java.util.Collection<AttributeDefinitionProperty> |
getRequiredProperties()
Retrieve attributes of this AttributeDefinition (required attributes only) |
Spec |
getSpec()
Return the Spec to which this AttributeDefinition is associated. |
AttributeDefinition.Type |
getType()
Returns the type of this AttributeDefinition. |
boolean |
isGrouping()
Determine whether this is a Grouping AttributeDefinition |
boolean |
isLeaf()
Determine whether this is a leaf AttributeDefinition |
boolean |
isPrimaryKey()
Determine whether this is a Primary Key attribute |
boolean |
isSpecRoot()
Is this attribute a spec root attribute? |
boolean |
isSubSpecAttribute()
Determine whether this attribute is part of a SubSpec rather than a top level Spec |
Field Detail |
---|
static final java.lang.String copyright
Method Detail |
---|
AttributeDefinition.Type getType()
PIMInternalException
- If an internal error occursjava.util.List<AttributeDefinition> getChildren()
PIMInternalException
- If an internal error occursAttributeDefinition getParent()
PIMInternalException
- If an internal error occursjava.lang.String getName()
PIMInternalException
- If an internal error occursjava.lang.String getLocalizedName()
getName()
getName()
PIMInternalException
- If an internal error occursjava.util.Map<java.util.Locale,java.lang.String> getLocalizedNames()
Locale
and
value=corresponding locale value.
PIMInternalException
- If an internal error occursjava.lang.String getLocalizedNameforLocale(java.util.Locale locale)
locale
- locale for which localized name needs to be retrived
PIMInternalException
- If an internal error occurs
java.lang.IllegalArgumentException
- If null locale is passedjava.lang.String getPath()
PIMInternalException
- If an internal error occursint getMaxOccurrence()
PIMInternalException
- If an internal error occursint getMinOccurrence()
PIMInternalException
- If an internal error occursboolean isGrouping()
PIMInternalException
- If an internal error occursboolean isLeaf()
PIMInternalException
- If an internal error occursboolean isPrimaryKey()
PIMInternalException
- If an internal error occursboolean isSubSpecAttribute()
PIMInternalException
- If an internal error occursjava.util.Collection<AttributeDefinitionProperty> getProperties()
PIMInternalException
- If an internal error occursjava.util.Collection<AttributeDefinitionProperty> getRequiredProperties()
PIMInternalException
- If an internal error occursjava.util.Collection<AttributeDefinitionProperty> getOptionalProperties()
PIMInternalException
- If an internal error occursAttributeDefinitionProperty createProperty(AttributeDefinitionProperty.Name name)
name
- Name of the AttributeDefinition Property
PIMInternalException
- If an internal error occurs
java.lang.IllegalArgumentException
- If null name is passed
PIMAuthorizationException
- Reserved for future useAttributeDefinition getLocalized(java.util.Locale locale)
locale
- locale to which this node needs to be localized
PIMInternalException
- If an internal error occurs
java.lang.IllegalArgumentException
- If the locale passed in is Null or is not part of the
available locales for the companyjava.util.Collection<java.util.Locale> getLocales()
PIMInternalException
- If an internal error occursboolean isSpecRoot()
PIMInternalException
- If an internal error occursSpec getSpec()
PIMInternalException
- If an internal error occursAttributeDefinitionProperty getProperty(AttributeDefinitionProperty.Name propertyType)
propertyType
- One of the attribute enumeration defined in
AttributeDefinitionProperty class
PIMInternalException
- If an internal error occurs
java.lang.IllegalArgumentException
- If null propertyType is passed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |