Class ShadowAttributesContainerImpl
java.lang.Object
com.evolveum.midpoint.prism.AbstractFreezable
com.evolveum.midpoint.prism.impl.ItemImpl<PrismContainerValue<C>,PrismContainerDefinition<C>>
com.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
com.evolveum.midpoint.schema.processor.ShadowAttributesContainerImpl
- All Implemented Interfaces:
Freezable
,Item<PrismContainerValue<ShadowAttributesType>,
,PrismContainerDefinition<ShadowAttributesType>> Itemable
,ItemDefinitionTransformer.TransformableItem
,ParentVisitable
,PathVisitable
,PrismContainer<ShadowAttributesType>
,PrismContainerable<ShadowAttributesType>
,Revivable
,Visitable
,ShadowAttributesContainer
,ShadowItemsContainer
,DebugDumpable
,Serializable
public final class ShadowAttributesContainerImpl
extends com.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
implements ShadowAttributesContainer
TODO review docs
Resource Object.
Resource Object understands resource-specific annotations, such as
identifiers, native object class, etc.
Object class can be determined by using the definition (inherited from
PropertyContainer)
- Author:
- Radovan Semancik
- See Also:
-
Field Summary
Fields inherited from class com.evolveum.midpoint.prism.impl.PrismContainerImpl
compileTimeClass
Fields inherited from class com.evolveum.midpoint.prism.impl.ItemImpl
definition, elementName, incomplete, parent, values
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
Fields inherited from interface com.evolveum.midpoint.prism.Item
KEY_NAMESPACE_CONTEXT
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ShadowAttribute<?, ?, ?, ?> attribute) void
checkConsistenceInternal
(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) protected void
checkDefinition
(@NotNull PrismContainerDefinition<ShadowAttributesType> def) clone()
Literal clone.cloneComplex
(CloneStrategy strategy) Complex clone with different cloning strategies.<T> boolean
contains
(ShadowSimpleAttribute<T> attr) findOrCreateReferenceAttribute
(QName attributeName) <X> ShadowSimpleAttribute<X>
findOrCreateSimpleAttribute
(ShadowSimpleAttributeDefinition attributeDefinition) <X> ShadowSimpleAttribute<X>
findOrCreateSimpleAttribute
(QName attributeName) findReferenceAttribute
(QName attributeQName) <X> ShadowSimpleAttribute<X>
findSimpleAttribute
(ShadowSimpleAttributeDefinition attributeDefinition) Finds a specific attribute in the resource object by definition.<X> ShadowSimpleAttribute<X>
findSimpleAttribute
(QName attributeQName) Finds a specific attribute in the resource object by name.@NotNull Collection<ShadowSimpleAttribute<?>>
@NotNull Collection<ShadowAttribute<?,
?, ?, ?>> protected String
Returns applicable definition.TODO review docs Specifies which resource attribute should be used as a "technical" name for the account.Returns a (single) primary identifier.@NotNull Collection<ShadowSimpleAttribute<?>>
TODO review docs Returns primary identifiers.@NotNull Collection<ShadowReferenceAttribute>
Returns a detached, immutable list.@NotNull Collection<ShadowSimpleAttribute<?>>
TODO review docs Returns secondary identifiers.@NotNull Collection<ShadowSimpleAttribute<?>>
TODO review docs Returns set of resource object attributes.void
remove
(ShadowAttribute<?, ?, ?, ?> item) Methods inherited from class com.evolveum.midpoint.prism.impl.PrismContainerImpl
accept, add, addInternal, addInternalExecution, applyDefinition, assertDefinitions, canRepresent, canRepresent, containsItem, copyValues, createDelta, createDelta, createImmutableClone, createNewValue, createNewValueInternal, createParentIfNeeded, debugDump, deepCloneDefinition, diff, diff, diffModifications, equivalent, find, findContainer, findContainer, findCreateItem, findCreateItem, findItem, findItem, findItem, findOrCreateContainer, findOrCreateItem, findOrCreateItem, findOrCreateProperty, findOrCreateReference, findPartial, findProperty, findReference, findValue, getAllItems, getAllValues, getCompileTimeClass, getPropertyRealValue, getRealValue, getRealValues, getValue, getValue, hasCompleteDefinition, isEmpty, mergeValue, mergeValues, mergeValues, propagateDeepCloneDefinition, remove, removeContainer, removeItem, removeProperty, removeReference, setContainerRealValue, setDefinition, setDefinitionHack, setPropertyRealValue, setPropertyRealValues, setRealValue, setValue, startStrictModifications, stopStrictModifications, toString, trim, trimDefinitionTree, useIdentifierIndex
Methods inherited from class com.evolveum.midpoint.prism.impl.ItemImpl
accept, acceptParentVisitor, add, addAll, addForced, addIgnoringEquivalents, addRespectingMetadataAndCloning, addWithResult, appendDebugDumpSuffix, applyDefinitionToValues, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, clear, copyValues, diff, equals, equals, equals, fixupDelta, getElementName, getHighestId, getParent, getPath, getPathComponent, getRealValue, getRealValuesArray, getUserData, getUserData, getValues, hashCode, hashCode, hashCode, isIncomplete, merge, normalize, performFreeze, recomputeAllValues, remove, remove, removeAll, removeRespectingMetadata, removeWithResult, replace, replaceAll, revive, setElementName, setIncomplete, setParent, setUserData, transformDefinition, valueRemoved
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutable
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
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, applyDefinition, applyDefinitionIfMissing, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, clear, contains, contains, copy, diff, diff, equals, equals, equals, filterValues, filterYields, find, findValue, findValue, getAllItems, getAllValues, getAnyValue, getAnyValue, getClonedValues, getDisplayName, getElementName, getHelp, getHighestId, getNamespaceContext, getParent, getPath, getRealValue, getRealValues, getRealValuesArray, getRealValuesOrRawTypes, getUserData, getUserData, hasAnyValue, hasCompleteDefinition, hashCode, hashCode, hashCode, hasNoValues, hasRaw, isEmpty, isIncomplete, isOperational, isRaw, isSingleValue, isSingleValueByDefinition, merge, normalize, recomputeAllValues, remove, remove, removeAll, removeIf, removeRespectingMetadata, replace, replaceAll, setDefinition, setElementName, setIncomplete, setParent, setUserData, size, valuesStream
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainer
accept, add, canRepresent, canRepresent, 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, getValues, mergeValue, mergeValues, mergeValues, remove, removeContainer, removeItem, removeProperty, removeReference, setContainerRealValue, setPropertyRealValue, setPropertyRealValues, setRealValue, setValue, trim, trimDefinitionTree
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainerable
getComplexTypeDefinition
Methods inherited from interface com.evolveum.midpoint.schema.processor.ShadowAttributesContainer
addAttribute, addReferenceAttribute, addReferenceAttribute, addSimpleAttribute, containsAttribute, getDefinitionRequired, getResourceObjectDefinitionRequired
-
Method Details
-
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>
- Specified by:
getDefinition
in interfaceShadowAttributesContainer
- Overrides:
getDefinition
in classcom.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
- Returns:
- applicable definition
-
getAttributes
- Specified by:
getAttributes
in interfaceShadowAttributesContainer
-
getSimpleAttributes
Description copied from interface:ShadowAttributesContainer
TODO review docs Returns set of resource object attributes. The order of attributes is insignificant. The returned set is immutable.- Specified by:
getSimpleAttributes
in interfaceShadowAttributesContainer
- Returns:
- set of resource object attributes.
-
getReferenceAttributes
Description copied from interface:ShadowAttributesContainer
Returns a detached, immutable list.- Specified by:
getReferenceAttributes
in interfaceShadowAttributesContainer
-
add
- Specified by:
add
in interfaceShadowAttributesContainer
- Throws:
SchemaException
-
getPrimaryIdentifier
Description copied from interface:ShadowAttributesContainer
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.- Specified by:
getPrimaryIdentifier
in interfaceShadowAttributesContainer
- Returns:
- identifier property
-
getPrimaryIdentifiers
Description copied from interface:ShadowAttributesContainer
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.- Specified by:
getPrimaryIdentifiers
in interfaceShadowAttributesContainer
- Returns:
- set of identifier properties
-
getSecondaryIdentifiers
Description copied from interface:ShadowAttributesContainer
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.- Specified by:
getSecondaryIdentifiers
in interfaceShadowAttributesContainer
- Returns:
- set of secondary identifier properties
-
getAllIdentifiers
- Specified by:
getAllIdentifiers
in interfaceShadowAttributesContainer
-
getNamingAttribute
Description copied from interface:ShadowAttributesContainer
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.- Specified by:
getNamingAttribute
in interfaceShadowAttributesContainer
- Returns:
- attribute that should be used as a "technical" name for the account.
-
findSimpleAttribute
Description copied from interface:ShadowAttributesContainer
Finds a specific attribute in the resource object by name. Returns null if nothing is found.- Specified by:
findSimpleAttribute
in interfaceShadowAttributesContainer
- Parameters:
attributeQName
- attribute name to find.- Returns:
- found attribute or null
-
findReferenceAttribute
- Specified by:
findReferenceAttribute
in interfaceShadowAttributesContainer
-
findSimpleAttribute
public <X> ShadowSimpleAttribute<X> findSimpleAttribute(ShadowSimpleAttributeDefinition attributeDefinition) Description copied from interface:ShadowAttributesContainer
Finds a specific attribute in the resource object by definition. Returns null if nothing is found.- Specified by:
findSimpleAttribute
in interfaceShadowAttributesContainer
- Parameters:
attributeDefinition
- attribute definition to find.- Returns:
- found attribute or null
-
findOrCreateSimpleAttribute
public <X> ShadowSimpleAttribute<X> findOrCreateSimpleAttribute(ShadowSimpleAttributeDefinition attributeDefinition) throws SchemaException - Specified by:
findOrCreateSimpleAttribute
in interfaceShadowAttributesContainer
- Throws:
SchemaException
-
findOrCreateSimpleAttribute
public <X> ShadowSimpleAttribute<X> findOrCreateSimpleAttribute(QName attributeName) throws SchemaException - Specified by:
findOrCreateSimpleAttribute
in interfaceShadowAttributesContainer
- Throws:
SchemaException
-
findOrCreateReferenceAttribute
public ShadowReferenceAttribute findOrCreateReferenceAttribute(QName attributeName) throws SchemaException - Specified by:
findOrCreateReferenceAttribute
in interfaceShadowAttributesContainer
- Throws:
SchemaException
-
contains
- Specified by:
contains
in interfaceShadowAttributesContainer
-
clone
Description copied from interface:Item
Literal clone.- Specified by:
clone
in interfaceItem<PrismContainerValue<ShadowAttributesType>,
PrismContainerDefinition<ShadowAttributesType>> - Specified by:
clone
in interfacePrismContainer<ShadowAttributesType>
- Specified by:
clone
in interfaceShadowAttributesContainer
- Specified by:
clone
in interfaceShadowItemsContainer
- Overrides:
clone
in classcom.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
-
remove
- Specified by:
remove
in interfaceShadowAttributesContainer
-
cloneComplex
Description copied from interface:Item
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfaceItem<PrismContainerValue<ShadowAttributesType>,
PrismContainerDefinition<ShadowAttributesType>> - Specified by:
cloneComplex
in interfacePrismContainer<ShadowAttributesType>
- Overrides:
cloneComplex
in classcom.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
- See Also:
-
checkConsistenceInternal
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) - Specified by:
checkConsistenceInternal
in interfaceItem<PrismContainerValue<ShadowAttributesType>,
PrismContainerDefinition<ShadowAttributesType>> - Overrides:
checkConsistenceInternal
in classcom.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
-
checkDefinition
protected void checkDefinition(@NotNull @NotNull PrismContainerDefinition<ShadowAttributesType> def) - Overrides:
checkDefinition
in classcom.evolveum.midpoint.prism.impl.ItemImpl<PrismContainerValue<ShadowAttributesType>,
PrismContainerDefinition<ShadowAttributesType>>
-
getDebugDumpClassName
- Overrides:
getDebugDumpClassName
in classcom.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
-