com.evolveum.midpoint.schema.util
Class ResourceObjectShadowUtil

java.lang.Object
  extended by com.evolveum.midpoint.schema.util.ResourceObjectShadowUtil

public class ResourceObjectShadowUtil
extends java.lang.Object

Methods that would belong to the ResourceObjectShadowType class but cannot go there because of JAXB.

Author:
Radovan Semancik

Constructor Summary
ResourceObjectShadowUtil()
           
 
Method Summary
static void applyResourceSchema(PrismObject<? extends ResourceObjectShadowType> shadow, ResourceSchema resourceSchema)
          This is not supposed to be used in production code! It is just for the tests.
static void checkConsistence(PrismObject<? extends ResourceObjectShadowType> shadow, java.lang.String desc)
           
static void checkConsistency(PrismContainerDefinition<ResourceObjectShadowAttributesType> attributesDefinition, java.lang.String desc)
           
static java.util.Collection<ResourceAttribute<?>> getAttributes(PrismObject<? extends ResourceObjectShadowType> shadow)
           
static java.util.Collection<ResourceAttribute<?>> getAttributes(ResourceObjectShadowType shadowType)
           
static ResourceAttributeContainer getAttributesContainer(PrismObject<? extends ResourceObjectShadowType> shadow)
           
static ResourceAttributeContainer getAttributesContainer(ResourceObjectShadowType shadowType)
           
static java.util.List<java.lang.Object> getAttributeValues(PrismObject<ResourceObjectShadowType> shadow, javax.xml.namespace.QName attrName)
           
static java.util.List<java.lang.Object> getAttributeValues(ResourceObjectShadowType shadowType, javax.xml.namespace.QName attrName)
           
static
<T> java.util.Collection<T>
getAttributeValues(ResourceObjectShadowType shadow, javax.xml.namespace.QName attributeQname, java.lang.Class<T> type)
           
static java.util.Collection<ResourceAttribute<?>> getIdentifiers(PrismObject<? extends ResourceObjectShadowType> shadow)
           
static java.util.Collection<ResourceAttribute<?>> getIdentifiers(ResourceObjectShadowType shadowType)
           
static java.lang.String getIntent(ResourceObjectShadowType shadow)
          Returns intent from the shadow.
static java.lang.String getMultiStringAttributeValueAsSingle(ResourceObjectShadowType shadow, javax.xml.namespace.QName attrName)
           
static ResourceAttributeContainerDefinition getObjectClassDefinition(ResourceObjectShadowType shadow)
           
static ActivationType getOrCreateActivation(ResourceObjectShadowType shadowType)
           
static ResourceAttributeContainer getOrCreateAttributesContainer(PrismObject<? extends ResourceObjectShadowType> shadow, ObjectClassComplexTypeDefinition objectClassDefinition)
           
static java.lang.String getResourceOid(ResourceObjectShadowType shadowType)
           
static java.util.Collection<ResourceAttribute<?>> getSecondaryIdentifiers(PrismObject<? extends ResourceObjectShadowType> shadow)
           
static java.util.Collection<ResourceAttribute<?>> getSecondaryIdentifiers(ResourceObjectShadowType shadowType)
           
static java.lang.String getSingleStringAttributeValue(ResourceObjectShadowType shadow, javax.xml.namespace.QName attrName)
           
static void setPassword(AccountShadowType accountShadowType, ProtectedStringType password)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceObjectShadowUtil

public ResourceObjectShadowUtil()
Method Detail

getIdentifiers

public static java.util.Collection<ResourceAttribute<?>> getIdentifiers(ResourceObjectShadowType shadowType)

getIdentifiers

public static java.util.Collection<ResourceAttribute<?>> getIdentifiers(PrismObject<? extends ResourceObjectShadowType> shadow)

getSecondaryIdentifiers

public static java.util.Collection<ResourceAttribute<?>> getSecondaryIdentifiers(ResourceObjectShadowType shadowType)

getSecondaryIdentifiers

public static java.util.Collection<ResourceAttribute<?>> getSecondaryIdentifiers(PrismObject<? extends ResourceObjectShadowType> shadow)

getAttributes

public static java.util.Collection<ResourceAttribute<?>> getAttributes(ResourceObjectShadowType shadowType)

getAttributes

public static java.util.Collection<ResourceAttribute<?>> getAttributes(PrismObject<? extends ResourceObjectShadowType> shadow)

getAttributesContainer

public static ResourceAttributeContainer getAttributesContainer(ResourceObjectShadowType shadowType)

getAttributesContainer

public static ResourceAttributeContainer getAttributesContainer(PrismObject<? extends ResourceObjectShadowType> shadow)

getOrCreateAttributesContainer

public static ResourceAttributeContainer getOrCreateAttributesContainer(PrismObject<? extends ResourceObjectShadowType> shadow,
                                                                        ObjectClassComplexTypeDefinition objectClassDefinition)

getObjectClassDefinition

public static ResourceAttributeContainerDefinition getObjectClassDefinition(ResourceObjectShadowType shadow)

getResourceOid

public static java.lang.String getResourceOid(ResourceObjectShadowType shadowType)

getSingleStringAttributeValue

public static java.lang.String getSingleStringAttributeValue(ResourceObjectShadowType shadow,
                                                             javax.xml.namespace.QName attrName)

getMultiStringAttributeValueAsSingle

public static java.lang.String getMultiStringAttributeValueAsSingle(ResourceObjectShadowType shadow,
                                                                    javax.xml.namespace.QName attrName)

getAttributeValues

public static java.util.List<java.lang.Object> getAttributeValues(ResourceObjectShadowType shadowType,
                                                                  javax.xml.namespace.QName attrName)

getAttributeValues

public static java.util.List<java.lang.Object> getAttributeValues(PrismObject<ResourceObjectShadowType> shadow,
                                                                  javax.xml.namespace.QName attrName)

setPassword

public static void setPassword(AccountShadowType accountShadowType,
                               ProtectedStringType password)

getOrCreateActivation

public static ActivationType getOrCreateActivation(ResourceObjectShadowType shadowType)

applyResourceSchema

public static void applyResourceSchema(PrismObject<? extends ResourceObjectShadowType> shadow,
                                       ResourceSchema resourceSchema)
                                throws SchemaException
This is not supposed to be used in production code! It is just for the tests.

Throws:
SchemaException

getIntent

public static java.lang.String getIntent(ResourceObjectShadowType shadow)
Returns intent from the shadow. Backwards compatible with older accountType. May also adjust for default intent if necessary.


getAttributeValues

public static <T> java.util.Collection<T> getAttributeValues(ResourceObjectShadowType shadow,
                                                             javax.xml.namespace.QName attributeQname,
                                                             java.lang.Class<T> type)

checkConsistence

public static void checkConsistence(PrismObject<? extends ResourceObjectShadowType> shadow,
                                    java.lang.String desc)

checkConsistency

public static void checkConsistency(PrismContainerDefinition<ResourceObjectShadowAttributesType> attributesDefinition,
                                    java.lang.String desc)


Copyright © 2012 evolveum. All Rights Reserved.