public final class ResourceAttributeContainerImpl extends com.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType> implements ResourceAttributeContainer
defaultEquivalenceStrategy, definition, elementName, immutable, incomplete, parent, prismContext, values
INDENT_STRING
Constructor and Description |
---|
ResourceAttributeContainerImpl(QName name,
ResourceAttributeContainerDefinition definition,
PrismContext prismContext)
The constructors should be used only occasionally (if used at all).
|
Modifier and Type | Method and Description |
---|---|
void |
add(ResourceAttribute<?> attribute) |
void |
checkConsistenceInternal(Itemable rootItem,
boolean requireDefinitions,
boolean prohibitRaw,
ConsistencyCheckScope scope) |
ResourceAttributeContainer |
clone()
Literal clone.
|
ResourceAttributeContainerImpl |
cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.
|
<T> boolean |
contains(ResourceAttribute<T> attr) |
protected void |
copyValues(CloneStrategy strategy,
ResourceAttributeContainerImpl clone) |
Collection<ResourceAttribute<?>> |
extractAttributesByDefinitions(Collection<? extends ResourceAttributeDefinition> definitions) |
<X> ResourceAttribute<X> |
findAttribute(QName attributeQName)
Finds a specific attribute in the resource object by name.
|
<X> ResourceAttribute<X> |
findAttribute(ResourceAttributeDefinition attributeDefinition)
Finds a specific attribute in the resource object by definition.
|
<X> ResourceAttribute<X> |
findOrCreateAttribute(QName attributeName) |
<X> ResourceAttribute<X> |
findOrCreateAttribute(ResourceAttributeDefinition attributeDefinition) |
Collection<ResourceAttribute<?>> |
getAllIdentifiers() |
Collection<ResourceAttribute<?>> |
getAttributes()
Returns set of resource object attributes.
|
protected String |
getDebugDumpClassName()
Return a human readable name of this class suitable for logs.
|
ResourceAttributeContainerDefinition |
getDefinition()
Returns applicable property container definition.
|
ResourceAttribute<String> |
getDescriptionAttribute()
Returns description attribute of a resource object.
|
ResourceAttribute |
getDisplayNameAttribute()
Returns display name attribute of a resource object.
|
ShadowKindType |
getKind() |
ResourceAttribute<String> |
getNamingAttribute()
Specifies which resource attribute should be used as a "technical" name
for the account.
|
String |
getNativeObjectClass()
Returns the native object class string for the resource object.
|
PrismProperty<?> |
getPrimaryIdentifier()
Returns a (single) primary identifier.
|
Collection<ResourceAttribute<?>> |
getPrimaryIdentifiers()
Returns primary identifiers.
|
<T> PrismProperty<T> |
getSecondaryIdentifier()
Returns a (single) secondary identifier.
|
Collection<ResourceAttribute<?>> |
getSecondaryIdentifiers()
Returns secondary identifiers.
|
boolean |
isDefaultInAKind()
Indicates whether definition is should be used as default account type.
|
accept, add, add, applyDefinition, assertDefinitions, canRepresent, canRepresent, checkDefinition, containsEquivalentValue, containsItem, copyValues, createDelta, createDelta, createNewValue, createParentIfNeeded, debugDump, deepCloneDefinition, diff, diff, diffModifications, diffModifications, equivalent, find, findContainer, findContainer, findCreateItem, findCreateItem, findItem, findItem, findItem, findOrCreateContainer, findOrCreateItem, findOrCreateItem, findOrCreateProperty, findOrCreateReference, findPartial, findProperty, findReference, findValue, getCompileTimeClass, getPropertyRealValue, getRealValue, getRealValues, getValue, getValue, hasCompleteDefinition, isEmpty, mergeValue, mergeValues, mergeValues, propagateDeepCloneDefinition, remove, removeContainer, removeItem, removeProperty, removeReference, setContainerRealValue, setDefinition, setPropertyRealValue, setPropertyRealValues, setValue, toString, trim, trimDefinitionTree
accept, acceptParentVisitor, add, add, add, addAll, addAll, appendDebugDumpSuffix, applyDefinition, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkImmutability, checkMutability, clear, contains, contains, contains, containsEquivalentValue, copyValues, diff, diff, equals, equals, equals, filterValues, findValue, fixupDelta, getAllValues, getAnyValue, getClonedValues, getDisplayName, getElementName, getEqualsHashCodeStrategy, getHelp, getHighestId, getParent, getPath, getPathComponent, getPrismContext, getPrismContextLocal, getUserData, getUserData, getValues, hashCode, hashCode, hashCode, hasNoValues, hasRaw, isImmutable, isIncomplete, isOperational, isRaw, isSingleValue, merge, modifyUnfrozen, modifyUnfrozen, normalize, recomputeAllValues, remove, remove, remove, removeAll, replace, replaceAll, revive, setElementName, setImmutable, setIncomplete, setParent, setPrismContext, setUserData, size, valuesEqual
finalize, getClass, notify, notifyAll, wait, wait, wait
convertFromContainer, createEmptyContainer
accept, add, applyDefinition, assertDefinitions, canRepresent, canRepresent, containsItem, createDelta, createDelta, createNewValue, createParentIfNeeded, debugDump, deepCloneDefinition, diff, diff, diffModifications, diffModifications, equivalent, find, findContainer, findCreateItem, findCreateItem, findItem, findItem, findItem, findOrCreateContainer, findOrCreateItem, findOrCreateItem, findOrCreateProperty, findOrCreateReference, findPartial, findProperty, findReference, findValue, getCompileTimeClass, getPropertyRealValue, getRealValue, getRealValues, getValue, getValue, isEmpty, mergeValue, mergeValues, mergeValues, newInstance, remove, removeContainer, removeItem, removeProperty, removeReference, setContainerRealValue, setDefinition, setPropertyRealValue, setPropertyRealValues, setValue, toString, trim, trimDefinitionTree
acceptParentVisitor, add, add, add, addAll, addAll, applyDefinition, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkImmutability, clear, cloneCollection, contains, contains, contains, containsEquivalentValue, containsEquivalentValue, diff, diff, equals, equals, equals, filterValues, findValue, getAllValues, getAllValues, getAnyValue, getClonedValues, getDisplayName, getElementName, getHelp, getHighestId, getParent, getPath, getPrismContext, getPrismContextLocal, getUserData, getUserData, getValues, getValues, hasCompleteDefinition, hashCode, hashCode, hashCode, hasNoValues, hasNoValues, hasRaw, isImmutable, isIncomplete, isOperational, isRaw, isSingleValue, merge, modifyUnfrozen, modifyUnfrozen, normalize, recomputeAllValues, remove, remove, removeAll, replace, replaceAll, resetParentCollection, revive, setElementName, setImmutable, setIncomplete, setParent, setPrismContext, setUserData, size, valuesEqual
debugDump, debugDumpLazily, debugDumpLazily
getComplexTypeDefinition
public ResourceAttributeContainerImpl(QName name, ResourceAttributeContainerDefinition definition, PrismContext prismContext)
public ResourceAttributeContainerDefinition getDefinition()
PrismContainer
May return null if no definition is applicable or the definition is not know.
getDefinition
in interface Item<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>>
getDefinition
in interface Itemable
getDefinition
in interface PrismContainer<ShadowAttributesType>
getDefinition
in interface PrismContainerable<ShadowAttributesType>
getDefinition
in interface ResourceAttributeContainer
getDefinition
in class com.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
public Collection<ResourceAttribute<?>> getAttributes()
getAttributes
in interface ResourceAttributeContainer
public void add(ResourceAttribute<?> attribute) throws SchemaException
add
in interface ResourceAttributeContainer
SchemaException
public PrismProperty<?> getPrimaryIdentifier()
getPrimaryIdentifier
in interface ResourceAttributeContainer
IllegalStateException
- if resource object has multiple identifierspublic Collection<ResourceAttribute<?>> getPrimaryIdentifiers()
getPrimaryIdentifiers
in interface ResourceAttributeContainer
public <T> PrismProperty<T> getSecondaryIdentifier()
getSecondaryIdentifier
in interface ResourceAttributeContainer
IllegalStateException
- if resource object has multiple secondary identifierspublic Collection<ResourceAttribute<?>> getSecondaryIdentifiers()
getSecondaryIdentifiers
in interface ResourceAttributeContainer
public Collection<ResourceAttribute<?>> getAllIdentifiers()
getAllIdentifiers
in interface ResourceAttributeContainer
public Collection<ResourceAttribute<?>> extractAttributesByDefinitions(Collection<? extends ResourceAttributeDefinition> definitions)
extractAttributesByDefinitions
in interface ResourceAttributeContainer
public ResourceAttribute<String> getDescriptionAttribute()
getDescriptionAttribute
in interface ResourceAttributeContainer
IllegalStateException
- if there is no definition for the referenced attributedpublic ResourceAttribute<String> getNamingAttribute()
getNamingAttribute
in interface ResourceAttributeContainer
public ResourceAttribute getDisplayNameAttribute()
getDisplayNameAttribute
in interface ResourceAttributeContainer
IllegalStateException
- if there is no definition for the referenced attributedpublic String getNativeObjectClass()
getNativeObjectClass
in interface ResourceAttributeContainer
IllegalStateException
- if there is more than one description attribute.public ShadowKindType getKind()
getKind
in interface ResourceAttributeContainer
public boolean isDefaultInAKind()
isDefaultInAKind
in interface ResourceAttributeContainer
IllegalStateException
- if more than one default account is suggested in the schema.public <X> ResourceAttribute<X> findAttribute(QName attributeQName)
findAttribute
in interface ResourceAttributeContainer
attributeQName
- attribute name to find.public <X> ResourceAttribute<X> findAttribute(ResourceAttributeDefinition attributeDefinition)
findAttribute
in interface ResourceAttributeContainer
attributeDefinition
- attribute definition to find.public <X> ResourceAttribute<X> findOrCreateAttribute(ResourceAttributeDefinition attributeDefinition) throws SchemaException
findOrCreateAttribute
in interface ResourceAttributeContainer
SchemaException
public <X> ResourceAttribute<X> findOrCreateAttribute(QName attributeName) throws SchemaException
findOrCreateAttribute
in interface ResourceAttributeContainer
SchemaException
public <T> boolean contains(ResourceAttribute<T> attr)
contains
in interface ResourceAttributeContainer
public ResourceAttributeContainer clone()
Item
clone
in interface Item<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>>
clone
in interface PrismContainer<ShadowAttributesType>
clone
in interface ResourceAttributeContainer
clone
in class com.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
public ResourceAttributeContainerImpl cloneComplex(CloneStrategy strategy)
Item
cloneComplex
in interface Item<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>>
cloneComplex
in interface PrismContainer<ShadowAttributesType>
cloneComplex
in class com.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
CloneStrategy
protected void copyValues(CloneStrategy strategy, ResourceAttributeContainerImpl clone)
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
checkConsistenceInternal
in interface Item<PrismContainerValue<ShadowAttributesType>,PrismContainerDefinition<ShadowAttributesType>>
checkConsistenceInternal
in interface PrismContainer<ShadowAttributesType>
checkConsistenceInternal
in class com.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
protected String getDebugDumpClassName()
getDebugDumpClassName
in class com.evolveum.midpoint.prism.impl.PrismContainerImpl<ShadowAttributesType>
Copyright © 2020 Evolveum. All rights reserved.