public final class WebMiscUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
WebMiscUtil.Channel |
Modifier and Type | Method and Description |
---|---|
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 <T extends Enum> |
createLocalizedModelForEnum(T value,
org.apache.wicket.Component comp) |
static PolyStringType |
createPolyFromOrigString(String str) |
static <T extends Enum> |
createReadonlyModelFromEnum(Class<T> type) |
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 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 |
formatDate(Date date) |
static String |
formatDate(String format,
Date date) |
static String |
formatDate(XMLGregorianCalendar calendar) |
static List<String> |
getChannelList() |
static <T> T |
getContainerValue(PrismContainerValue object,
QName containerName,
Class<T> type) |
static String |
getIdentification(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType object) |
static Locale |
getLocaleFromString(String localeString) |
static List<QName> |
getMatchingRuleList() |
static double |
getMaxRam() |
static String |
getName(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType object) |
static String |
getName(PrismObject object) |
static String |
getOrigStringFromPoly(PolyString str) |
static String |
getOrigStringFromPoly(PolyStringType str) |
static PrismContext |
getPrismContext(org.apache.wicket.Component component) |
static double |
getRamUsage() |
static <T extends Selectable> |
getSelectedData(TablePanel panel) |
static double |
getSystemLoad() |
static <T> T |
getValue(PrismContainer object,
QName propertyName,
Class<T> type) |
static <T> T |
getValue(PrismContainerValue object,
QName propertyName,
Class<T> type) |
static boolean |
isActivationEnabled(PrismObject object) |
static <T extends Selectable> |
isAnythingSelected(org.apache.wicket.ajax.AjaxRequestTarget target,
T single,
TablePanel 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(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 |
isSuccessOrHandledErrorOrInProgress(OperationResult result) |
static boolean |
isSuccessOrHandledErrorOrWarning(OperationResult result) |
static void |
refreshFeedbacks(org.apache.wicket.MarkupContainer component,
org.apache.wicket.ajax.AjaxRequestTarget target) |
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 boolean |
showResultInPage(OperationResult result) |
public static boolean isAuthorized(String... action)
public 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 <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 String getName(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType object)
public static String getName(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(TablePanel panel)
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 boolean isActivationEnabled(PrismObject object)
public static boolean isSuccessOrHandledError(OperationResult result)
public static boolean isSuccessOrHandledErrorOrWarning(OperationResult result)
public static boolean isSuccessOrHandledErrorOrInProgress(OperationResult result)
public static String createUserIcon(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> object)
public static String createUserIconTitle(PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.UserType> object)
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, TablePanel 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)
Copyright © 2015 evolveum. All rights reserved.