Class ResourceTypeUtil
java.lang.Object
com.evolveum.midpoint.schema.util.ResourceTypeUtil
Methods that would belong to the ResourceType class but cannot go there
because of JAXB.
- Author:
- Radovan Semancik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkNotInMaintenance
(ResourceType resource) static boolean
doesNeedExpansion
(ResourceType resource) Note that this method is not 100% accurate.static @NotNull ShadowKindType
fillDefault
(ShadowKindType kind) static @NotNull String
fillDefault
(String intent) static @NotNull QName
fillDefaultFocusType
(QName focusType) static @Nullable ObjectSynchronizationType
findObjectSynchronization
(@Nullable ResourceType resource, @Nullable ShadowKindType kind, @Nullable String intent) Deprecated.findObjectTypeDefinition
(PrismObject<ResourceType> resourceObject, @Nullable ShadowKindType kind, @Nullable String intent) static @NotNull ConnectorInstanceSpecificationType
getAdditionalConnectorSpec
(@NotNull ResourceType resource, @NotNull String name) static List<ObjectSynchronizationType>
getAllSynchronizationBeans
(ResourceType resource) Deprecated.static List<ObjectReferenceType>
getApproverRef
(ResourceType resource) getConfigurationContainer
(PrismObject<ResourceType> resource) getConfigurationContainer
(ResourceType resourceType) static @Nullable PrismContainerValue<ConfigurationPropertiesType>
getConfigurationProperties
(@NotNull ResourceType resource, @Nullable String connectorName) static @Nullable ConnectorConfigurationType
getConnectorConfiguration
(@NotNull ResourceType resource, @Nullable String connectorName) static ErrorSelectorType
getConnectorErrorCriticality
(ResourceType resourceType) static PrismObject<ConnectorType>
getConnectorIfPresent
(PrismObject<ResourceType> resource) static String
getConnectorOid
(PrismObject<ResourceType> resource) static String
getConnectorOid
(ResourceType resource) static List<CapabilityType>
getEnabledCapabilities
(@NotNull ResourceType resource) Assumes that native capabilities are already cached.static <T extends CapabilityType>
TgetEnabledCapability
(@NotNull ResourceType resource, @Nullable ResourceObjectTypeDefinitionType resourceObjectTypeDefinitionBean, @NotNull Class<T> capabilityClass) Gets an enabled instance of given capability type.static <T extends CapabilityType>
TgetEnabledCapability
(ResourceType resource, Class<T> capabilityClass) Assumes that native capabilities are already cached.static Duration
getGroupingInterval
(ResourceType resource) static AvailabilityStatusType
getLastAvailabilityStatus
(ResourceType resource) static @Nullable CapabilityCollectionType
getNativeCapabilitiesCollection
(ResourceType resource) Returns collection of capabilities.static List<ObjectReferenceType>
getOwnerRef
(ResourceType resource) static RecordPendingOperationsType
getRecordPendingOperations
(ResourceType resourceType) static Element
getResourceXsdSchema
(PrismObject<ResourceType> resource) static Element
getResourceXsdSchema
(ResourceType resource) static @Nullable PrismContainerValue<ResultsHandlerConfigurationType>
getResultsHandlerConfiguration
(@NotNull ResourceType resource, @Nullable String connectorName) getSchemaGenerationConstraints
(ResourceType resource) Returns `null` if the list of constraints does not exist or is empty.static @NotNull ShadowCheckType
getShadowConstraintsCheck
(ResourceType resource) static @Nullable ExpressionType
getSynchronizationSorterExpression
(@NotNull ResourceType resource) static boolean
hasCapabilitiesCached
(ResourceType resource) static <T extends CapabilityType>
booleanhasEnabledCapability
(@NotNull ResourceType resource, @NotNull Class<T> capabilityClass) static boolean
hasResourceNativeActivationCapability
(@NotNull ResourceType resource) static boolean
hasResourceNativeActivationLockoutCapability
(@NotNull ResourceType resource) static boolean
hasResourceNativeActivationStatusCapability
(@NotNull ResourceType resource) static boolean
hasSchema
(ResourceType resource) static boolean
hasSchemaGenerationConstraints
(ResourceType resource) static boolean
isAbstract
(@NotNull ResourceType resource) static boolean
isActivationCapabilityEnabled
(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) static boolean
isActivationLockoutStatusCapabilityEnabled
(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) static boolean
isActivationStatusCapabilityEnabled
(ResourceType resource, ResourceObjectTypeDefinitionType typeDefBean) static boolean
isActivationValidityFromCapabilityEnabled
(ResourceType resource, ResourceObjectTypeDefinitionType typeDefBean) static boolean
isActivationValidityToCapabilityEnabled
(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) static boolean
static boolean
isAvoidDuplicateValues
(ResourceType resource) static <C extends CapabilityType>
booleanisCapabilityEnabled
(ResourceType resource, Class<C> type) static boolean
isCaseIgnoreAttributeNames
(ResourceType resource) static boolean
isComplete
(@NotNull ResourceType resource) static boolean
isCountObjectsCapabilityEnabled
(ResourceType resource) static boolean
isCreateCapabilityEnabled
(ResourceType resource) static boolean
isCredentialsCapabilityEnabled
(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) static boolean
isDeleteCapabilityEnabled
(ResourceType resource) static boolean
isDiscoveryAllowed
(@NotNull ResourceType resource) static boolean
isDown
(ResourceType resource) static boolean
isEnabled
(ObjectSynchronizationType syncBean) static boolean
static boolean
isInMaintenance
(PrismObject<ResourceType> resource) static boolean
isInMaintenance
(ResourceType resource) static boolean
isLiveSyncCapabilityEnabled
(ResourceType resource) static boolean
static boolean
isPagedSearchCapabilityEnabled
(ResourceType resource) static boolean
isPasswordCapabilityEnabled
(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) static boolean
isReadCapabilityEnabled
(ResourceType resource) static boolean
isRefreshOnRead
(ResourceType resource) static boolean
isScriptCapabilityEnabled
(ResourceType resource) static boolean
isSynchronizationDefined
(ResourceType resource) static boolean
isTemplate
(@NotNull ResourceType resource) static boolean
static boolean
isUp
(@NotNull ResourceType resource) static boolean
isUpdateCapabilityEnabled
(ResourceType resource) static boolean
isValidateSchema
(ResourceType resource) static void
setResourceXsdSchema
(PrismObject<ResourceType> resource, Element xsdElement) static void
setResourceXsdSchema
(ResourceType resourceType, Element xsdElement)
-
Constructor Details
-
ResourceTypeUtil
public ResourceTypeUtil()
-
-
Method Details
-
getConnectorOid
-
getConnectorOid
-
getConnectorIfPresent
-
getResourceXsdSchema
-
getResourceXsdSchema
-
setResourceXsdSchema
-
setResourceXsdSchema
-
getNativeCapabilitiesCollection
@Nullable public static @Nullable CapabilityCollectionType getNativeCapabilitiesCollection(ResourceType resource) Returns collection of capabilities. Note: there is difference between empty set and null. Empty set means that we know the resource has no capabilities. Null means that the capabilities were not yet determined. -
hasSchemaGenerationConstraints
-
getSchemaGenerationConstraints
Returns `null` if the list of constraints does not exist or is empty. -
getSchemaGenerationConstraints
-
getEnabledCapability
@Nullable public static <T extends CapabilityType> T getEnabledCapability(ResourceType resource, Class<T> capabilityClass) Assumes that native capabilities are already cached. -
getEnabledCapability
public static <T extends CapabilityType> T getEnabledCapability(@NotNull @NotNull ResourceType resource, @Nullable @Nullable ResourceObjectTypeDefinitionType resourceObjectTypeDefinitionBean, @NotNull @NotNull Class<T> capabilityClass) Gets an enabled instance of given capability type. (No fetching: assumes that native capabilities are already cached.) Precondition: the bean must be fully expanded (regarding object type inheritance). -
hasEnabledCapability
public static <T extends CapabilityType> boolean hasEnabledCapability(@NotNull @NotNull ResourceType resource, @NotNull @NotNull Class<T> capabilityClass) -
getEnabledCapabilities
@VisibleForTesting public static List<CapabilityType> getEnabledCapabilities(@NotNull @NotNull ResourceType resource) throws SchemaException Assumes that native capabilities are already cached.- Throws:
SchemaException
-
isActivationCapabilityEnabled
public static boolean isActivationCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) -
isActivationLockoutStatusCapabilityEnabled
public static boolean isActivationLockoutStatusCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) -
isActivationStatusCapabilityEnabled
public static boolean isActivationStatusCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefBean) -
isActivationValidityFromCapabilityEnabled
public static boolean isActivationValidityFromCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefBean) -
isActivationValidityToCapabilityEnabled
public static boolean isActivationValidityToCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) -
isCredentialsCapabilityEnabled
public static boolean isCredentialsCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) -
isCreateCapabilityEnabled
-
isCountObjectsCapabilityEnabled
-
isPasswordCapabilityEnabled
public static boolean isPasswordCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) -
isLiveSyncCapabilityEnabled
-
isScriptCapabilityEnabled
-
isCapabilityEnabled
public static <C extends CapabilityType> boolean isCapabilityEnabled(ResourceType resource, Class<C> type) -
isTestConnectionCapabilityEnabled
-
isAuxiliaryObjectClassCapabilityEnabled
-
isPagedSearchCapabilityEnabled
-
isReadCapabilityEnabled
-
isUpdateCapabilityEnabled
-
isDeleteCapabilityEnabled
-
hasResourceNativeActivationCapability
@VisibleForTesting public static boolean hasResourceNativeActivationCapability(@NotNull @NotNull ResourceType resource) -
hasResourceNativeActivationStatusCapability
@VisibleForTesting public static boolean hasResourceNativeActivationStatusCapability(@NotNull @NotNull ResourceType resource) -
hasResourceNativeActivationLockoutCapability
@VisibleForTesting public static boolean hasResourceNativeActivationLockoutCapability(@NotNull @NotNull ResourceType resource) -
getConfigurationProperties
@Nullable public static @Nullable PrismContainerValue<ConfigurationPropertiesType> getConfigurationProperties(@NotNull @NotNull ResourceType resource, @Nullable @Nullable String connectorName) throws ConfigurationException - Throws:
ConfigurationException
- e.g. if the connectorName matches no configuration
-
getConnectorConfiguration
@Nullable public static @Nullable ConnectorConfigurationType getConnectorConfiguration(@NotNull @NotNull ResourceType resource, @Nullable @Nullable String connectorName) throws ConfigurationException - Throws:
ConfigurationException
- e.g. if the connectorName matches no configuration
-
getAdditionalConnectorSpec
@NotNull public static @NotNull ConnectorInstanceSpecificationType getAdditionalConnectorSpec(@NotNull @NotNull ResourceType resource, @NotNull @NotNull String name) throws ConfigurationException - Throws:
ConfigurationException
- e.g. if the connectorName matches no configuration
-
getResultsHandlerConfiguration
@Nullable public static @Nullable PrismContainerValue<ResultsHandlerConfigurationType> getResultsHandlerConfiguration(@NotNull @NotNull ResourceType resource, @Nullable @Nullable String connectorName) throws ConfigurationException - Throws:
ConfigurationException
- e.g. if the connectorName matches no configuration
-
getConfigurationContainer
public static PrismContainer<ConnectorConfigurationType> getConfigurationContainer(ResourceType resourceType) -
getConfigurationContainer
public static PrismContainer<ConnectorConfigurationType> getConfigurationContainer(PrismObject<ResourceType> resource) -
isDown
-
getLastAvailabilityStatus
-
isUp
-
isInMaintenance
-
checkNotInMaintenance
- Throws:
MaintenanceException
-
getAdministrativeAvailabilityStatus
public static AdministrativeAvailabilityStatusType getAdministrativeAvailabilityStatus(ResourceType resource) -
isAvoidDuplicateValues
-
isCaseIgnoreAttributeNames
-
getOwnerRef
-
getApproverRef
-
fillDefault
-
fillDefault
-
findObjectTypeDefinition
public static ResourceObjectTypeDefinitionType findObjectTypeDefinition(PrismObject<ResourceType> resourceObject, @Nullable @Nullable ShadowKindType kind, @Nullable @Nullable String intent) -
findObjectSynchronization
@Deprecated @Nullable public static @Nullable ObjectSynchronizationType findObjectSynchronization(@Nullable @Nullable ResourceType resource, @Nullable @Nullable ShadowKindType kind, @Nullable @Nullable String intent) Deprecated. -
fillDefaultFocusType
-
getShadowConstraintsCheck
-
isValidateSchema
-
getRecordPendingOperations
-
isRefreshOnRead
-
getConnectorErrorCriticality
-
isInMaintenance
-
isOutboundDefined
-
isInboundDefined
-
isSynchronizationDefined
-
isEnabled
-
getAllSynchronizationBeans
@Deprecated public static List<ObjectSynchronizationType> getAllSynchronizationBeans(ResourceType resource) Deprecated.FIXME! Delete this method. It no longer works with embedded synchronization configurations. -
getSynchronizationSorterExpression
@Nullable public static @Nullable ExpressionType getSynchronizationSorterExpression(@NotNull @NotNull ResourceType resource) -
isComplete
-
hasCapabilitiesCached
-
hasSchema
-
isAbstract
-
isTemplate
-
doesNeedExpansion
Note that this method is not 100% accurate. It's because even if the resource is expanded, currently the `super` item is not removed. This may change in the future. -
isDiscoveryAllowed
-
getGroupingInterval
-