Class WebModelServiceUtils
- java.lang.Object
-
- com.evolveum.midpoint.gui.api.util.WebModelServiceUtils
-
public class WebModelServiceUtils extends Object
Utility class that contains methods that interact with ModelService and other midPoint components.- Author:
- lazyman
-
-
Constructor Summary
Constructors Constructor Description WebModelServiceUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assumePowerOfAttorney(PrismObject<UserType> donor, ModelInteractionService modelInteractionService, com.evolveum.midpoint.task.api.TaskManager taskManager, OperationResult parentResult)
static <C extends Containerable>
intcountContainers(Class<C> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, PageBase page)
static <T extends ObjectType>
intcountObjects(Class<T> type, ObjectQuery query, PageBase page)
static <T extends ObjectType>
ObjectDelta<T>createActivationAdminStatusDelta(Class<T> type, String oid, boolean enabled, PrismContext context)
static Collection<SelectorOptions<GetOperationOptions>>
createLookupTableRetrieveOptions(SchemaService schemaService)
static <O extends ObjectType>
List<ObjectReferenceType>createObjectReferenceList(Class<O> type, PageBase page, Map<String,String> referenceMap)
static Collection<SelectorOptions<GetOperationOptions>>
createOptionsForParentOrgRefs(GetOperationOptionsBuilder builder)
static com.evolveum.midpoint.task.api.Task
createSimpleTask(String operation, PrismObject<? extends FocusType> owner, com.evolveum.midpoint.task.api.TaskManager manager)
static com.evolveum.midpoint.task.api.Task
createSimpleTask(String operation, String channel, PrismObject<? extends FocusType> owner, com.evolveum.midpoint.task.api.TaskManager manager)
static <T extends ObjectType>
voiddeleteObject(Class<T> type, String oid, ModelExecuteOptions options, OperationResult result, PageBase page)
static <T extends ObjectType>
voiddeleteObject(Class<T> type, String oid, ModelExecuteOptions options, OperationResult result, PageBase page, PrismObject<UserType> principal)
static <T extends ObjectType>
voiddeleteObject(Class<T> type, String oid, OperationResult result, PageBase page)
static void
dropPowerOfAttorney(ModelInteractionService modelInteractionService, com.evolveum.midpoint.task.api.TaskManager taskManager, OperationResult parentResult)
static ActivationStatusType
getAssignmentEffectiveStatus(String lifecycleStatus, ActivationType activationType, PageBase pageBase)
static AccessCertificationConfigurationType
getCertificationConfiguration(PageBase pageBase)
static FocusType
getLoggedInFocus()
static String
getLoggedInFocusOid()
static TimeZone
getTimezone()
static boolean
isEnableExperimentalFeature(ModelServiceLocator pageBase)
static boolean
isEnableExperimentalFeature(ModelInteractionService modelInteractionService, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static boolean
isEnableExperimentalFeature(com.evolveum.midpoint.task.api.Task task, ModelServiceLocator pageBase)
static boolean
isNoFetch(Collection<SelectorOptions<GetOperationOptions>> options)
static LookupTableType
loadLookupTable(String lookupTableOid, PageBase pageBase)
static <O extends ObjectType>
PrismObject<O>loadObject(PrismReferenceValue objectRef, QName expectedTargetType, PageBase pageBase, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static <T extends ObjectType>
@Nullable PrismObject<T>loadObject(Referencable objectReference, boolean allowNull, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static <T extends ObjectType>
PrismObject<T>loadObject(Referencable objectReference, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static <T extends ObjectType>
@Nullable PrismObject<T>loadObject(Referencable objectReference, PageBase page)
static <T extends ObjectType>
@Nullable PrismObject<T>loadObject(Class<T> type, String oid, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static <T extends ObjectType>
@Nullable PrismObject<T>loadObject(Class<T> type, String oid, Collection<SelectorOptions<GetOperationOptions>> options, boolean allowNotFound, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static <T extends ObjectType>
@Nullable PrismObject<T>loadObject(Class<T> type, String oid, Collection<SelectorOptions<GetOperationOptions>> options, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static PrismObject<SystemConfigurationType>
loadSystemConfigurationAsPrismObject(PageBase pageBase, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static <O extends ObjectType>
PrismObject<O>reconstructObject(Class<O> type, String oid, String eventIdentifier, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static String
resolveReferenceName(Referencable ref, PageBase page)
static String
resolveReferenceName(Referencable ref, PageBase page, boolean translate)
static String
resolveReferenceName(Referencable ref, PageBase page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static String
resolveReferenceName(Referencable ref, PageBase page, com.evolveum.midpoint.task.api.Task task, OperationResult result, boolean translate)
static <T extends ObjectType>
PrismObject<T>resolveReferenceNoFetch(Referencable reference, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
static void
save(ObjectDelta delta, ModelExecuteOptions options, OperationResult result, com.evolveum.midpoint.task.api.Task task, PageAdminLTE page)
static void
save(ObjectDelta delta, OperationResult result, PageAdminLTE page)
static void
save(ObjectDelta delta, OperationResult result, com.evolveum.midpoint.task.api.Task task, PageAdminLTE page)
static void
save(Collection<ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options, OperationResult result, com.evolveum.midpoint.task.api.Task task, PageAdminLTE page)
static <C extends Containerable>
List<C>searchContainers(Class<C> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result, PageBase page)
static <T extends ObjectType>
@NotNull List<PrismObject<T>>searchObjects(Class<T> type, ObjectQuery query, OperationResult result, PageBase page)
static <T extends ObjectType>
@NotNull List<PrismObject<T>>searchObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result, PageBase page)
static <T extends ObjectType>
@NotNull List<PrismObject<T>>searchObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result, PageBase page, PrismObject<UserType> principal)
static String
translateMessage(OperationResult result, ModelServiceLocator page)
-
-
-
Method Detail
-
resolveReferenceName
public static String resolveReferenceName(Referencable ref, PageBase page)
-
resolveReferenceName
public static String resolveReferenceName(Referencable ref, PageBase page, boolean translate)
-
resolveReferenceName
public static String resolveReferenceName(Referencable ref, PageBase page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
resolveReferenceName
public static String resolveReferenceName(Referencable ref, PageBase page, com.evolveum.midpoint.task.api.Task task, OperationResult result, boolean translate)
-
resolveReferenceNoFetch
public static <T extends ObjectType> PrismObject<T> resolveReferenceNoFetch(Referencable reference, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
createObjectReferenceList
public static <O extends ObjectType> List<ObjectReferenceType> createObjectReferenceList(Class<O> type, PageBase page, Map<String,String> referenceMap)
-
loadObject
public static <O extends ObjectType> PrismObject<O> loadObject(PrismReferenceValue objectRef, QName expectedTargetType, PageBase pageBase, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
loadObject
@Nullable public static <T extends ObjectType> @Nullable PrismObject<T> loadObject(Referencable objectReference, PageBase page)
-
loadObject
public static <T extends ObjectType> PrismObject<T> loadObject(Referencable objectReference, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
loadObject
@Nullable public static <T extends ObjectType> @Nullable PrismObject<T> loadObject(Referencable objectReference, boolean allowNull, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
loadObject
@Nullable public static <T extends ObjectType> @Nullable PrismObject<T> loadObject(Class<T> type, String oid, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
loadObject
@Nullable public static <T extends ObjectType> @Nullable PrismObject<T> loadObject(Class<T> type, String oid, Collection<SelectorOptions<GetOperationOptions>> options, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
loadObject
@Nullable public static <T extends ObjectType> @Nullable PrismObject<T> loadObject(Class<T> type, String oid, Collection<SelectorOptions<GetOperationOptions>> options, boolean allowNotFound, PageAdminLTE page, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
isNoFetch
public static boolean isNoFetch(Collection<SelectorOptions<GetOperationOptions>> options)
-
searchObjects
@NotNull public static <T extends ObjectType> @NotNull List<PrismObject<T>> searchObjects(Class<T> type, ObjectQuery query, OperationResult result, PageBase page)
-
searchObjects
@NotNull public static <T extends ObjectType> @NotNull List<PrismObject<T>> searchObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result, PageBase page)
-
searchObjects
@NotNull public static <T extends ObjectType> @NotNull List<PrismObject<T>> searchObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result, PageBase page, PrismObject<UserType> principal)
-
countObjects
public static <T extends ObjectType> int countObjects(Class<T> type, ObjectQuery query, PageBase page)
-
deleteObject
public static <T extends ObjectType> void deleteObject(Class<T> type, String oid, OperationResult result, PageBase page)
-
deleteObject
public static <T extends ObjectType> void deleteObject(Class<T> type, String oid, ModelExecuteOptions options, OperationResult result, PageBase page)
-
deleteObject
public static <T extends ObjectType> void deleteObject(Class<T> type, String oid, ModelExecuteOptions options, OperationResult result, PageBase page, PrismObject<UserType> principal)
-
createOptionsForParentOrgRefs
public static Collection<SelectorOptions<GetOperationOptions>> createOptionsForParentOrgRefs(GetOperationOptionsBuilder builder)
-
save
public static void save(ObjectDelta delta, OperationResult result, PageAdminLTE page)
-
save
public static void save(ObjectDelta delta, OperationResult result, com.evolveum.midpoint.task.api.Task task, PageAdminLTE page)
-
save
public static void save(ObjectDelta delta, ModelExecuteOptions options, OperationResult result, com.evolveum.midpoint.task.api.Task task, PageAdminLTE page)
-
save
public static void save(Collection<ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options, OperationResult result, com.evolveum.midpoint.task.api.Task task, PageAdminLTE page)
-
searchContainers
public static <C extends Containerable> List<C> searchContainers(Class<C> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result, PageBase page)
-
countContainers
public static <C extends Containerable> int countContainers(Class<C> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, PageBase page)
-
createActivationAdminStatusDelta
public static <T extends ObjectType> ObjectDelta<T> createActivationAdminStatusDelta(Class<T> type, String oid, boolean enabled, PrismContext context)
-
getLoggedInFocus
public static FocusType getLoggedInFocus()
-
getLoggedInFocusOid
public static String getLoggedInFocusOid()
-
getTimezone
public static TimeZone getTimezone()
-
createSimpleTask
public static com.evolveum.midpoint.task.api.Task createSimpleTask(String operation, PrismObject<? extends FocusType> owner, com.evolveum.midpoint.task.api.TaskManager manager)
-
createSimpleTask
public static com.evolveum.midpoint.task.api.Task createSimpleTask(String operation, String channel, PrismObject<? extends FocusType> owner, com.evolveum.midpoint.task.api.TaskManager manager)
-
reconstructObject
public static <O extends ObjectType> PrismObject<O> reconstructObject(Class<O> type, String oid, String eventIdentifier, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
createLookupTableRetrieveOptions
public static Collection<SelectorOptions<GetOperationOptions>> createLookupTableRetrieveOptions(SchemaService schemaService)
-
getAssignmentEffectiveStatus
public static ActivationStatusType getAssignmentEffectiveStatus(String lifecycleStatus, ActivationType activationType, PageBase pageBase)
-
assumePowerOfAttorney
public static void assumePowerOfAttorney(PrismObject<UserType> donor, ModelInteractionService modelInteractionService, com.evolveum.midpoint.task.api.TaskManager taskManager, OperationResult parentResult)
-
dropPowerOfAttorney
public static void dropPowerOfAttorney(ModelInteractionService modelInteractionService, com.evolveum.midpoint.task.api.TaskManager taskManager, OperationResult parentResult)
-
isEnableExperimentalFeature
public static boolean isEnableExperimentalFeature(com.evolveum.midpoint.task.api.Task task, ModelServiceLocator pageBase)
-
isEnableExperimentalFeature
public static boolean isEnableExperimentalFeature(ModelInteractionService modelInteractionService, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
isEnableExperimentalFeature
public static boolean isEnableExperimentalFeature(ModelServiceLocator pageBase)
-
getCertificationConfiguration
public static AccessCertificationConfigurationType getCertificationConfiguration(PageBase pageBase)
-
translateMessage
public static String translateMessage(OperationResult result, ModelServiceLocator page)
-
loadSystemConfigurationAsPrismObject
public static PrismObject<SystemConfigurationType> loadSystemConfigurationAsPrismObject(PageBase pageBase, com.evolveum.midpoint.task.api.Task task, OperationResult result)
-
loadLookupTable
public static LookupTableType loadLookupTable(String lookupTableOid, PageBase pageBase)
-
-