com.evolveum.midpoint.common.refinery
Class RefinedAccountDefinition

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.PropertyContainerDefinition
              extended by com.evolveum.midpoint.schema.processor.ResourceObjectDefinition
                  extended by com.evolveum.midpoint.common.refinery.RefinedAccountDefinition
All Implemented Interfaces:
DebugDumpable, Dumpable, java.io.Serializable

public class RefinedAccountDefinition
extends ResourceObjectDefinition
implements Dumpable, DebugDumpable

Author:
semancik
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.evolveum.midpoint.schema.processor.PropertyContainerDefinition
complexTypeDefinition, isRuntimeSchema, schema
 
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
 void add(RefinedAttributeDefinition refinedAttributeDefinition)
           
 RefinedAccountDefinition clone()
          Shallow clone
 boolean containsAttributeDefinition(javax.xml.namespace.QName attributeName)
           
protected  void copyDefinitionData(RefinedAccountDefinition clone)
           
 ResourceObjectAttributeDefinition createAttributeDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName typeName)
           
 ResourceObjectAttributeDefinition createAttributeDefinition(java.lang.String localName, javax.xml.namespace.QName typeName)
           
 ResourceObjectAttributeDefinition createAttributeDefinition(java.lang.String localName, java.lang.String localTypeName)
           
 AccountShadowType createBlankShadow()
           
 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.
 RefinedAttributeDefinition findAttributeDefinition(javax.xml.namespace.QName elementQName)
           
 RefinedAttributeDefinition findAttributeDefinition(java.lang.String elementLocalname)
           
 java.lang.String getAccountTypeName()
           
 ValueAssignmentType getActivationInbound()
           
 RefinedAttributeDefinition getAttributeDefinition(javax.xml.namespace.QName attributeName)
           
 java.util.Collection<RefinedAttributeDefinition> getAttributeDefinitions()
           
 ValueAssignmentType getCredentialsInbound()
           
 java.util.Collection<ItemDefinition> getDefinitions()
          Returns set of property definitions.
 java.lang.String getDescription()
           
 ResourceObjectAttributeDefinition getDescriptionAttribute()
          Returns the definition of description attribute of a resource object.
 java.lang.String getDisplayName()
          Returns display name.
 ResourceObjectAttributeDefinition getDisplayNameAttribute()
          Returns the definition of display name attribute.
 java.util.Collection<ResourceObjectAttributeDefinition> getIdentifiers()
          Returns the definition of identifier attributes of a resource object.
 java.util.Collection<? extends javax.xml.namespace.QName> getNamesOfAttributesWithInboundExpressions()
           
 java.util.Collection<? extends javax.xml.namespace.QName> getNamesOfAttributesWithOutboundExpressions()
           
 ResourceObjectAttributeDefinition getNamingAttribute()
          Specifies which resource attribute should be used as a "technical" name for the account.
 java.lang.String getNativeObjectClass()
          Returns the native object class string for the resource object.
 ResourceObjectDefinition getObjectClassDefinition()
           
 ObjectDefinition<AccountShadowType> getObjectDefinition()
           
 ResourceAccountType getResourceAccountType()
           
 ResourceType getResourceType()
           
 java.util.Set<ResourceObjectAttributeDefinition> getSecondaryIdentifiers()
          Returns the definition of secondary identifier attributes of a resource object.
 ResourceObject instantiate(PropertyPath parentPath)
          Create property container instance with a default name.
 ResourceObject instantiate(javax.xml.namespace.QName name, java.lang.Object element, PropertyPath parentPath)
          Create property container instance with a specified name and element.
 ResourceObject instantiate(javax.xml.namespace.QName name, PropertyPath parentPath)
          Create property container instance with a specified name.
 boolean isAccountType()
          Indicates whether definition is should be used as account type.
 boolean isDefault()
           
 boolean isDefaultAccountType()
          Indicates whether definition is should be used as default account type.
 boolean isRuntimeSchema()
           
 java.util.Set<ResourceObjectAttribute> parseAttributes(java.util.List<java.lang.Object> elements, PropertyPath parentPath)
           
 java.util.Collection<? extends ResourceObjectAttribute> parseIdentifiers(java.util.List<java.lang.Object> elements, PropertyPath parentPath)
           
 void setAccountType(boolean accountType)
           
 void setAccountTypeName(java.lang.String accountTypeName)
           
 void setDefault(boolean isDefault)
           
 void setDefaultAccountType(boolean defaultAccountType)
           
 void setDescription(java.lang.String description)
           
 void setDescriptionAttribute(ResourceObjectAttributeDefinition descriptionAttribute)
           
 void setDisplayName(java.lang.String displayName)
           
 void setDisplayNameAttribute(javax.xml.namespace.QName displayName)
          TODO Convenience method.
 void setObjectClassDefinition(ResourceObjectDefinition objectClassDefinition)
           
 
