com.evolveum.midpoint.common.refinery
Class RefinedAttributeDefinition

java.lang.Object
  extended by com.evolveum.midpoint.schema.processor.Definition
      extended by com.evolveum.midpoint.schema.processor.ItemDefinition
          extended by com.evolveum.midpoint.schema.processor.PropertyDefinition
              extended by com.evolveum.midpoint.schema.processor.ResourceObjectAttributeDefinition
                  extended by com.evolveum.midpoint.common.refinery.RefinedAttributeDefinition
All Implemented Interfaces:
DebugDumpable, Dumpable, java.io.Serializable

public class RefinedAttributeDefinition
extends ResourceObjectAttributeDefinition
implements Dumpable, DebugDumpable

Author:
semancik
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.evolveum.midpoint.schema.processor.ItemDefinition
name
 
Fields inherited from class com.evolveum.midpoint.schema.processor.Definition
defaultName, help, ignored, typeName
 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
 
Method Summary
 boolean canCreate()
           
 boolean canRead()
          TODO:
 boolean canUpdate()
          TODO:
 java.lang.String debugDump()
          Show the content of the object intended for diagnostics by system administrator.
 java.lang.String debugDump(int indent)
           
 java.lang.String dump()
          Show the content of the object intended for diagnostics by developer.
 java.lang.Object[] getAllowedValues()
          Returns allowed values for this property.
 ResourceObjectAttributeDefinition getAttributeDefinition()
           
 java.lang.String getAttributeDisplayName()
           
 javax.xml.namespace.QName getDefaultName()
          Returns default name for the defined entity.
 java.lang.String getDescription()
           
 java.lang.String getDisplayName()
          Returns display name.
 java.lang.String getHelp()
          Returns help string.
 java.util.List<ValueAssignmentType> getInboundAssignmentTypes()
           
 int getMaxOccurs()
          Return the number of maximal value occurrences.
 int getMinOccurs()
          Return the number of minimal value occurrences.
 javax.xml.namespace.QName getName()
          Returns name of the defined entity.
 java.lang.String getNativeAttributeName()
          Returns native attribute name.
 ValueConstructionType getOutboundValueConstructionType()
           
 javax.xml.namespace.QName getTypeName()
          Returns the name of the definition type.
 javax.xml.namespace.QName getValueType()
          Returns QName of the property value type.
 boolean isIgnored()
           
static boolean isIgnored(ResourceAttributeDefinitionType attrDefType)
           
 boolean isMandatory()
          Returns true if property is mandatory.
 boolean isMultiValue()
          Returns true if property is multi-valued.
 boolean isOptional()
          Returns true if property is optional.
 boolean isSingleValue()
          Returns true if property is single-valued.
 boolean isTolerant()
           
 void setAttributeDefinition(ResourceObjectAttributeDefinition attributeDefinition)
           
 void setAttributeDisplayName(java.lang.String attributeDisplayName)
           
 void setCreate(boolean create)
           
 void setDescription(java.lang.String description)
           
 void setDisplayName(java.lang.String displayName)
           
 void setHelp(java.lang.String help)
           
 void setIgnored(boolean ignored)
           
 void setInboundAssignmentTypes(java.util.List<ValueAssignmentType> inboundAssignmentTypes)
           
 void setMaxOccurs(int maxOccurs)
           
 void setMinOccurs(int minOccurs)
           
 void setNativeAttributeName(java.lang.String nativeAttributeName)
           
 void setOutboundValueConstructionType(ValueConstructionType outboundValueConstructionType)
           
 void setRead(boolean read)
           
 void setReadOnly()
           
 void setTolerant(boolean tolerant)
           
 void setUpdate(boolean update)
           
 
Methods inherited from class com.evolveum.midpoint.schema.processor.ResourceObjectAttributeDefinition
instantiate, instantiate, instantiate, isIdentifier, toString
 
Methods inherited from class com.evolveum.midpoint.schema.processor.PropertyDefinition
equals, hashCode, parseFromValueElement, parseItem, parseItemFromJaxbObject
 
Methods inherited from class com.evolveum.midpoint.schema.processor.ItemDefinition
copyDefinitionData, getNameOrDefaultName, setName
 
Methods inherited from class com.evolveum.midpoint.schema.processor.Definition
copyDefinitionData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

setNativeAttributeName

