public final class WebMiscUtil extends Object
Modifier and Type | Method and Description |
---|---|
static DropDownChoicePanel |
createActivationStatusPanel(String id,
org.apache.wicket.model.IModel<com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType> model,
org.apache.wicket.Component component) |
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 <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 <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 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 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 |
isSuccessOrHandledError(OperationResult result) |
static void |
refreshFeedbacks(org.apache.wicket.MarkupContainer component,
org.apache.wicket.ajax.AjaxRequestTarget target) |
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 DropDownChoicePanel createActivationStatusPanel(String id, org.apache.wicket.model.IModel<com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType> 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 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)
Copyright © 2014 evolveum. All rights reserved.