Methods inherited from class com.evolveum.midpoint.schema.processor.ResourceObjectDefinition
copyDefinitionData, instantiate, instantiate, instantiate, parseAttributes, parseIdentifiers, setDisplayNameAttribute, setNamingAttribute, setNamingAttribute, setNativeObjectClass, toString
 
Methods inherited from class com.evolveum.midpoint.schema.processor.PropertyContainerDefinition
copyDefinitionData, createPropertyDefinition, createPropertyDefinition, createPropertyDefinition, createPropertyDefinition, createPropertyDefinition, createPropertyDefinition, fillProperties, findItemDefinition, findItemDefinition, findItemDefinition, findPropertyContainerDefinition, findPropertyContainerDefinition, findPropertyDefinition, findPropertyDefinition, getComplexTypeDefinition, getPropertyDefinitions, getSchemaNamespace, instantiateJaxbClass, isEmpty, isWildcard, parseAsContent, parseAsContent, parseItem, parseItem, parseItem, parseItem, parseItemFromJaxbElement, parseItemFromJaxbObject, parseItemFromJaxbObject, parseItemFromJaxbObject, parseItems, parseItems, setComplexTypeDefinition, setRuntimeSchema
 
Methods inherited from class com.evolveum.midpoint.schema.processor.ItemDefinition
copyDefinitionData, equals, getName, getNameOrDefaultName, hashCode, setName
 
Methods inherited from class com.evolveum.midpoint.schema.processor.Definition
copyDefinitionData, getDefaultName, getHelp, getTypeName, isIgnored, setHelp, setIgnored
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getIdentifiers

public java.util.Collection<ResourceObjectAttributeDefinition> getIdentifiers()
Description copied from class: ResourceObjectDefinition
Returns the definition of identifier attributes of a resource object. May return empty set if there are no identifier attributes. Must not return null. The exception should be never thrown unless there is some bug in the code. The validation of model consistency should be done at the time of schema parsing.

Overrides:
getIdentifiers in class ResourceObjectDefinition
Returns:
definition of identifier attributes

getSecondaryIdentifiers

public java.util.Set<ResourceObjectAttributeDefinition> getSecondaryIdentifiers()
Description copied from class: ResourceObjectDefinition
Returns the definition of secondary identifier attributes of a resource object. May return empty set if there are no secondary identifier attributes. Must not return null. The exception should be never thrown unless there is some bug in the code. The validation of model consistency should be done at the time of schema parsing.

Overrides:
getSecondaryIdentifiers in class ResourceObjectDefinition
Returns:
definition of secondary identifier attributes

getDescriptionAttribute

public ResourceObjectAttributeDefinition getDescriptionAttribute()
Description copied from class: ResourceObjectDefinition
Returns the definition of description attribute of a resource object. Returns null if there is no description attribute. The exception should be never thrown unless there is some bug in the code. The validation of model consistency should be done at the time of schema parsing.

Overrides:
getDescriptionAttribute in class ResourceObjectDefinition
Returns:
definition of secondary identifier attributes

setDescriptionAttribute

public void setDescriptionAttribute(ResourceObjectAttributeDefinition descriptionAttribute)
Overrides:
setDescriptionAttribute in class ResourceObjectDefinition

getNamingAttribute

public ResourceObjectAttributeDefinition getNamingAttribute()
Description copied from class: ResourceObjectDefinition
Specifies which resource attribute should be used as a "technical" name for the account. This name will appear in log files and other troubleshooting tools. The name should be a form of unique identifier that can be used to locate the resource object for diagnostics. It should not contain white chars and special chars if that can be avoided and it should be reasonable short. It is different from a display name attribute. Display name is intended for a common user or non-technical administrator (such as role administrator). The naming attribute is intended for technical IDM administrators and developers.

