com.evolveum.midpoint.prism
Class PrismPropertyDefinition

java.lang.Object
  extended by com.evolveum.midpoint.prism.Definition
      extended by com.evolveum.midpoint.prism.ItemDefinition
          extended by com.evolveum.midpoint.prism.PrismPropertyDefinition
All Implemented Interfaces:
DebugDumpable, Dumpable, java.io.Serializable
Direct Known Subclasses:
ResourceAttributeDefinition

public class PrismPropertyDefinition
extends ItemDefinition

Property Definition.

Property is a basic unit of information in midPoint. This class provides definition of property type, multiplicity and so on.

Property is a specific characteristic of an object. It may be considered object "attribute" or "field". For example User has fullName property that contains string value of user's full name.

Properties may be single-valued or multi-valued

Properties may contain primitive types or complex types (defined by XSD schema)

Property values are unordered, implementation may change the order of values

Duplicate values of properties should be silently removed by implementations, but clients must be able tolerate presence of duplicate values.

Operations that modify the objects work with the granularity of properties. They add/remove/replace the values of properties, but do not "see" inside the property.

This class represents schema definition for property. See Definition for more details.

Author:
Radovan Semancik
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.evolveum.midpoint.prism.ItemDefinition
name
 
Fields inherited from class com.evolveum.midpoint.prism.Definition
defaultName, displayName, displayOrder, help, ignored, prismContext, typeName
 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
 
Constructor Summary
PrismPropertyDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName defaultName, javax.xml.namespace.QName typeName, PrismContext prismContext)
           
 
Method Summary
 boolean canCreate()
           
 boolean canRead()
          TODO:
 boolean canUpdate()
          TODO:
 PrismPropertyDefinition clone()
           
protected  void copyDefinitionData(PrismPropertyDefinition clone)
           
 ItemDelta createEmptyDelta(ItemPath path)
           
 boolean equals(java.lang.Object obj)
           
protected  void extendToString(java.lang.StringBuilder sb)
           
 java.lang.Object[] getAllowedValues()
          Returns allowed values for this property.
protected  java.lang.String getDebugDumpClassName()
          Return a human readable name of this class suitable for logs.
 javax.xml.namespace.QName getValueType()
          Returns QName of the property value type.
 int hashCode()
           
 PrismProperty instantiate()
          Create an item instance.
 PrismProperty instantiate(javax.xml.namespace.QName name)
          Create an item instance.
 java.lang.Boolean isIndexed()
          This is XSD annotation that specifies whether a property should be indexed in the storage.
 void setCreate(boolean create)
           
 void setIndexed(java.lang.Boolean indexed)
           
 void setRead(boolean read)
           
 void setReadOnly()
           
 void setUpdate(boolean update)
           
 
Methods inherited from class com.evolveum.midpoint.prism.ItemDefinition
copyDefinitionData, getDefaultName, getMaxOccurs, getMinOccurs, getName, getNameOrDefaultName, getNamespace, isDynamic, isMandatory, isMultiValue, isOptional, isSingleValue, isValidFor, setDynamic, setMaxOccurs, setMinOccurs, setName, toString
 
Methods inherited from class com.evolveum.midpoint.prism.Definition
copyDefinitionData, debugDump, debugDump, dump, getDisplayName, getDisplayOrder, getHelp, getPrismContext, getSchemaRegistry, getTypeClass, getTypeName, isIgnored, setDisplayName, setDisplayOrder, setHelp, setIgnored, setTypeName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrismPropertyDefinition

public PrismPropertyDefinition(javax.xml.namespace.QName name,
                               javax.xml.namespace.QName defaultName,
                               javax.xml.namespace.QName typeName,
                               PrismContext prismContext)
Method Detail

getAllowedValues

public java.lang.Object[] getAllowedValues()
Returns allowed values for this property.

Returns:
Object array. May be null.

canRead

public boolean canRead()
TODO:

Returns:

canUpdate

public boolean canUpdate()
TODO:

Returns:

setReadOnly

public void setReadOnly()

getValueType

public javax.xml.namespace.QName getValueType()
Returns QName of the property value type.

The returned type is either XSD simple type or complex type. It may not be defined in the same schema (especially if it is standard XSD simple type).

Returns:
QName of the property value type

isIndexed

public java.lang.Boolean isIndexed()
This is XSD annotation that specifies whether a property should be indexed in the storage. It can only apply to properties. It has following meaning: true: the property must be indexed. If the storage is not able to index the value, it should indicate an error. false: the property should not be indexed. null: data store decides whether to index the property or not.


setIndexed

public void setIndexed(java.lang.Boolean indexed)

instantiate

public PrismProperty instantiate()
Description copied from class: ItemDefinition
Create an item instance. Definition name or default name will used as an element name for the instance. The instance will otherwise be empty.

Specified by:
instantiate in class ItemDefinition
Returns:
created item instance

instantiate

public PrismProperty instantiate(javax.xml.namespace.QName name)
Description copied from class: ItemDefinition
Create an item instance. Definition name will use provided name. for the instance. The instance will otherwise be empty.

Specified by:
instantiate in class ItemDefinition
Returns:
created item instance

createEmptyDelta

public ItemDelta createEmptyDelta(ItemPath path)
Specified by:
createEmptyDelta in class ItemDefinition

clone

public PrismPropertyDefinition clone()
Specified by:
clone in class ItemDefinition

copyDefinitionData

protected void copyDefinitionData(PrismPropertyDefinition clone)

setRead

public void setRead(boolean read)

setUpdate

public void setUpdate(boolean update)

setCreate

public void setCreate(boolean create)

canCreate

public boolean canCreate()

extendToString

protected void extendToString(java.lang.StringBuilder sb)
Overrides:
extendToString in class ItemDefinition

hashCode

public int hashCode()
Overrides:
hashCode in class ItemDefinition

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class ItemDefinition

getDebugDumpClassName

protected java.lang.String getDebugDumpClassName()
Return a human readable name of this class suitable for logs.

Specified by:
getDebugDumpClassName in class Definition


Copyright © 2012 evolveum. All Rights Reserved.