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>,PrismVisitable,Revivable,Visitable,ShadowAttributesContainer,ShadowItemsContainer,DebugDumpable,Serializable,Cloneable
public final class ShadowAttributesContainerImpl
extends 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
compileTimeClassFields inherited from class com.evolveum.midpoint.prism.impl.ItemImpl
definition, elementName, incomplete, parent, valuesFields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRINGFields inherited from interface com.evolveum.midpoint.prism.Item
KEY_NAMESPACE_CONTEXT -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ShadowAttribute<?, ?, ?, ?> attribute) voidcheckConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) protected voidcheckDefinition(@NotNull PrismContainerDefinition<ShadowAttributesType> def) This is a separate method, as it is used at various places, e.g.clone()Literal clone.cloneComplex(CloneStrategy strategy) Complex clone with different cloning strategies.<T> booleancontains(ShadowSimpleAttribute<T> attr) ShadowAttribute<?,?, ?, ?> findAttribute(QName attrName) 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 StringReturn a human readable name of this class suitable for logs.Returns applicable property container 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.voidremove(ShadowAttribute<?, ?, ?, ?> item) voidremoveAttribute(@NotNull ItemName name) 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, useIdentifierIndexMethods 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, valueRemovedMethods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutableMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.Item
acceptParentVisitor, acceptVisitor, 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, valuesStreamMethods 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, trimDefinitionTreeMethods inherited from interface com.evolveum.midpoint.prism.PrismContainerable
getComplexTypeDefinitionMethods inherited from interface com.evolveum.midpoint.schema.processor.ShadowAttributesContainer
addAttribute, addReferenceAttribute, addReferenceAttribute, addSimpleAttribute, containsAttribute, getDefinitionRequired, getResourceObjectDefinitionRequired
-
Method Details
-
getDefinition
Description copied from class:PrismContainerImplReturns applicable property container definition.May return null if no definition is applicable or the definition is not know.
- Specified by:
getDefinitionin interfaceItem<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>> - Specified by:
getDefinitionin interfaceItemable- Specified by:
getDefinitionin interfacePrismContainer<ShadowAttributesType>- Specified by:
getDefinitionin interfacePrismContainerable<ShadowAttributesType>- Specified by:
getDefinitionin interfaceShadowAttributesContainer- Overrides:
getDefinitionin classPrismContainerImpl<ShadowAttributesType>- Returns:
- applicable property container definition
-
getAttributes
- Specified by:
getAttributesin interfaceShadowAttributesContainer
-
getSimpleAttributes
Description copied from interface:ShadowAttributesContainerTODO review docs Returns set of resource object attributes. The order of attributes is insignificant. The returned set is immutable.- Specified by:
getSimpleAttributesin interfaceShadowAttributesContainer- Returns:
- set of resource object attributes.
-
getReferenceAttributes
Description copied from interface:ShadowAttributesContainerReturns a detached, immutable list.- Specified by:
getReferenceAttributesin interfaceShadowAttributesContainer
-
add
- Specified by:
addin interfaceShadowAttributesContainer- Throws:
SchemaException
-
getPrimaryIdentifier
Description copied from interface:ShadowAttributesContainerReturns 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:
getPrimaryIdentifierin interfaceShadowAttributesContainer- Returns:
- identifier property
-
getPrimaryIdentifiers
Description copied from interface:ShadowAttributesContainerTODO 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:
getPrimaryIdentifiersin interfaceShadowAttributesContainer- Returns:
- set of identifier properties
-
getSecondaryIdentifiers
Description copied from interface:ShadowAttributesContainerTODO 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:
getSecondaryIdentifiersin interfaceShadowAttributesContainer- Returns:
- set of secondary identifier properties
-
getAllIdentifiers
- Specified by:
getAllIdentifiersin interfaceShadowAttributesContainer
-
getNamingAttribute
Description copied from interface:ShadowAttributesContainerTODO 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:
getNamingAttributein interfaceShadowAttributesContainer- Returns:
- attribute that should be used as a "technical" name for the account.
-
findAttribute
- Specified by:
findAttributein interfaceShadowAttributesContainer
-
findSimpleAttribute
Description copied from interface:ShadowAttributesContainerFinds a specific attribute in the resource object by name. Returns null if nothing is found.- Specified by:
findSimpleAttributein interfaceShadowAttributesContainer- Parameters:
attributeQName- attribute name to find.- Returns:
- found attribute or null
-
findReferenceAttribute
- Specified by:
findReferenceAttributein interfaceShadowAttributesContainer
-
findSimpleAttribute
public <X> ShadowSimpleAttribute<X> findSimpleAttribute(ShadowSimpleAttributeDefinition attributeDefinition) Description copied from interface:ShadowAttributesContainerFinds a specific attribute in the resource object by definition. Returns null if nothing is found.- Specified by:
findSimpleAttributein interfaceShadowAttributesContainer- Parameters:
attributeDefinition- attribute definition to find.- Returns:
- found attribute or null
-
findOrCreateSimpleAttribute
public <X> ShadowSimpleAttribute<X> findOrCreateSimpleAttribute(ShadowSimpleAttributeDefinition attributeDefinition) throws SchemaException - Specified by:
findOrCreateSimpleAttributein interfaceShadowAttributesContainer- Throws:
SchemaException
-
findOrCreateSimpleAttribute
public <X> ShadowSimpleAttribute<X> findOrCreateSimpleAttribute(QName attributeName) throws SchemaException - Specified by:
findOrCreateSimpleAttributein interfaceShadowAttributesContainer- Throws:
SchemaException
-
findOrCreateReferenceAttribute
public ShadowReferenceAttribute findOrCreateReferenceAttribute(QName attributeName) throws SchemaException - Specified by:
findOrCreateReferenceAttributein interfaceShadowAttributesContainer- Throws:
SchemaException
-
contains
- Specified by:
containsin interfaceShadowAttributesContainer
-
clone
Description copied from interface:ItemLiteral clone.- Specified by:
clonein interfaceItem<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>> - Specified by:
clonein interfacePrismContainer<ShadowAttributesType>- Specified by:
clonein interfaceShadowAttributesContainer- Specified by:
clonein interfaceShadowItemsContainer- Overrides:
clonein classPrismContainerImpl<ShadowAttributesType>
-
remove
- Specified by:
removein interfaceShadowAttributesContainer
-
removeAttribute
- Specified by:
removeAttributein interfaceShadowAttributesContainer
-
cloneComplex
Description copied from interface:ItemComplex clone with different cloning strategies.- Specified by:
cloneComplexin interfaceItem<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>> - Specified by:
cloneComplexin interfacePrismContainer<ShadowAttributesType>- Overrides:
cloneComplexin classPrismContainerImpl<ShadowAttributesType>- See Also:
-
checkConsistenceInternal
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) - Specified by:
checkConsistenceInternalin interfaceItem<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>> - Overrides:
checkConsistenceInternalin classPrismContainerImpl<ShadowAttributesType>
-
checkDefinition
protected void checkDefinition(@NotNull @NotNull PrismContainerDefinition<ShadowAttributesType> def) Description copied from class:ItemImplThis is a separate method, as it is used at various places, e.g. - inItemImpl.applyDefinition(ItemDefinition, boolean)- inItemImpl.setDefinition(ItemDefinition)- when checking the consistence- Overrides:
checkDefinitionin classItemImpl<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>>
-
getDebugDumpClassName
Description copied from class:PrismContainerImplReturn a human readable name of this class suitable for logs.- Overrides:
getDebugDumpClassNamein classPrismContainerImpl<ShadowAttributesType>
-