Interface ResourceAttributeContainer
-
- All Superinterfaces:
DebugDumpable
,Freezable
,Item<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>>
,Itemable
,ParentVisitable
,PathVisitable
,PrismContainer<ShadowAttributesType>
,PrismContainerable<ShadowAttributesType>
,PrismContextSensitive
,Revivable
,Serializable
,Visitable
- All Known Implementing Classes:
ResourceAttributeContainerImpl
public interface ResourceAttributeContainer extends PrismContainer<ShadowAttributesType>
TODO
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(ResourceAttribute<?> attribute)
ResourceAttributeContainer
clone()
Literal clone.<T> boolean
contains(ResourceAttribute<T> attr)
static ResourceAttributeContainer
convertFromContainer(PrismContainer<?> origAttrContainer, ResourceObjectDefinition resourceObjectDefinition)
static ResourceAttributeContainerImpl
createEmptyContainer(QName elementName, ResourceObjectDefinition resourceObjectDefinition)
@NotNull Collection<ResourceAttribute<?>>
extractAttributesByDefinitions(Collection<? extends ResourceAttributeDefinition> definitions)
<X> ResourceAttribute<X>
findAttribute(ResourceAttributeDefinition attributeDefinition)
Finds a specific attribute in the resource object by definition.<X> ResourceAttribute<X>
findAttribute(QName attributeQName)
Finds a specific attribute in the resource object by name.<X> ResourceAttribute<X>
findOrCreateAttribute(ResourceAttributeDefinition attributeDefinition)
<X> ResourceAttribute<X>
findOrCreateAttribute(QName attributeName)
Collection<ResourceAttribute<?>>
getAllIdentifiers()
@NotNull Collection<ResourceAttribute<?>>
getAttributes()
TODO review docs Returns set of resource object attributes.ResourceAttributeContainerDefinition
getDefinition()
Returns applicable definition.ResourceAttribute<String>
getDescriptionAttribute()
TODO review docs Returns description attribute of a resource object.ResourceAttribute
getDisplayNameAttribute()
TODO review docs Returns display name attribute of a resource object.ResourceAttribute<String>
getNamingAttribute()
TODO review docs Specifies which resource attribute should be used as a "technical" name for the account.String
getNativeObjectClass()
TODO review docs Returns the native object class string for the resource object.PrismProperty<?>
getPrimaryIdentifier()
Returns a (single) primary identifier.Collection<ResourceAttribute<?>>
getPrimaryIdentifiers()
TODO review docs Returns primary identifiers.<T> PrismProperty<T>
getSecondaryIdentifier()
TODO review docs Returns a (single) secondary identifier.Collection<ResourceAttribute<?>>
getSecondaryIdentifiers()
TODO review docs Returns secondary identifiers.boolean
isDefaultInAKind()
TODO review docs TODO consider removal Indicates whether definition is should be used as default account type.-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutable
-
Methods inherited from interface com.evolveum.midpoint.prism.Item
acceptParentVisitor, add, add, addAll, addAll, addIgnoringEquivalents, addRespectingMetadataAndCloning, applyDefinition, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, clear, contains, contains, copy, diff, diff, equals, equals, equals, filterValues, filterYields, find, findValue, findValue, getAllValues, getAnyValue, getAnyValue, getClonedValues, getDisplayName, getElementName, getHelp, getHighestId, getParent, getPath, getPrismContextLocal, getRealValue, getRealValuesArray, getRealValuesOrRawTypes, getUserData, getUserData, getValues, hasAnyValue, hasCompleteDefinition, hashCode, hashCode, hashCode, hasNoValues, hasRaw, isEmpty, isIncomplete, isOperational, isRaw, isSingleValue, isSingleValueByDefinition, merge, normalize, recomputeAllValues, remove, remove, removeAll, removeIf, removeRespectingMetadata, replace, replaceAll, setElementName, setIncomplete, setParent, setPrismContext, setUserData, size, valuesStream
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainer
accept, add, applyDefinition, canRepresent, canRepresent, cloneComplex, containsItem, createDelta, createDelta, createImmutableClone, createNewValue, deepCloneDefinition, diff, diff, diffModifications, equivalent, findContainer, findCreateItem, findCreateItem, findItem, findItem, findItem, findOrCreateContainer, findOrCreateItem, findOrCreateItem, findOrCreateProperty, findOrCreateReference, findPartial, findProperty, findReference, findValue, getCompileTimeClass, getPropertyRealValue, getRealValue, getRealValues, getValue, getValue, mergeValue, mergeValues, mergeValues, remove, removeContainer, removeItem, removeProperty, removeReference, setContainerRealValue, setDefinition, setPropertyRealValue, setPropertyRealValues, setRealValue, setValue, trim, trimDefinitionTree
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainerable
getComplexTypeDefinition
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
-
-
-
Method Detail
-
convertFromContainer
static ResourceAttributeContainer convertFromContainer(PrismContainer<?> origAttrContainer, ResourceObjectDefinition resourceObjectDefinition) throws SchemaException
- Throws:
SchemaException
-
createEmptyContainer
static ResourceAttributeContainerImpl createEmptyContainer(QName elementName, ResourceObjectDefinition resourceObjectDefinition)
-
getDefinition
ResourceAttributeContainerDefinition getDefinition()
Description copied from interface:Item
Returns applicable definition.May return null if no definition is applicable or the definition is not known.
- Specified by:
getDefinition
in interfaceItem<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>>
- Specified by:
getDefinition
in interfaceItemable
- Specified by:
getDefinition
in interfacePrismContainer<ShadowAttributesType>
- Specified by:
getDefinition
in interfacePrismContainerable<ShadowAttributesType>
- Returns:
- applicable definition
-
getAttributes
@NotNull @NotNull Collection<ResourceAttribute<?>> getAttributes()
TODO review docs Returns set of resource object attributes. The order of attributes is insignificant. The returned set is imutable! Any change to it will be ignored.- Returns:
- set of resource object attributes.
-
add
void add(ResourceAttribute<?> attribute) throws SchemaException
- Throws:
SchemaException
-
getPrimaryIdentifier
PrismProperty<?> getPrimaryIdentifier()
Returns a (single) primary identifier. This method returns a property that acts as an (primary) identifier for the resource object. Primary identifiers are used to access the resource objects, retrieve them from resource, identify objects for modifications, etc. Returns null if no identifier is defined. Resource objects may have multiple (composite) identifiers, but this method assumes that there is only a single identifier. The method will throw exception if that assumption is not satisfied.- Returns:
- identifier property
- Throws:
IllegalStateException
- if resource object has multiple identifiers
-
getPrimaryIdentifiers
Collection<ResourceAttribute<?>> getPrimaryIdentifiers()
TODO review docs Returns primary identifiers. This method returns properties that act as (primary) identifiers for the resource object. Primary identifiers are used to access the resource objects, retrieve them from resource, identify objects for modifications, etc. Returns empty set if no identifier is defined. Must not return null. Resource objects may have multiple (composite) identifiers, all of them are returned. The returned set it immutable! Any modifications will be lost.- Returns:
- set of identifier properties
-
getSecondaryIdentifier
<T> PrismProperty<T> getSecondaryIdentifier()
TODO review docs Returns a (single) secondary identifier. This method returns a property that acts as an secondary identifier for the resource object. Secondary identifiers are used to confirm primary identification of resource object. Returns null if no secondary identifier is defined. Resource objects may have multiple (composite) identifiers, but this method assumes that there is only a single identifier. The method will throw exception if that assumption is not satisfied.- Returns:
- secondary identifier property
- Throws:
IllegalStateException
- if resource object has multiple secondary identifiers
-
getSecondaryIdentifiers
Collection<ResourceAttribute<?>> getSecondaryIdentifiers()
TODO review docs Returns secondary identifiers. This method returns properties that act as secondary identifiers for the resource object. Secondary identifiers are used to confirm primary identification of resource object. Returns empty set if no identifier is defined. Must not return null. Resource objects may have multiple (composite) identifiers, all of them are returned.- Returns:
- set of secondary identifier properties
-
getAllIdentifiers
Collection<ResourceAttribute<?>> getAllIdentifiers()
-
extractAttributesByDefinitions
@NotNull @NotNull Collection<ResourceAttribute<?>> extractAttributesByDefinitions(Collection<? extends ResourceAttributeDefinition> definitions)
-
getDescriptionAttribute
ResourceAttribute<String> getDescriptionAttribute()
TODO review docs Returns description attribute of a resource object. Returns null if there is no description attribute or the attribute is not known. 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.- Returns:
- description attribute of a resource object.
- Throws:
IllegalStateException
- if there is no definition for the referenced attributed
-
getNamingAttribute
ResourceAttribute<String> getNamingAttribute()
TODO review docs 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.- Returns:
- attribute that should be used as a "technical" name for the account.
-
getDisplayNameAttribute
ResourceAttribute getDisplayNameAttribute()
TODO review docs Returns display name attribute of a resource object. Returns null if there is no display name attribute or the attribute is not known. 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.- Returns:
- display name attribute of a resource object.
- Throws:
IllegalStateException
- if there is no definition for the referenced attributed
-
getNativeObjectClass
String getNativeObjectClass()
TODO review docs 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 or the native object class is not known. 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.- Returns:
- native object class
- Throws:
IllegalStateException
- if there is more than one description attribute.
-
isDefaultInAKind
boolean isDefaultInAKind()
TODO review docs TODO consider removal 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.- Returns:
- true if the definition should be used as account type.
- Throws:
IllegalStateException
- if more than one default account is suggested in the schema.
-
findAttribute
<X> ResourceAttribute<X> findAttribute(QName attributeQName)
Finds a specific attribute in the resource object by name. Returns null if nothing is found.- Parameters:
attributeQName
- attribute name to find.- Returns:
- found attribute or null
-
findAttribute
<X> ResourceAttribute<X> findAttribute(ResourceAttributeDefinition attributeDefinition)
Finds a specific attribute in the resource object by definition. Returns null if nothing is found.- Parameters:
attributeDefinition
- attribute definition to find.- Returns:
- found attribute or null
-
findOrCreateAttribute
<X> ResourceAttribute<X> findOrCreateAttribute(ResourceAttributeDefinition attributeDefinition) throws SchemaException
- Throws:
SchemaException
-
findOrCreateAttribute
<X> ResourceAttribute<X> findOrCreateAttribute(QName attributeName) throws SchemaException
- Throws:
SchemaException
-
contains
<T> boolean contains(ResourceAttribute<T> attr)
-
clone
ResourceAttributeContainer clone()
Description copied from interface:Item
Literal clone.- Specified by:
clone
in interfaceItem<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>>
- Specified by:
clone
in interfacePrismContainer<ShadowAttributesType>
-
-