public final class WebComponentUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
WebComponentUtil.Channel |
Constructor and Description |
---|
WebComponentUtil() |
Modifier and Type | Method and Description |
---|---|
static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
classToQName(PrismContext prismContext,
Class<T> clazz) |
static List<QName> |
createAbstractRoleTypeList() |
static org.apache.wicket.markup.html.form.CheckBox |
createAjaxCheckBox(String id,
org.apache.wicket.model.IModel<Boolean> model) |
static <T> org.apache.wicket.markup.html.form.TextField<T> |
createAjaxTextField(String id,
org.apache.wicket.model.IModel<T> model) |
static List<QName> |
createAssignableTypesList() |
static org.apache.wicket.model.IModel<String> |
createCategoryNameModel(org.apache.wicket.Component component,
org.apache.wicket.model.IModel<String> categorySymbolModel) |
static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
createDefaultBlackIcon(QName objectType) |
static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
createDefaultColoredIcon(QName objectType) |
static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
createDefaultIcon(PrismObject<T> object) |
static Collection<ObjectDelta<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType>> |
createDeltaCollection(ObjectDelta<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType>... deltas) |
static <E extends Enum> |
createEnumPanel(Class clazz,
String id,
org.apache.wicket.model.IModel<E> model,
org.apache.wicket.Component component) |
static DropDownChoicePanel |
createEnumPanel(PrismPropertyDefinition def,
String id,
org.apache.wicket.model.IModel model,
org.apache.wicket.Component component) |
static String |
createErrorIcon(OperationResult result) |
static List<QName> |
createFocusTypeList() |
static org.apache.wicket.Component |
createHelp(String id) |
static String |
createHumanReadableByteCount(long bytes) |
static <T extends Enum> |
createLocalizedModelForEnum(T value,
org.apache.wicket.Component comp) |
static com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType |
createObjectRef(String oid,
String name,
QName type) |
static List<QName> |
createObjectTypeList() |
static String |
createOrgIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType> object) |
static PolyStringType |
createPolyFromOrigString(String str) |
static <T extends Enum> |
createReadonlyModelFromEnum(Class<T> type) |
static String |
createResourceIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType> object) |
static String |
createRoleIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType> object) |
static String |
createServiceIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.ServiceType> object) |
static String |
createShadowIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType> object) |
static com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType |
createSingleRecurenceTask(String taskName,
QName applicableType,
ObjectQuery query,
ObjectDelta delta,
String category,
PageBase pageBase) |
static TabbedPanel<org.apache.wicket.extensions.markup.html.tabs.ITab> |
createTabPanel(String id,
PageBase parentPage,
List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs,
TabbedPanel.RightSideItemProvider provider) |
static TabbedPanel<org.apache.wicket.extensions.markup.html.tabs.ITab> |
createTabPanel(String id,
PageBase parentPage,
List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs,
TabbedPanel.RightSideItemProvider provider,
String tabChangeParameter) |
static List<String> |
createTaskCategoryList() |
static String |
createTaskIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType> object) |
static String |
createUserIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> object) |
static String |
createUserIconTitle(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> object) |
static String |
debugDumpComponentTree(org.apache.wicket.Component c) |
static String |
debugHandler(org.apache.wicket.request.IRequestHandler handler) |
static void |
dispatchToObjectDetailsPage(Class<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> objectClass,
String oid,
org.apache.wicket.Component component,
boolean failIfUnsupported) |
static void |
dispatchToObjectDetailsPage(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType objectRef,
org.apache.wicket.Component component,
boolean failIfUnsupported) |
static void |
dispatchToObjectDetailsPage(PrismObject obj,
org.apache.wicket.Component component) |
static org.apache.wicket.behavior.Behavior |
enabledIfFalse(NonEmptyModel<Boolean> model) |
static void |
encryptCredentials(ObjectDelta delta,
boolean encrypt,
MidPointApplication app) |
static void |
encryptCredentials(PrismObject object,
boolean encrypt,
MidPointApplication app) |
static void |
encryptProtectedString(ProtectedStringType string,
boolean encrypt,
MidPointApplication app) |
static String |
exceptionToString(String message,
Exception e) |
static String |
formatDate(Date date) |
static String |
formatDate(String format,
Date date) |
static String |
formatDate(XMLGregorianCalendar calendar) |
static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getBoxCssClasses(QName objectType) |
static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getBoxThinCssClasses(QName objectType) |
static List<String> |
getChannelList() |
static <T> T |
getContainerValue(PrismContainerValue object,
QName containerName,
Class<T> type) |
static Locale |
getCurrentLocale() |
static String |
getDisplayNameOrName(PrismObject object) |
static String |
getEffectiveName(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType object,
QName propertyName) |
static <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getEffectiveName(PrismObject<O> object,
QName propertyName) |
static String |
getIdentification(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType object) |
static Integer |
getIntegerParameter(org.apache.wicket.request.mapper.parameter.PageParameters params,
String key) |
static Locale |
getLocaleFromString(String localeString) |
static String |
getLocalizedDate(Date date,
String style) |
static String |
getLocalizedDate(XMLGregorianCalendar date,
String style) |
static String |
getLocalizedDatePattern(String style) |
static List<QName> |
getMatchingRuleList() |
static double |
getMaxRam() |
static String |
getName(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType ref) |
static String |
getName(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType object) |
static String |
getName(PrismObject object) |
static Class<? extends PageBase> |
getObjectDetailsPage(Class<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> type) |
static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getObjectFromReference(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType ref,
Class<T> type) |
static Class<? extends PageBase> |
getObjectListPage(Class<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> type) |
static String |
getOrigStringFromPoly(PolyString str) |
static String |
getOrigStringFromPoly(PolyStringType str) |
static PageBase |
getPageBase(org.apache.wicket.Component component) |
static PrismContext |
getPrismContext(org.apache.wicket.Component component) |
static double |
getRamUsage() |
static <T extends Selectable> |
getSelectedData(Table table) |
static String |
getStorageKeyForObjectClass(Class<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> type) |
static String |
getStorageKeyForPage(Class<?> pageClass) |
static String |
getStorageKeyForTableId(UserProfileStorage.TableId tableId) |
static double |
getSystemLoad() |
static List<OpResult> |
getTestConnectionResults(OperationResult result,
PageBase component) |
static <T> T |
getValue(PrismContainer object,
QName propertyName,
Class<T> type) |
static <T> T |
getValue(PrismContainerValue object,
QName propertyName,
Class<T> type) |
static boolean |
hasDetailsPage(Class<?> clazz) |
static boolean |
hasDetailsPage(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType ref) |
static boolean |
hasDetailsPage(PrismObject<?> object) |
static boolean |
isActivationEnabled(PrismObject object) |
static <T extends Selectable> |
isAnythingSelected(org.apache.wicket.ajax.AjaxRequestTarget target,
T single,
Table table,
PageBase page,
String nothingWarnMessage)
Checks table if has any selected rows (
Selectable interface
dtos), adds "single" parameter to selected items if it's not null. |
static boolean |
isAuthorized(Collection<String> actions) |
static boolean |
isAuthorized(String... action) |
static boolean |
isObjectOrgManager(PrismObject<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> object) |
static boolean |
isSuccessOrHandledError(OperationResult result) |
static boolean |
isSuccessOrHandledError(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType resultType) |
static boolean |
isSuccessOrHandledErrorOrInProgress(OperationResult result) |
static boolean |
isSuccessOrHandledErrorOrWarning(OperationResult result) |
static ItemPath |
joinPath(ItemPath path,
ItemPath deltaPath) |
static Class<?> |
qnameToClass(PrismContext prismContext,
QName type) |
static void |
refreshFeedbacks(org.apache.wicket.MarkupContainer component,
org.apache.wicket.ajax.AjaxRequestTarget target) |
static <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
resolveObjectTypesToQNames(Collection<Class<? extends O>> types,
PrismContext prismContext)
Takes a collection of object types (classes) that may contain abstract types.
|
static void |
revive(org.apache.wicket.model.IModel<?> model,
PrismContext prismContext) |
static void |
revive(LoadableModel<?> loadableModel,
PrismContext prismContext) |
static void |
reviveIfNeeded(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType objectType,
org.apache.wicket.Component component) |
static void |
reviveObject(Object object,
PrismContext prismContext) |
static Integer |
safeLongToInteger(Long l) |
static void |
setCurrentPage(Table table,
ObjectPaging paging) |
static void |
setSelectedTabFromPageParameters(TabbedPanel tabbed,
org.apache.wicket.request.mapper.parameter.PageParameters params,
String paramName) |
static boolean |
showResultInPage(OperationResult result) |
static <T extends org.apache.wicket.Component> |
theSameForPage(T object,
org.apache.wicket.PageReference containingPageReference) |
static org.apache.wicket.behavior.Behavior |
visibleIfFalse(NonEmptyModel<Boolean> model) |
public static Class<?> qnameToClass(PrismContext prismContext, QName type)
public static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> QName classToQName(PrismContext prismContext, Class<T> clazz)
public static com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType createSingleRecurenceTask(String taskName, QName applicableType, ObjectQuery query, ObjectDelta delta, String category, PageBase pageBase) throws SchemaException
SchemaException
public static boolean isAuthorized(String... action)
public static boolean isAuthorized(Collection<String> actions)
public static <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> List<QName> resolveObjectTypesToQNames(Collection<Class<? extends O>> types, PrismContext prismContext)
O
- common supertype for all the types in the collections
TODO: move to schema componentpublic static <T extends Enum> org.apache.wicket.model.IModel<String> createLocalizedModelForEnum(T value, org.apache.wicket.Component comp)
public static <T extends Enum> org.apache.wicket.model.IModel<List<T>> createReadonlyModelFromEnum(Class<T> type)
public static List<OpResult> getTestConnectionResults(OperationResult result, PageBase component)
public static org.apache.wicket.model.IModel<String> createCategoryNameModel(org.apache.wicket.Component component, org.apache.wicket.model.IModel<String> categorySymbolModel)
public static com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType createObjectRef(String oid, String name, QName type)
public static <E extends Enum> DropDownChoicePanel createEnumPanel(Class clazz, String id, org.apache.wicket.model.IModel<E> model, org.apache.wicket.Component component)
public static DropDownChoicePanel createEnumPanel(PrismPropertyDefinition def, String id, org.apache.wicket.model.IModel model, org.apache.wicket.Component component)
public static <T> org.apache.wicket.markup.html.form.TextField<T> createAjaxTextField(String id, org.apache.wicket.model.IModel<T> model)
public static org.apache.wicket.markup.html.form.CheckBox createAjaxCheckBox(String id, org.apache.wicket.model.IModel<Boolean> model)
public static String getName(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType object)
public static String getEffectiveName(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType object, QName propertyName)
public static <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String getEffectiveName(PrismObject<O> object, QName propertyName)
public static String getName(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType ref)
public static String getName(PrismObject object)
public static String getDisplayNameOrName(PrismObject object)
public static String getIdentification(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType object)
public static PolyStringType createPolyFromOrigString(String str)
public static String getOrigStringFromPoly(PolyString str)
public static String getOrigStringFromPoly(PolyStringType str)
public static <T> T getValue(PrismContainerValue object, QName propertyName, Class<T> type)
public static <T> T getContainerValue(PrismContainerValue object, QName containerName, Class<T> type)
public static <T> T getValue(PrismContainer object, QName propertyName, Class<T> type)
public static void encryptCredentials(ObjectDelta delta, boolean encrypt, MidPointApplication app)
public static void encryptCredentials(PrismObject object, boolean encrypt, MidPointApplication app)
public static void encryptProtectedString(ProtectedStringType string, boolean encrypt, MidPointApplication app)
public static <T extends Selectable> List<T> getSelectedData(Table table)
public static Collection<ObjectDelta<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType>> createDeltaCollection(ObjectDelta<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType>... deltas)
public static boolean showResultInPage(OperationResult result)
public static String formatDate(XMLGregorianCalendar calendar)
public static Locale getCurrentLocale()
public static String getLocalizedDate(XMLGregorianCalendar date, String style)
public static boolean isActivationEnabled(PrismObject object)
public static boolean isSuccessOrHandledError(OperationResult result)
public static boolean isSuccessOrHandledError(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationResultType resultType)
public static boolean isSuccessOrHandledErrorOrWarning(OperationResult result)
public static boolean isSuccessOrHandledErrorOrInProgress(OperationResult result)
public static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String createDefaultIcon(PrismObject<T> object)
public static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String createDefaultColoredIcon(QName objectType)
public static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String createDefaultBlackIcon(QName objectType)
public static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String getBoxCssClasses(QName objectType)
public static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String getBoxThinCssClasses(QName objectType)
public static String createUserIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> object)
public static String createRoleIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType> object)
public static String createOrgIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType> object)
public static String createServiceIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.ServiceType> object)
public static String createResourceIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType> object)
public static String createTaskIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType> object)
public static String createShadowIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType> object)
public static String createUserIconTitle(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> object)
public static String createErrorIcon(OperationResult result)
public static double getSystemLoad()
public static double getMaxRam()
public static double getRamUsage()
public static <T extends Selectable> List<T> isAnythingSelected(org.apache.wicket.ajax.AjaxRequestTarget target, T single, Table table, PageBase page, String nothingWarnMessage)
Selectable
interface
dtos), adds "single" parameter to selected items if it's not null. If
table has no selected rows warn message is added to feedback panel, and
feedback is refreshed through AjaxRequestTarget
T
- target
- single
- this parameter is used for row actions when action must be
done only on chosen row.table
- page
- nothingWarnMessage
- public static void refreshFeedbacks(org.apache.wicket.MarkupContainer component, org.apache.wicket.ajax.AjaxRequestTarget target)
public static void revive(LoadableModel<?> loadableModel, PrismContext prismContext) throws SchemaException
SchemaException
public static void revive(org.apache.wicket.model.IModel<?> model, PrismContext prismContext) throws SchemaException
SchemaException
public static void reviveObject(Object object, PrismContext prismContext) throws SchemaException
SchemaException
public static PrismContext getPrismContext(org.apache.wicket.Component component)
public static void reviveIfNeeded(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType objectType, org.apache.wicket.Component component)
public static boolean isObjectOrgManager(PrismObject<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> object)
public static String createHumanReadableByteCount(long bytes)
public static void setCurrentPage(Table table, ObjectPaging paging)
public static PageBase getPageBase(org.apache.wicket.Component component)
public static <T extends org.apache.wicket.Component> T theSameForPage(T object, org.apache.wicket.PageReference containingPageReference)
public static String debugHandler(org.apache.wicket.request.IRequestHandler handler)
public static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> T getObjectFromReference(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType ref, Class<T> type)
public static void dispatchToObjectDetailsPage(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType objectRef, org.apache.wicket.Component component, boolean failIfUnsupported)
public static void dispatchToObjectDetailsPage(PrismObject obj, org.apache.wicket.Component component)
public static void dispatchToObjectDetailsPage(Class<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> objectClass, String oid, org.apache.wicket.Component component, boolean failIfUnsupported)
public static boolean hasDetailsPage(PrismObject<?> object)
public static boolean hasDetailsPage(Class<?> clazz)
public static boolean hasDetailsPage(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType ref)
public static String getStorageKeyForTableId(UserProfileStorage.TableId tableId)
public static Class<? extends PageBase> getObjectDetailsPage(Class<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> type)
public static Class<? extends PageBase> getObjectListPage(Class<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> type)
public static String getStorageKeyForObjectClass(Class<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> type)
@NotNull public static TabbedPanel<org.apache.wicket.extensions.markup.html.tabs.ITab> createTabPanel(String id, PageBase parentPage, List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs, TabbedPanel.RightSideItemProvider provider)
@NotNull public static TabbedPanel<org.apache.wicket.extensions.markup.html.tabs.ITab> createTabPanel(String id, PageBase parentPage, List<org.apache.wicket.extensions.markup.html.tabs.ITab> tabs, TabbedPanel.RightSideItemProvider provider, String tabChangeParameter)
public static org.apache.wicket.Component createHelp(String id)
public static String debugDumpComponentTree(org.apache.wicket.Component c)
public static org.apache.wicket.behavior.Behavior visibleIfFalse(NonEmptyModel<Boolean> model)
public static org.apache.wicket.behavior.Behavior enabledIfFalse(NonEmptyModel<Boolean> model)
public static Integer getIntegerParameter(org.apache.wicket.request.mapper.parameter.PageParameters params, String key)
public static void setSelectedTabFromPageParameters(TabbedPanel tabbed, org.apache.wicket.request.mapper.parameter.PageParameters params, String paramName)
Copyright © 2016 evolveum. All rights reserved.