Class MiscSchemaUtil
java.lang.Object
com.evolveum.midpoint.schema.util.MiscSchemaUtil
- Author:
- Radovan Semancik
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <O extends ObjectType>
booleancanBeAssignedFrom(QName requiredTypeQName, Class<O> providedTypeClass) static Collection<ObjectDelta<? extends ObjectType>>cloneObjectDeltaCollection(Collection<ObjectDelta<? extends ObjectType>> origCollection) static Collection<ObjectDeltaOperation<? extends ObjectType>>cloneObjectDeltaOperationCollection(Collection<ObjectDeltaOperation<? extends ObjectType>> origCollection) static booleancontains(Collection<ObjectReferenceType> collection, ObjectReferenceType item) static Collection<? extends ItemDelta<?,?>> createCollection(ItemDelta<?, ?>... deltas) Convenience method that helps avoid some compiler warnings.static Collection<ObjectDelta<? extends ObjectType>>createCollection(ObjectDelta<?>... deltas) Convenience method that helps avoid some compiler warnings.static @NotNull InformationTypecreateInformationType(List<LocalizableMessageType> messages) static <O extends ObjectType>
ObjectReferenceTypecreateObjectReference(PrismObject<O> object, Class<? extends ObjectType> implicitReferenceTargetType) static ObjectReferenceTypecreateObjectReference(String oid, QName type) static booleanequalsIntent(String intent1, String intent2) static CachingMetadataTypestatic @NotNull AssignmentPolicyEnforcementTypegetAssignmentPolicyEnforcementMode(ProjectionPolicyType accountSynchronizationSettings) static XMLGregorianCalendargetChangeTimestamp(MetadataType metadata) Returns modification time or creation time (if there was no mostatic ImportOptionsTypestatic ExpressionProfileThis is NOT A REAL METHOD.static @Nullable PropertyLimitationsTypegetLimitationsLabeled(@Nullable Collection<PropertyLimitationsType> definitions, @Nullable LayerType layerLabel) Given a list of limitation definitions, select the one with appropriate "layer label"static booleanisAuditType(Class<?> type) static booleanstatic booleanisObjectType(Class<?> type) static Collection<ItemPath>static booleanmatchesKind(ShadowKindType expectedKind, ShadowKindType actualKind) static voidmergeColumns(List<GuiObjectColumnType> existingColumns, List<GuiObjectColumnType> newColumns) static voidmergeDisplay(DisplayType viewDisplay, DisplayType archetypeDisplay) static voidmergePagingOptions(@NotNull PagingOptionsType existPagingOptions, @NotNull PagingOptionsType newPagingOptions) Paging options from newPaginOptions are added to existingPagingOptions.static PrismReferenceValueobjectReferenceTypeToReferenceValue(ObjectReferenceType refType, PrismContext prismContext) static @NotNull SelectorQualifiedGetOptionsTypeoptionsToOptionsType(@NotNull Collection<SelectorOptions<GetOperationOptions>> options) Deprecated.static List<SelectorOptions<GetOperationOptions>>optionsTypeToOptions(SelectorQualifiedGetOptionsType objectOptionsType, PrismContext unused) Deprecated.static List<GuiObjectColumnType>orderCustomColumns(List<GuiObjectColumnType> customColumns) static booleanquickEquals(Object a, Object b) Make quick and reasonably reliable comparison.static booleanreferenceMatches(ObjectReferenceType refPattern, ObjectReferenceType ref, PrismContext prismContext) static voidreplacePaging(PagingType existPaging, PagingType newPaging) static voidsetPassword(CredentialsType credentials, ProtectedStringType password) static <F extends UserInterfaceFeatureType>
voidsortFeaturesPanels(List<F> panels) static Collection<String>toCollection(String entry) static DisplayHinttoDisplayHint(DisplayHintType hint) static ItemProcessingstatic <T extends ObjectType>
List<PrismObject<T>>toList(Class<T> type, ObjectListType listType) static <T extends ObjectType>
List<T>toObjectableList(List<PrismObject<T>> objectList) static ObjectListTypetoObjectListType(List<PrismObject<? extends ObjectType>> list)
-
Constructor Details
-
MiscSchemaUtil
public MiscSchemaUtil()
-
-
Method Details
-
toObjectListType
-
toList
public static <T extends ObjectType> List<PrismObject<T>> toList(Class<T> type, ObjectListType listType) -
toObjectableList
-
getDefaultImportOptions
-
generateCachingMetadata
-
isNullOrEmpty
-
setPassword
-
toCollection
-
itemReferenceListTypeToItemPathList
public static Collection<ItemPath> itemReferenceListTypeToItemPathList(PropertyReferenceListType resolve) -
optionsToOptionsType
@Deprecated @NotNull public static @NotNull SelectorQualifiedGetOptionsType optionsToOptionsType(@NotNull @NotNull Collection<SelectorOptions<GetOperationOptions>> options) Deprecated. -
optionsTypeToOptions
@Deprecated public static List<SelectorOptions<GetOperationOptions>> optionsTypeToOptions(SelectorQualifiedGetOptionsType objectOptionsType, PrismContext unused) Deprecated. -
createCollection
public static Collection<ObjectDelta<? extends ObjectType>> createCollection(ObjectDelta<?>... deltas) Convenience method that helps avoid some compiler warnings. -
createCollection
Convenience method that helps avoid some compiler warnings. -
cloneObjectDeltaCollection
public static Collection<ObjectDelta<? extends ObjectType>> cloneObjectDeltaCollection(Collection<ObjectDelta<? extends ObjectType>> origCollection) -
cloneObjectDeltaOperationCollection
public static Collection<ObjectDeltaOperation<? extends ObjectType>> cloneObjectDeltaOperationCollection(Collection<ObjectDeltaOperation<? extends ObjectType>> origCollection) -
createObjectReference
-
createObjectReference
public static <O extends ObjectType> ObjectReferenceType createObjectReference(PrismObject<O> object, Class<? extends ObjectType> implicitReferenceTargetType) -
equalsIntent
-
matchesKind
-
getAssignmentPolicyEnforcementMode
@NotNull public static @NotNull AssignmentPolicyEnforcementType getAssignmentPolicyEnforcementMode(ProjectionPolicyType accountSynchronizationSettings) -
objectReferenceTypeToReferenceValue
public static PrismReferenceValue objectReferenceTypeToReferenceValue(ObjectReferenceType refType, PrismContext prismContext) -
getLimitationsLabeled
@Nullable public static @Nullable PropertyLimitationsType getLimitationsLabeled(@Nullable @Nullable Collection<PropertyLimitationsType> definitions, @Nullable @Nullable LayerType layerLabel) throws SchemaException Given a list of limitation definitions, select the one with appropriate "layer label". * Layer label of `null` means we want to obtain the record that has (multivalued) "layer" property empty. * Non-null label means we want to obtain the record that has that specific value among the "layer" values. In both cases, there can be at most one matching record. NOTE: This method has been renamed from the original `getLimitationsForLayer` because the original name was a bit misleading. The effective limitations for a given layer may be different from the ones returned by this method. See also MID-7929.- Throws:
SchemaException
-
contains
public static boolean contains(Collection<ObjectReferenceType> collection, ObjectReferenceType item) -
getChangeTimestamp
Returns modification time or creation time (if there was no mo -
referenceMatches
public static boolean referenceMatches(ObjectReferenceType refPattern, ObjectReferenceType ref, PrismContext prismContext) -
quickEquals
Make quick and reasonably reliable comparison. E.g. compare prism objects only by comparing OIDs. This is ideal for cases when the compare is called often and the objects are unlikely to change (e.g. user interface selectable beans). -
createInformationType
@NotNull public static @NotNull InformationType createInformationType(List<LocalizableMessageType> messages) -
toDisplayHint
-
toItemProcessing
-
canBeAssignedFrom
public static <O extends ObjectType> boolean canBeAssignedFrom(QName requiredTypeQName, Class<O> providedTypeClass) -
getExpressionProfile
This is NOT A REAL METHOD. It just returns null. It is here to mark all the places where proper handling of expression profiles should be later added. -
mergeDisplay
-
replacePaging
-
mergePagingOptions
public static void mergePagingOptions(@NotNull @NotNull PagingOptionsType existPagingOptions, @NotNull @NotNull PagingOptionsType newPagingOptions) Paging options from newPaginOptions are added to existingPagingOptions.- Parameters:
existPagingOptions-newPagingOptions-
-
mergeColumns
public static void mergeColumns(List<GuiObjectColumnType> existingColumns, List<GuiObjectColumnType> newColumns) -
orderCustomColumns
-
sortFeaturesPanels
-
isObjectType
-
isAuditType
-