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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckNotInMaintenance(ResourceType resource) static booleandoesNeedExpansion(ResourceType resource) Note that this method is not 100% accurate.static @NotNull ShadowKindTypefillDefault(ShadowKindType kind) static @NotNull StringfillDefault(String intent) static @NotNull QNamefillDefaultFocusType(QName focusType) static @Nullable ObjectSynchronizationTypefindObjectSynchronization(@Nullable ResourceType resource, @Nullable ShadowKindType kind, @Nullable String intent) Deprecated.findObjectTypeDefinition(PrismObject<ResourceType> resourceObject, @Nullable ShadowKindType kind, @Nullable String intent) static @NotNull ConnectorInstanceSpecificationTypegetAdditionalConnectorSpec(@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 ConnectorConfigurationTypegetConnectorConfiguration(@NotNull ResourceType resource, @Nullable String connectorName) static ErrorSelectorTypegetConnectorErrorCriticality(ResourceType resourceType) static PrismObject<ConnectorType>getConnectorIfPresent(PrismObject<ResourceType> resource) static StringgetConnectorOid(PrismObject<ResourceType> resource) static StringgetConnectorOid(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 DurationgetGroupingInterval(ResourceType resource) static AvailabilityStatusTypegetLastAvailabilityStatus(ResourceType resource) static @Nullable CapabilityCollectionTypegetNativeCapabilitiesCollection(ResourceType resource) Returns collection of capabilities.static List<ObjectReferenceType>getOwnerRef(ResourceType resource) static RecordPendingOperationsTypegetRecordPendingOperations(ResourceType resourceType) static ElementgetResourceXsdSchema(PrismObject<ResourceType> resource) static ElementgetResourceXsdSchema(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 ShadowCheckTypegetShadowConstraintsCheck(ResourceType resource) static @Nullable ExpressionTypegetSynchronizationSorterExpression(@NotNull ResourceType resource) static booleanhasCapabilitiesCached(ResourceType resource) static <T extends CapabilityType>
booleanhasEnabledCapability(@NotNull ResourceType resource, @NotNull Class<T> capabilityClass) static booleanhasResourceNativeActivationCapability(@NotNull ResourceType resource) static booleanhasResourceNativeActivationLockoutCapability(@NotNull ResourceType resource) static booleanhasResourceNativeActivationStatusCapability(@NotNull ResourceType resource) static booleanhasSchema(ResourceType resource) static booleanhasSchemaGenerationConstraints(ResourceType resource) static booleanisAbstract(@NotNull ResourceType resource) static booleanisActivationCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) static booleanisActivationLockoutStatusCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) static booleanisActivationStatusCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefBean) static booleanisActivationValidityFromCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefBean) static booleanisActivationValidityToCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) static booleanstatic booleanisAvoidDuplicateValues(ResourceType resource) static <C extends CapabilityType>
booleanisCapabilityEnabled(ResourceType resource, Class<C> type) static booleanisCaseIgnoreAttributeNames(ResourceType resource) static booleanisComplete(@NotNull ResourceType resource) static booleanisCountObjectsCapabilityEnabled(ResourceType resource) static booleanisCreateCapabilityEnabled(ResourceType resource) static booleanisCredentialsCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) static booleanisDeleteCapabilityEnabled(ResourceType resource) static booleanisDiscoveryAllowed(@NotNull ResourceType resource) static booleanisDown(ResourceType resource) static booleanisEnabled(ObjectSynchronizationType syncBean) static booleanstatic booleanisInMaintenance(PrismObject<ResourceType> resource) static booleanisInMaintenance(ResourceType resource) static booleanisLiveSyncCapabilityEnabled(ResourceType resource) static booleanstatic booleanisPagedSearchCapabilityEnabled(ResourceType resource) static booleanisPasswordCapabilityEnabled(ResourceType resource, ResourceObjectTypeDefinitionType typeDefinitionBean) static booleanisReadCapabilityEnabled(ResourceType resource) static booleanisRefreshOnRead(ResourceType resource) static booleanisScriptCapabilityEnabled(ResourceType resource) static booleanisSynchronizationDefined(ResourceType resource) static booleanisTemplate(@NotNull ResourceType resource) static booleanstatic booleanisUp(@NotNull ResourceType resource) static booleanisUpdateCapabilityEnabled(ResourceType resource) static booleanisValidateSchema(ResourceType resource) static voidsetResourceXsdSchema(PrismObject<ResourceType> resource, Element xsdElement) static voidsetResourceXsdSchema(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
-