Overrides:
getNamingAttribute in class ResourceObjectDefinition
Returns:
resource attribute definition that should be used as a "technical" name for the account.

getNativeObjectClass

public java.lang.String getNativeObjectClass()
Description copied from class: ResourceObjectDefinition
Returns the native object class string for the resource object. Native object class is the name of the Resource Object Definition (Object Class) as it is seen by the resource itself. The name of the Resource Object Definition may be constrained by XSD or other syntax and therefore may be "mangled" to conform to such syntax. The native object class value will contain unmangled name (if available). Returns null if there is no native object class. The exception should be never thrown unless there is some bug in the code. The validation of model consistency should be done at the time of schema parsing.

Overrides:
getNativeObjectClass in class ResourceObjectDefinition
Returns:
native object class

setAccountType

public void setAccountType(boolean accountType)
Overrides:
setAccountType in class ResourceObjectDefinition

isDefaultAccountType

public boolean isDefaultAccountType()
Description copied from class: ResourceObjectDefinition
Indicates whether definition is should be used as default account type. If true value is returned then the definition should be used as a default account type definition. This is a way how a resource connector may suggest applicable object classes (resource object definitions) for accounts. If no information about account type is present, false should be returned. This method must return true only if isAccountType() returns true. The exception should be never thrown unless there is some bug in the code. The validation of at-most-one value should be done at the time of schema parsing. The exception may not even be thrown at all if the implementation is not able to determine duplicity.

Overrides:
isDefaultAccountType in class ResourceObjectDefinition
Returns:
true if the definition should be used as account type.

setDefaultAccountType

public void setDefaultAccountType(boolean defaultAccountType)
Overrides:
setDefaultAccountType in class ResourceObjectDefinition

getAccountTypeName

public java.lang.String getAccountTypeName()
Overrides:
getAccountTypeName in class ResourceObjectDefinition

setAccountTypeName

public void setAccountTypeName(java.lang.String accountTypeName)
Overrides:
setAccountTypeName in class ResourceObjectDefinition

getDisplayNameAttribute

public ResourceObjectAttributeDefinition getDisplayNameAttribute()
Description copied from class: ResourceObjectDefinition
Returns the definition of display name attribute. Display name attribute specifies which resource attribute should be used as title when displaying objects of a specific resource object class. It must point to an attribute of String type. If not present, primary identifier should be used instead (but this method does not handle this default behavior). Returns null if there is no display name attribute. The exception should be never thrown unless there is some bug in the code. The validation of model consistency should be done at the time of schema parsing.

Overrides:
getDisplayNameAttribute in class ResourceObjectDefinition
Returns:
native object class

setDisplayNameAttribute

public void setDisplayNameAttribute(javax.xml.namespace.QName displayName)
Description copied from class: ResourceObjectDefinition
TODO Convenience method. It will internally look up the correct definition.

Overrides:
setDisplayNameAttribute in class ResourceObjectDefinition

instantiate

public ResourceObject instantiate(PropertyPath parentPath)
Description copied from class: PropertyContainerDefinition
Create property container instance with a default name.

This is a preferred way how to create property container.

Overrides:
instantiate in class ResourceObjectDefinition
Returns:
created item instance

instantiate

public ResourceObject instantiate(javax.xml.namespace.QName name,
                                  PropertyPath parentPath)
Description copied from class: PropertyContainerDefinition
Create property container instance with a specified name.

This is a preferred way how to create property container.

Overrides:
instantiate in class ResourceObjectDefinition
Returns:
created item instance

instantiate

public ResourceObject instantiate(javax.xml.namespace.QName name,
                                  java.lang.Object element,
                                  PropertyPath parentPath)
Description copied from class: PropertyContainerDefinition
Create property container instance with a specified name and element.

This is a preferred way how to create property container.

Overrides:
instantiate in class ResourceObjectDefinition
Returns:
created item instance

clone

public RefinedAccountDefinition clone()
Description copied from class: PropertyContainerDefinition
Shallow clone

Overrides:
clone in class ResourceObjectDefinition

copyDefinitionData

protected void copyDefinitionData(RefinedAccountDefinition clone)

parseAttributes

