|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.portal.metadata.AbstractMetadata com.endeca.portal.metadata.MetadataObject com.endeca.portal.metadata.attributes.AttributeSet
public class AttributeSet
Specialization of Metadata Object to represent an attribute set, which consists of a display name and a list of ordered mappings to individual attributes that are associated with the set.
Constructor Summary | |
---|---|
AttributeSet()
Constructor: initializes the object and sets it immediately to be a DF core type |
|
AttributeSet(com.endeca.portal.liferay.ext.metadata.model.MetadataRecord record)
Constructor that initializes the object, assigns a given MetadataRecord to its underlying object, and sets its type The underlying object is not persisted to the database; that must be done explicitly if you want it to be persisted. |
|
AttributeSet(java.lang.String displayName,
java.lang.String locale,
java.lang.String dataSourceId)
Convenience constructor that inits the object and sets a an locale-specific display name property and the data source ID. |
Method Summary | |
---|---|
void |
addAttributeMapping(java.lang.String attributeName)
Maps an attribute to this set |
void |
addAttributeMappings(java.util.List<java.lang.String> attributeNames)
Maps a list of attributes to this set |
java.util.List<AttributeSetMapping> |
getAttributeMappings()
Gets all attribute mapping Metadata Properties for this attribute set object |
AttributeSetDisplayName |
getDisplayName(java.lang.String locale)
Gets the display name Metadata Property associated with this attribute set object for a specified locale |
java.lang.String |
getDisplayNameValue(java.lang.String locale)
Gets the display name for this attribute set object for a specified locale |
java.lang.String |
getDisplayNameValue(java.lang.String requestLocale,
java.lang.String defaultLocale)
Convenience method to return a display name for this attribute set - looks first for a display name for the request locale, then for the container's default locale, then finally uses the key. |
int |
getOrderIndex()
Returns the ordering index of this set within the list of all sets for this datasource. |
java.lang.String |
getType()
Returns "ATTR_SET" |
boolean |
isCatchall()
Indicates whether or not this attribute set is the default "catchall" set. |
void |
removeAttributeMapping(java.lang.String attributeName)
Removes an attribute mapping from this set |
void |
removeAttributeMappings(java.util.List<java.lang.String> attributeNames)
Removes a list of attributes from this set |
void |
replaceAttributeMappings(java.util.List<java.lang.String> attributeMappings)
|
void |
setAttributeMappings(java.util.List<AttributeSetMapping> attributeMappings)
|
void |
setCatchall(boolean isCatchall)
Sets whether or not this attribute set is the default "catchall" set. |
void |
setDisplayName(java.lang.String displayName,
java.lang.String locale)
Sets the display name Metadata Property associated with this attribute set object for a specified locale. |
void |
setOrderIndex(int orderIndex)
Sets the ordering index of this set within the list of all sets for this datasource. |
Methods inherited from class com.endeca.portal.metadata.MetadataObject |
---|
addProperties, addProperty, equals, getProperties, getProperties, getSourceRecord, init, removeAllProperties, removeProperties, removeProperties, removeProperty, setSourceRecord |
Methods inherited from class com.endeca.portal.metadata.AbstractMetadata |
---|
getDescription, getFeature, getKey, getLastUpdated, getLocale, getObjectId, getRel, getSource, getValue, setDescription, setFeature, setKey, setLastUpdated, setLocale, setObjectId, setRel, setSource, setValue, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AttributeSet()
public AttributeSet(com.endeca.portal.liferay.ext.metadata.model.MetadataRecord record)
record
- the source MetadataRecordpublic AttributeSet(java.lang.String displayName, java.lang.String locale, java.lang.String dataSourceId)
AbstractMetadata.setKey(String)
).
displayName
- the name of the attribute set for the specified localelocale
- the locale for the display namedataSourceId
- the data source IDMethod Detail |
---|
public AttributeSetDisplayName getDisplayName(java.lang.String locale)
locale
- the locale
public java.lang.String getDisplayNameValue(java.lang.String locale)
locale
- the locale
public java.lang.String getDisplayNameValue(java.lang.String requestLocale, java.lang.String defaultLocale)
requestLocale
- the request localedefaultLocale
- the default locale
public void setDisplayName(java.lang.String displayName, java.lang.String locale)
displayName
- the display namelocale
- the localepublic java.util.List<AttributeSetMapping> getAttributeMappings()
public void addAttributeMapping(java.lang.String attributeName)
attributeName
- the name of the attribute to add to this setpublic void addAttributeMappings(java.util.List<java.lang.String> attributeNames)
attributeNames
- a list of the attribute names to add to this setpublic void removeAttributeMapping(java.lang.String attributeName)
attributeName
- the name of the attribute to removepublic void removeAttributeMappings(java.util.List<java.lang.String> attributeNames)
attributeNames
- a list of the attribute names to remove from this setpublic void setAttributeMappings(java.util.List<AttributeSetMapping> attributeMappings)
attributeMappings
- public void replaceAttributeMappings(java.util.List<java.lang.String> attributeMappings)
attributeMappings
- public boolean isCatchall()
public void setCatchall(boolean isCatchall)
isCatchall
- true if this is the catchall setpublic int getOrderIndex()
AttributeSetManager.MAX_ORDER_INDEX
public void setOrderIndex(int orderIndex)
orderIndex
- the ordering indexpublic java.lang.String getType()
getType
in interface Metadata
getType
in class MetadataObject
Metadata.getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |