Package com.adobe.aem.dermis.model
Class Property
- java.lang.Object
-
- com.adobe.aem.dermis.model.AbstractAsset
-
- com.adobe.aem.dermis.model.TypedAsset
-
- com.adobe.aem.dermis.model.ConstraintAsset
-
- com.adobe.aem.dermis.model.Property
-
- All Implemented Interfaces:
IAsset,IConstraintAsset,IProperty,ITypeAsset,java.io.Serializable
- Direct Known Subclasses:
RestProperty,SharePointProperty,WSProperty
public class Property extends ConstraintAsset implements IProperty
Represents a property and it's metadata description. Properties reside within a DataModel and can be used as keys for relationships between datamodels.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Property()Property(java.lang.String name, PropertyType type, IDataModel dataModel)Property(java.lang.String name, PropertyType type, IDataModel dataModel, java.lang.Boolean required)Property(java.lang.String name, PropertyType type, IDataModel dataModel, java.lang.Boolean isPrimaryKey, java.lang.Boolean required)Property(java.lang.String name, java.lang.String description, PropertyType type)Property(java.lang.String name, java.lang.String description, PropertyType type, java.lang.String typeRef)Property(java.lang.String title, java.lang.String name, java.lang.String description, PropertyType type, java.lang.String typeRef, PropertyType subType, java.lang.String subTypeRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAssociation(PropertyType associationType, IDataModel dataModel)Add the associated datamodelIDataModelgetAssociatedDataModel()Returns the data model associated with this property either One-To-One or One-To-ManyIDataModelgetChildDataModel()Gets the associated data model.IDataModelgetDataModel()Gets the datamodel for which this property belongjava.lang.Object[]getEnumList()Gets the enum related of this property.java.lang.BooleangetFreeForm()java.lang.StringgetIdentifier()Gets the identifier of this property.java.lang.BooleangetIsPrimaryKey()java.lang.StringgetParameterType()Gets the parameter type of this property.java.util.List<? extends IProperty>getProperties()Gets the properties of this property if property type is Array.java.lang.StringgetReferenceName()Returns the reference entity name.java.lang.BooleangetRequired()Determines whether or not this property accepts null values.IRulegetRules()Returns the rules of the attribute.booleanisArrayOfPrimitive()Returns true, if attribute is array of primitive i.e.booleanisBelowCollection()Return true if property is part of collection entity.booleanisComplexType()Returns true if attribute is of type ARRAY or OBJECT.booleanisComputed()Determines if this property is a computed property.java.lang.BooleanisFreeForm()Determines if this property is of type free form.java.lang.BooleanisMetadataKey()Determines if this property is the metadata key(s) of its datamodel.booleanisNullable()Determines whether or not this property accepts null values.java.lang.BooleanisPrimaryKey()Determines if this property is (one of) the primary key(s) of its datamodel.booleanisPrimitiveType()Returns true if attribute is of primitive type.voidsetChildDataModel(IDataModel childDataModel)Sets the associated data model.voidsetDataModel(IDataModel dataModel)voidsetEnumList(java.lang.Object[] enumList)voidsetFreeForm(java.lang.Boolean freeForm)voidsetIsPrimaryKey(java.lang.Boolean isPrimaryKey)voidsetNullable(boolean nullable)voidsetParameterType(java.lang.String parameterType)voidsetProperties(java.util.List<IProperty> properties)voidsetRequired(java.lang.Boolean required)-
Methods inherited from class com.adobe.aem.dermis.model.ConstraintAsset
getDefaultValue, getExclusiveMaximum, getExclusiveMinimum, getMaximum, getMaxItems, getMaxLength, getMinimum, getMinItems, getMinLength, getPattern, getProtect, getUniqueItems, isReadOnly, setDefaultValue, setExclusiveMaximum, setExclusiveMinimum, setMaximum, setMaxItems, setMaxLength, setMinimum, setMinItems, setMinLength, setPattern, setProtect, setReadOnly, setUniqueItems
-
Methods inherited from class com.adobe.aem.dermis.model.TypedAsset
getFormatType, getMediaBinaryEncoding, getMediaType, getSourceType, getSubType, getSubTypeRef, getSubTypeRefChildKey, getSubTypeRefParentKey, getType, getTypeRef, getTypeRefChildKey, getTypeRefParentKey, setFormatType, setMediaBinaryEncoding, setMediaType, setSourceType, setSubType, setSubTypeRef, setSubTypeRefChildKey, setSubTypeRefParentKey, setType, setTypeRef, setTypeRefChildKey, setTypeRefParentKey
-
Methods inherited from class com.adobe.aem.dermis.model.AbstractAsset
getDescription, getId, getName, getTitle, setDescription, setId, setName, setTitle
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adobe.aem.dermis.model.IAsset
getDescription, getId, getName, getTitle
-
Methods inherited from interface com.adobe.aem.dermis.model.IProperty
getSubTypeRefChildKey, getSubTypeRefParentKey, getTypeRefChildKey, getTypeRefParentKey
-
Methods inherited from interface com.adobe.aem.dermis.model.ITypeAsset
getFormatType, getMediaBinaryEncoding, getMediaType, getSubType, getSubTypeRef, getType, getTypeRef, setFormatType, setSubType, setType
-
-
-
-
Constructor Detail
-
Property
public Property()
-
Property
public Property(java.lang.String name, java.lang.String description, PropertyType type)
-
Property
public Property(java.lang.String name, java.lang.String description, PropertyType type, java.lang.String typeRef)
-
Property
public Property(java.lang.String name, PropertyType type, IDataModel dataModel)
-
Property
public Property(java.lang.String name, PropertyType type, IDataModel dataModel, java.lang.Boolean required)
-
Property
public Property(java.lang.String name, PropertyType type, IDataModel dataModel, java.lang.Boolean isPrimaryKey, java.lang.Boolean required)
-
Property
public Property(java.lang.String title, java.lang.String name, java.lang.String description, PropertyType type, java.lang.String typeRef, PropertyType subType, java.lang.String subTypeRef)
-
-
Method Detail
-
getDataModel
public IDataModel getDataModel()
Gets the datamodel for which this property belong- Specified by:
getDataModelin interfaceIProperty- Returns:
- this property's datamodel.
-
getRequired
public java.lang.Boolean getRequired()
Determines whether or not this property accepts null values.- Specified by:
getRequiredin interfaceIProperty- Returns:
- true if this property except values, false if not and null if not known.
-
isNullable
public boolean isNullable()
Determines whether or not this property accepts null values.- Specified by:
isNullablein interfaceIProperty- Returns:
- true if this property accept null values, false if not.
-
isPrimaryKey
public java.lang.Boolean isPrimaryKey()
Determines if this property is (one of) the primary key(s) of its datamodel.- Specified by:
isPrimaryKeyin interfaceIProperty- Returns:
- true if this property is a primary key, or false if not (or if this is not determinable).
-
isComputed
public boolean isComputed()
Determines if this property is a computed property.- Specified by:
isComputedin interfaceIProperty- Returns:
- true if this property is a computed property, or false if not
-
getChildDataModel
public IDataModel getChildDataModel()
Gets the associated data model.- Specified by:
getChildDataModelin interfaceIProperty- Returns:
- the associated dataModel.
-
getAssociatedDataModel
public IDataModel getAssociatedDataModel()
Returns the data model associated with this property either One-To-One or One-To-Many- Specified by:
getAssociatedDataModelin interfaceIProperty- Returns:
-
setChildDataModel
public void setChildDataModel(IDataModel childDataModel)
Sets the associated data model.- Specified by:
setChildDataModelin interfaceIProperty- Parameters:
childDataModel- the associated dataModel.
-
setRequired
public void setRequired(java.lang.Boolean required)
-
setNullable
public void setNullable(boolean nullable)
-
getIsPrimaryKey
public java.lang.Boolean getIsPrimaryKey()
-
setIsPrimaryKey
public void setIsPrimaryKey(java.lang.Boolean isPrimaryKey)
-
setDataModel
public void setDataModel(IDataModel dataModel)
-
getParameterType
public java.lang.String getParameterType()
Description copied from interface:IPropertyGets the parameter type of this property.- Specified by:
getParameterTypein interfaceIProperty- Returns:
- the parameter type of this property.
-
setParameterType
public void setParameterType(java.lang.String parameterType)
-
getProperties
public java.util.List<? extends IProperty> getProperties()
Gets the properties of this property if property type is Array.- Specified by:
getPropertiesin interfaceIProperty- Returns:
- the list of properties.
-
setProperties
public void setProperties(java.util.List<IProperty> properties)
-
getEnumList
public java.lang.Object[] getEnumList()
Gets the enum related of this property.- Specified by:
getEnumListin interfaceIProperty- Returns:
- the enum related of this property.
-
setEnumList
public void setEnumList(java.lang.Object[] enumList)
-
addAssociation
public void addAssociation(PropertyType associationType, IDataModel dataModel) throws DermisException
Add the associated datamodel- Parameters:
associationType- association type either COLLECTION or OBJECTdataModel- associated data model- Throws:
DermisException
-
getReferenceName
public java.lang.String getReferenceName()
Returns the reference entity name.- Specified by:
getReferenceNamein interfaceIProperty- Returns:
- Returns the reference entity name.
-
getIdentifier
public java.lang.String getIdentifier()
Description copied from interface:IPropertyGets the identifier of this property.- Specified by:
getIdentifierin interfaceIProperty- Returns:
- the identifier of this property.
-
isComplexType
public boolean isComplexType()
Returns true if attribute is of type ARRAY or OBJECT.- Specified by:
isComplexTypein interfaceIProperty- Returns:
- - Returns true if attribute is of type ARRAY or OBJECT.
-
isArrayOfPrimitive
public boolean isArrayOfPrimitive()
Returns true, if attribute is array of primitive i.e.TypedAsset.getType()isPropertyType.ARRAYandTypedAsset.subTypeis primtive- Returns:
- Returns true, if attribute is array of primitives.
-
getRules
public IRule getRules()
Description copied from interface:IPropertyReturns the rules of the attribute.
-
isBelowCollection
public boolean isBelowCollection()
Return true if property is part of collection entity. This property is available only if property is retrieved viaIFormDataModelManager.getEntityPropertyByPath(String, String)- Specified by:
isBelowCollectionin interfaceIProperty- Returns:
- - true, if property is part of collection entity.
-
isPrimitiveType
public boolean isPrimitiveType()
Returns true if attribute is of primitive type.- Specified by:
isPrimitiveTypein interfaceIProperty- Returns:
- - Returns true if attribute is of primitive type.
-
isMetadataKey
public java.lang.Boolean isMetadataKey()
Determines if this property is the metadata key(s) of its datamodel. Metadata specifies, that the particular property will be saved as metadata apart from original data i.e user can query on the basis of properties with metadata enabled.- Specified by:
isMetadataKeyin interfaceIProperty- Returns:
- true if this property is a metadata key, or false if not (or if this is not determinable).
-
isFreeForm
public java.lang.Boolean isFreeForm()
Description copied from interface:IPropertyDetermines if this property is of type free form.- Specified by:
isFreeFormin interfaceIProperty- Returns:
- true if this property is of type free form, or false otherwise.
-
getFreeForm
public java.lang.Boolean getFreeForm()
-
setFreeForm
public void setFreeForm(java.lang.Boolean freeForm)
-
-