public void setNativeAttributeName(java.lang.String nativeAttributeName)
Overrides:
setNativeAttributeName in class ResourceObjectAttributeDefinition

getAttributeDisplayName

public java.lang.String getAttributeDisplayName()
Overrides:
getAttributeDisplayName in class ResourceObjectAttributeDefinition
Returns:
the attributeDisplayName

setAttributeDisplayName

public void setAttributeDisplayName(java.lang.String attributeDisplayName)
Overrides:
setAttributeDisplayName in class ResourceObjectAttributeDefinition
Parameters:
attributeDisplayName - the attributeDisplayName to set

isTolerant

public boolean isTolerant()

setTolerant

public void setTolerant(boolean tolerant)

canRead

public boolean canRead()
Description copied from class: PropertyDefinition
TODO:

Overrides:
canRead in class PropertyDefinition
Returns:

canUpdate

public boolean canUpdate()
Description copied from class: PropertyDefinition
TODO:

Overrides:
canUpdate in class PropertyDefinition
Returns:

setReadOnly

public void setReadOnly()
Overrides:
setReadOnly in class PropertyDefinition

getValueType

public javax.xml.namespace.QName getValueType()
Description copied from class: PropertyDefinition
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).

Overrides:
getValueType in class PropertyDefinition
Returns:
QName of the property value type

setMinOccurs

public void setMinOccurs(int minOccurs)
Overrides:
setMinOccurs in class PropertyDefinition

setMaxOccurs

public void setMaxOccurs(int maxOccurs)
Overrides:
setMaxOccurs in class PropertyDefinition

setRead

public void setRead(boolean read)
Overrides:
setRead in class PropertyDefinition

setUpdate

public void setUpdate(boolean update)
Overrides:
setUpdate in class PropertyDefinition

setCreate

public void setCreate(boolean create)
Overrides:
setCreate in class PropertyDefinition

canCreate

public boolean canCreate()
Overrides:
canCreate in class PropertyDefinition

getDefaultName

public javax.xml.namespace.QName getDefaultName()
Description copied from class: Definition
Returns default name for the defined entity. The default name is the name that the entity usually takes, but a name that is not fixed by the schema. The name corresponds to the XML element name in the XML representation of the schema. It does NOT correspond to a XSD type name. For example the default name may be the element name that is usually used for a specific object (e.g. "user"), while the same object may be represented using other names that resolve to the same type. In XML representation it corresponds to "defaultElement" XSD annotation.

Overrides:
getDefaultName in class Definition
Returns:
the defaultName

isIgnored

public boolean isIgnored()
Overrides:
isIgnored in class Definition

setIgnored

public void setIgnored(boolean ignored)
Overrides:
setIgnored in class Definition

setHelp

public void setHelp(java.lang.String help)
Overrides:
setHelp in class Definition

getDisplayName

public java.lang.String getDisplayName()
Description copied from class: Definition
Returns display name. Specifies the printable name of the object class or attribute. It must contain a printable string. It may also contain a key to catalog file. Returns null if no display name is set. Corresponds to "displayName" XSD annotation.

Overrides:
getDisplayName in class Definition
Returns:
display name string or catalog key

setDisplayName

public void setDisplayName(java.lang.String displayName)
Overrides:
setDisplayName in class Definition

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

getAttributeDefinition

public ResourceObjectAttributeDefinition getAttributeDefinition()

setAttributeDefinition

public void setAttributeDefinition(ResourceObjectAttributeDefinition attributeDefinition)

getOutboundValueConstructionType

public ValueConstructionType getOutboundValueConstructionType()

setOutboundValueConstructionType

public void setOutboundValueConstructionType(ValueConstructionType outboundValueConstructionType)

getInboundAssignmentTypes

public java.util.List<ValueAssignmentType> getInboundAssignmentTypes()

setInboundAssignmentTypes

public void setInboundAssignmentTypes(java.util.List<ValueAssignmentType> inboundAssignmentTypes)

getName

public javax.xml.namespace.QName getName()
Description copied from class: ItemDefinition
Returns name of the defined entity. The name is a name of the entity instance if it is fixed by the schema. E.g. it may be a name of the property in the container that cannot be changed. The name corresponds to the XML element name in the XML representation of the schema. It does NOT correspond to a XSD type name. Name is optional. If name is not set the null value is returned. If name is not set the type is "abstract", does not correspond to the element.

