com.evolveum.midpoint.schema.util
Class ResourceTypeUtil

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

public class ResourceTypeUtil
extends Object

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

Author:
Radovan Semancik

Constructor Summary
ResourceTypeUtil()
           
 
Method Summary
static ObjectSynchronizationType determineSynchronization(ResourceType resource, Class<UserType> type)
          Returns appropriate object synchronization settings for the class.
static
<T> T
getCapability(Collection<Object> capabilities, Class<T> capabilityClass)
           
static String getCapabilityDisplayName(Object capability)
           
static PrismContainer<Containerable> getConfigurationContainer(PrismObject<ResourceType> resource)
           
static PrismContainer<Containerable> getConfigurationContainer(ResourceType resourceType)
           
static String getConnectorOid(ResourceType resource)
           
static ConnectorType getConnectorType(ResourceType resource, ObjectResolver resolver, OperationResult parentResult)
          The usage of "resolver" is experimental.
static List<Object> getEffectiveCapabilities(ResourceType resource)
          Assumes that native capabilities are already cached.
static
<T extends CapabilityType>
T
getEffectiveCapability(ResourceType resource, Class<T> capabilityClass)
          Assumes that native capabilities are already cached.
static ResourceAccountTypeDefinitionType getResourceAccountTypeDefinitionType(ResourceType resource, String accountType)
           
static String getResourceNamespace(PrismObject<ResourceType> resource)
           
static String getResourceNamespace(ResourceType resourceType)
           
static Element getResourceXsdSchema(PrismObject<ResourceType> resource)
           
static Element getResourceXsdSchema(ResourceType resource)
           
static boolean hasActivationCapability(ResourceType resource)
           
static boolean hasCredentialsCapability(ResourceType resource)
           
static
<T extends CapabilityType>
boolean
hasEffectiveCapability(ResourceType resource, Class<T> capabilityClass)
           
static boolean hasResourceNativeActivationCapability(ResourceType resource)
           
static boolean isCapabilityEnabled(Element capability)
           
static boolean isCapabilityEnabled(Object capability)
           
static
<T extends CapabilityType>
boolean
isCapabilityEnabled(T capability)
           
static void setResourceXsdSchema(PrismObject<ResourceType> resource, Element xsdElement)
           
static void setResourceXsdSchema(ResourceType resourceType, Element xsdElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceTypeUtil

public ResourceTypeUtil()
Method Detail

getConnectorOid

public static String getConnectorOid(ResourceType resource)

getConnectorType

public static ConnectorType getConnectorType(ResourceType resource,
                                             ObjectResolver resolver,
                                             OperationResult parentResult)
                                      throws ObjectNotFoundException,
                                             SchemaException
The usage of "resolver" is experimental. Let's see if it will be practical ...

Throws:
ObjectNotFoundException
SchemaException
See Also:
ObjectResolver

getResourceXsdSchema

public static Element getResourceXsdSchema(ResourceType resource)

getResourceXsdSchema

public static Element getResourceXsdSchema(PrismObject<ResourceType> resource)

setResourceXsdSchema

public static void setResourceXsdSchema(ResourceType resourceType,
                                        Element xsdElement)

setResourceXsdSchema

public static void setResourceXsdSchema(PrismObject<ResourceType> resource,
                                        Element xsdElement)

getCapability

public static <T> T getCapability(Collection<Object> capabilities,
                                  Class<T> capabilityClass)

getEffectiveCapability

public static <T extends CapabilityType> T getEffectiveCapability(ResourceType resource,
                                                                  Class<T> capabilityClass)
Assumes that native capabilities are already cached.


hasEffectiveCapability

public static <T extends CapabilityType> boolean hasEffectiveCapability(ResourceType resource,
                                                                        Class<T> capabilityClass)

isCapabilityEnabled

public static boolean isCapabilityEnabled(Object capability)
                                   throws SchemaException
Throws:
SchemaException

isCapabilityEnabled

public static boolean isCapabilityEnabled(Element capability)
                                   throws SchemaException
Throws:
SchemaException

isCapabilityEnabled

public static <T extends CapabilityType> boolean isCapabilityEnabled(T capability)

getEffectiveCapabilities

public static List<Object> getEffectiveCapabilities(ResourceType resource)
                                             throws SchemaException
Assumes that native capabilities are already cached.

Throws:
SchemaException

getCapabilityDisplayName

public static String getCapabilityDisplayName(Object capability)

hasActivationCapability

public static boolean hasActivationCapability(ResourceType resource)

hasCredentialsCapability

public static boolean hasCredentialsCapability(ResourceType resource)

hasResourceNativeActivationCapability

public static boolean hasResourceNativeActivationCapability(ResourceType resource)

getResourceAccountTypeDefinitionType

public static ResourceAccountTypeDefinitionType getResourceAccountTypeDefinitionType(ResourceType resource,
                                                                                     String accountType)

determineSynchronization

public static ObjectSynchronizationType determineSynchronization(ResourceType resource,
                                                                 Class<UserType> type)
Returns appropriate object synchronization settings for the class. Assumes single sync setting for now.


getConfigurationContainer

public static PrismContainer<Containerable> getConfigurationContainer(ResourceType resourceType)

getConfigurationContainer

public static PrismContainer<Containerable> getConfigurationContainer(PrismObject<ResourceType> resource)

getResourceNamespace

public static String getResourceNamespace(PrismObject<ResourceType> resource)

getResourceNamespace

public static String getResourceNamespace(ResourceType resourceType)


Copyright © 2013 evolveum. All Rights Reserved.