com.evolveum.midpoint.schema.processor
Class ResourceAttributeDefinition

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

public class ResourceAttributeDefinition
extends PrismPropertyDefinition

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.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
ResourceAttributeDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName defaultName, javax.xml.namespace.QName typeName, PrismContext prismContext)
           
 
Method Summary
 ResourceAttributeDefinition clone()
           
protected  void copyDefinitionData(ResourceAttributeDefinition clone)
           
protected  java.lang.String getDebugDumpClassName()
          Return a human readable name of this class suitable for logs.
 java.lang.String getNativeAttributeName()
          Returns native attribute name.
 ResourceAttribute instantiate()
          Create an item instance.
 ResourceAttribute instantiate(javax.xml.namespace.QName name)
          Create an item instance.
 boolean isIdentifier(ObjectClassComplexTypeDefinition objectDefinition)
           
 boolean isIdentifier(ResourceAttributeContainerDefinition objectDefinition)
          Returns true if the attribute is a (primary) identifier.
 boolean isSecondaryIdentifier(ObjectClassComplexTypeDefinition objectDefinition)
           
 void setNativeAttributeName(java.lang.String nativeAttributeName)
           
 java.lang.String toString()
           
 
Methods inherited from class com.evolveum.midpoint.prism.PrismPropertyDefinition
canCreate, canRead, canUpdate, copyDefinitionData, createEmptyDelta, equals, extendToString, getAllowedValues, getValueType, hashCode, isIndexed, setCreate, setIndexed, setRead, setReadOnly, setUpdate
 
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
 
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

ResourceAttributeDefinition

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

instantiate

public ResourceAttribute 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 PrismPropertyDefinition
Returns:
created item instance

instantiate

public ResourceAttribute 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 PrismPropertyDefinition
Returns:
created item instance

isIdentifier

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

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

isIdentifier

public boolean isIdentifier(ObjectClassComplexTypeDefinition objectDefinition)

isSecondaryIdentifier

public boolean isSecondaryIdentifier(ObjectClassComplexTypeDefinition objectDefinition)

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)

clone

public ResourceAttributeDefinition clone()
Overrides:
clone in class PrismPropertyDefinition

copyDefinitionData

protected void copyDefinitionData(ResourceAttributeDefinition clone)

toString

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

getDebugDumpClassName

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

Overrides:
getDebugDumpClassName in class PrismPropertyDefinition


Copyright © 2012 evolveum. All Rights Reserved.