com.evolveum.midpoint.schema.processor
Class ResourceObjectAttributeDefinition

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
All Implemented Interfaces:
Dumpable, java.io.Serializable

public class ResourceObjectAttributeDefinition
extends PropertyDefinition

Resource Object Attribute Definition. Resource Object Attribute is a Property of Resource Object. All that applies to property applies also to attribute, e.g. only a whole attributes can be changed, they may be simple or complex types, they should be representable in XML, etc. In addition, attribute definition may have some annotations that suggest its purpose and use on the Resource. Resource Object Attribute understands resource-specific annotations such as native attribute name. This class represents schema definition for resource object attribute. See Definition for more details.

Author:
Radovan 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, displayName, help, ignored, typeName
 
Constructor Summary
ResourceObjectAttributeDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName typeName)
           
ResourceObjectAttributeDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName defaultName, javax.xml.namespace.QName typeName)
           
 
Method Summary
 java.lang.String getAttributeDisplayName()
           
 java.lang.String getNativeAttributeName()
          Returns native attribute name.
 ResourceObjectAttribute instantiate()
          Create an item instance.
 ResourceObjectAttribute instantiate(javax.xml.namespace.QName name)
          Create an item instance.
 ResourceObjectAttribute instantiate(javax.xml.namespace.QName name, java.lang.Object element)
          Create an item instance.
 boolean isIdentifier(ResourceObjectDefinition objectDefinition)
          Returns true if the attribute is a (primary) identifier.
 void setAttributeDisplayName(java.lang.String attributeDisplayName)
           
 void setNativeAttributeName(java.lang.String nativeAttributeName)
           
 java.lang.String toString()
           
 
Methods inherited from class com.evolveum.midpoint.schema.processor.PropertyDefinition
canCreate, canRead, canUpdate, getAllowedValues, getMaxOccurs, getMinOccurs, getValueType, isMandatory, isMultiValue, isOptional, isSingleValue, parseItem, setCreate, setMaxOccurs, setMinOccurs, setRead, setReadOnly, setUpdate
 
Methods inherited from class com.evolveum.midpoint.schema.processor.ItemDefinition
getName, getNameOrDefaultName
 
Methods inherited from class com.evolveum.midpoint.schema.processor.Definition
dump, dump, getDefaultName, getDisplayName, getHelp, getTypeName, isIgnored, setDisplayName, setHelp, setIgnored
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceObjectAttributeDefinition

public ResourceObjectAttributeDefinition(javax.xml.namespace.QName name,
                                         javax.xml.namespace.QName typeName)

ResourceObjectAttributeDefinition

public ResourceObjectAttributeDefinition(javax.xml.namespace.QName name,
                                         javax.xml.namespace.QName defaultName,
                                         javax.xml.namespace.QName typeName)
Method Detail

instantiate

public ResourceObjectAttribute 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.

Overrides:
instantiate in class PropertyDefinition
Returns:
created item instance

instantiate

public ResourceObjectAttribute 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.

Overrides:
instantiate in class PropertyDefinition
Returns:
created item instance

instantiate

public ResourceObjectAttribute instantiate(javax.xml.namespace.QName name,
                                           java.lang.Object element)
Description copied from class: ItemDefinition
Create an item instance. Definition name will use provided name. for the instance. The instance will contain reference to the element from which it originated.

Overrides:
instantiate in class PropertyDefinition
Returns:
created item instance

isIdentifier

public boolean isIdentifier(ResourceObjectDefinition objectDefinition)
Returns true if the attribute is a (primary) identifier. Convenience method.

Returns:
true if the attribute is a (primary) identifier.

getNativeAttributeName

public java.lang.String getNativeAttributeName()
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.

Returns:
native attribute name

setNativeAttributeName

public void setNativeAttributeName(java.lang.String nativeAttributeName)

getAttributeDisplayName

public java.lang.String getAttributeDisplayName()
Returns:
the attributeDisplayName

setAttributeDisplayName

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

toString

public java.lang.String toString()
Overrides:
toString in class PropertyDefinition


Copyright © 2011 evolveum. All Rights Reserved.