Class MiscSchemaUtil
java.lang.Object
com.evolveum.midpoint.schema.util.MiscSchemaUtil
- Author:
- Radovan Semancik
-
Constructor Summary
-
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 boolean
contains
(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 InformationType
createInformationType
(List<LocalizableMessageType> messages) static <O extends ObjectType>
ObjectReferenceTypecreateObjectReference
(PrismObject<O> object, Class<? extends ObjectType> implicitReferenceTargetType) static ObjectReferenceType
createObjectReference
(String oid, QName type) static boolean
equalsIntent
(String intent1, String intent2) static CachingMetadataType
static @NotNull AssignmentPolicyEnforcementType
getAssignmentPolicyEnforcementMode
(ProjectionPolicyType accountSynchronizationSettings) static XMLGregorianCalendar
getChangeTimestamp
(MetadataType metadata) Returns modification time or creation time (if there was no mostatic ImportOptionsType
static ExpressionProfile
This is NOT A REAL METHOD.static @Nullable PropertyLimitationsType
getLimitationsLabeled
(@Nullable Collection<PropertyLimitationsType> definitions, @Nullable LayerType layerLabel) Given a list of limitation definitions, select the one with appropriate "layer label".static boolean
isAuditType
(Class<?> type) static boolean
static boolean
isObjectType
(Class<?> type) static Collection<ItemPath>
static boolean
matchesKind
(ShadowKindType expectedKind, ShadowKindType actualKind) static void
mergeColumns
(List<GuiObjectColumnType> existingColumns, List<GuiObjectColumnType> newColumns) static void
mergeDisplay
(DisplayType viewDisplay, DisplayType archetypeDisplay) static void
mergePaging
(PagingType existPaging, PagingType newPaging) static PrismReferenceValue
objectReferenceTypeToReferenceValue
(ObjectReferenceType refType, PrismContext prismContext) static @NotNull SelectorQualifiedGetOptionsType
optionsToOptionsType
(@NotNull Collection<SelectorOptions<GetOperationOptions>> options) Deprecated.static List<SelectorOptions<GetOperationOptions>>
optionsTypeToOptions
(SelectorQualifiedGetOptionsType objectOptionsType, PrismContext unused) Deprecated.static List<GuiObjectColumnType>
orderCustomColumns
(List<GuiObjectColumnType> customColumns) static boolean
quickEquals
(Object a, Object b) Make quick and reasonably reliable comparison.static boolean
referenceMatches
(ObjectReferenceType refPattern, ObjectReferenceType ref, PrismContext prismContext) static void
setPassword
(CredentialsType credentials, ProtectedStringType password) static <F extends UserInterfaceFeatureType>
voidsortFeaturesPanels
(List<F> panels) static Collection<String>
toCollection
(String entry) static DisplayHint
toDisplayHint
(DisplayHintType hint) static ItemProcessing
static <T extends ObjectType>
List<PrismObject<T>>toList
(Class<T> type, ObjectListType listType) static <T extends ObjectType>
List<T>toObjectableList
(List<PrismObject<T>> objectList) static ObjectListType
toObjectListType
(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
-
mergePaging
-
mergeColumns
public static void mergeColumns(List<GuiObjectColumnType> existingColumns, List<GuiObjectColumnType> newColumns) -
orderCustomColumns
-
sortFeaturesPanels
-
isObjectType
-
isAuditType
-