Overrides:
getName in class ItemDefinition
Returns:
the name name of the entity or null.

getTypeName

public javax.xml.namespace.QName getTypeName()
Description copied from class: Definition
Returns the name of the definition type. Returns a name of the type for this definition. In XML representation that corresponds to the name of the XSD type.

Overrides:
getTypeName in class Definition
Returns:
the typeName

getNativeAttributeName

public java.lang.String getNativeAttributeName()
Description copied from class: ResourceObjectAttributeDefinition
Returns native attribute name. Native name of the attribute is a name as it is used on the resource or as seen by the connector. It is used for diagnostics purposes and may be used by the connector itself. As the attribute names in XSD have to comply with XML element name limitations, this may be the only way how to determine original attribute name. Returns null if native attribute name is not set or unknown. The name should be the same as the one used by the resource, if the resource supports naming of attributes. E.g. in case of LDAP this annotation should contain "cn", "givenName", etc. If the resource is not that flexible, the native attribute names may be hardcoded (e.g. "username", "homeDirectory") or may not be present at all.

Overrides:
getNativeAttributeName in class ResourceObjectAttributeDefinition
Returns:
native attribute name

getAllowedValues

public java.lang.Object[] getAllowedValues()
Description copied from class: PropertyDefinition
Returns allowed values for this property.

Overrides:
getAllowedValues in class PropertyDefinition
Returns:
Object array. May be null.

getMaxOccurs

public int getMaxOccurs()
Description copied from class: PropertyDefinition
Return the number of maximal value occurrences.

Any negative number means "unbounded".

Overrides:
getMaxOccurs in class PropertyDefinition
Returns:
the maxOccurs

getMinOccurs

public int getMinOccurs()
Description copied from class: PropertyDefinition
Return the number of minimal value occurrences.

Overrides:
getMinOccurs in class PropertyDefinition
Returns:
the minOccurs

isMandatory

public boolean isMandatory()
Description copied from class: PropertyDefinition
Returns true if property is mandatory.

Overrides:
isMandatory in class PropertyDefinition
Returns:
true if property is mandatory.

isMultiValue

public boolean isMultiValue()
Description copied from class: PropertyDefinition
Returns true if property is multi-valued.

Overrides:
isMultiValue in class PropertyDefinition
Returns:
true if property is multi-valued.

isOptional

public boolean isOptional()
Description copied from class: PropertyDefinition
Returns true if property is optional.

Overrides:
isOptional in class PropertyDefinition
Returns:
true if property is optional.

isSingleValue

public boolean isSingleValue()
Description copied from class: PropertyDefinition
Returns true if property is single-valued.

Overrides:
isSingleValue in class PropertyDefinition
Returns:
true if property is single-valued.

getHelp

public java.lang.String getHelp()
Description copied from class: Definition
Returns help string. Specifies the help text or a key to catalog file for a help text. The help text may be displayed in any suitable way by the GUI. It should explain the meaning of an attribute or object class. Returns null if no help string is set. Corresponds to "help" XSD annotation.

Overrides:
getHelp in class Definition
Returns:
help string or catalog key

isIgnored

public static boolean isIgnored(ResourceAttributeDefinitionType attrDefType)

dump

public java.lang.String dump()
Description copied from interface: Dumpable
Show the content of the object intended for diagnostics by developer. The content may be multi-line, in case of hierarchical objects it may be intended. The use of this method may not be efficient. It is not supposed to be used in normal operation. However, it is very useful in tests or in case of dumping objects in severe error situations.

Specified by:
dump in interface Dumpable
Overrides:
dump in class Definition
Returns:
content of the object intended for diagnostics.

debugDump

public java.lang.String debugDump()
Description copied from interface: DebugDumpable
Show the content of the object intended for diagnostics by system administrator. The out put should be suitable to use in system logs at "debug" level. It may be multi-line, but in that case it should be well indented and quite terse. As it is intended to be used by system administrator, it should not use any developer terms such as class names, exceptions or stack traces.

Specified by:
debugDump in interface DebugDumpable
Overrides:
debugDump in class Definition
Returns:
content of the object intended for diagnostics by system administrator.

debugDump

public java.lang.String debugDump(int indent)
Specified by:
debugDump in interface DebugDumpable
Overrides:
debugDump in class Definition


Copyright © 2012 evolveum. All Rights Reserved.