public java.util.Set<ResourceObjectAttribute> parseAttributes(java.util.List<java.lang.Object> elements,
                                                              PropertyPath parentPath)
                                                       throws SchemaException
Overrides:
parseAttributes in class ResourceObjectDefinition
Throws:
SchemaException

parseIdentifiers

public java.util.Collection<? extends ResourceObjectAttribute> parseIdentifiers(java.util.List<java.lang.Object> elements,
                                                                                PropertyPath parentPath)
                                                                         throws SchemaException
Overrides:
parseIdentifiers in class ResourceObjectDefinition
Throws:
SchemaException

findAttributeDefinition

public RefinedAttributeDefinition findAttributeDefinition(javax.xml.namespace.QName elementQName)
Overrides:
findAttributeDefinition in class ResourceObjectDefinition

findAttributeDefinition

public RefinedAttributeDefinition findAttributeDefinition(java.lang.String elementLocalname)
Overrides:
findAttributeDefinition in class ResourceObjectDefinition

createAttributeDefinition

public ResourceObjectAttributeDefinition createAttributeDefinition(javax.xml.namespace.QName name,
                                                                   javax.xml.namespace.QName typeName)
Overrides:
createAttributeDefinition in class ResourceObjectDefinition

createAttributeDefinition

public ResourceObjectAttributeDefinition createAttributeDefinition(java.lang.String localName,
                                                                   javax.xml.namespace.QName typeName)
Overrides:
createAttributeDefinition in class ResourceObjectDefinition

createAttributeDefinition

public ResourceObjectAttributeDefinition createAttributeDefinition(java.lang.String localName,
                                                                   java.lang.String localTypeName)
Overrides:
createAttributeDefinition in class ResourceObjectDefinition

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

isRuntimeSchema

public boolean isRuntimeSchema()
Overrides:
isRuntimeSchema in class PropertyContainerDefinition

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

isDefault

public boolean isDefault()

setDefault

public void setDefault(boolean isDefault)

getObjectClassDefinition

public ResourceObjectDefinition getObjectClassDefinition()

setObjectClassDefinition

public void setObjectClassDefinition(ResourceObjectDefinition objectClassDefinition)

isAccountType

public boolean isAccountType()
Description copied from class: ResourceObjectDefinition
Indicates whether definition is should be used as account type. If true value is returned then the definition should be used as an account type definition. This is a way how a resource connector may suggest applicable object classes (resource object definitions) for accounts. If no information about account type is present, false should be returned.

Overrides:
isAccountType in class ResourceObjectDefinition
Returns:
true if the definition should be used as account type.

getAttributeDefinitions

public java.util.Collection<RefinedAttributeDefinition> getAttributeDefinitions()
Overrides:
getAttributeDefinitions in class ResourceObjectDefinition

getDefinitions

public java.util.Collection<ItemDefinition> getDefinitions()
Description copied from class: PropertyContainerDefinition
Returns set of property definitions.

WARNING: This may return definitions from the associated complex type. Therefore changing the returned set may influence also the complex type definition.

The set contains all property definitions of all types that were parsed. Order of definitions is insignificant.

Overrides:
getDefinitions in class PropertyContainerDefinition
Returns:
set of definitions

getResourceType

public ResourceType getResourceType()

getObjectDefinition

public ObjectDefinition<AccountShadowType> getObjectDefinition()

getAttributeDefinition

public RefinedAttributeDefinition getAttributeDefinition(javax.xml.namespace.QName attributeName)

add

public void add(RefinedAttributeDefinition refinedAttributeDefinition)

containsAttributeDefinition

public boolean containsAttributeDefinition(javax.xml.namespace.QName attributeName)

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 ResourceObjectDefinition

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.

createBlankShadow

public AccountShadowType createBlankShadow()

getResourceAccountType

public ResourceAccountType getResourceAccountType()

getNamesOfAttributesWithOutboundExpressions

public java.util.Collection<? extends javax.xml.namespace.QName> getNamesOfAttributesWithOutboundExpressions()

getNamesOfAttributesWithInboundExpressions

public java.util.Collection<? extends javax.xml.namespace.QName> getNamesOfAttributesWithInboundExpressions()

getCredentialsInbound

public ValueAssignmentType getCredentialsInbound()

getActivationInbound

public ValueAssignmentType getActivationInbound()


Copyright © 2012 evolveum. All Rights Reserved.