public class CompositeUtil extends Object
Modifier and Type | Method and Description |
---|---|
ParameterMap |
addToParameterMap(ParameterMap parameters,
String basePath,
Class<?> configBean,
Object source,
Subject subject) |
void |
applyChanges(Map<String,String> changes,
String basePath,
Subject subject)
Apply changes to domain.xml
|
ActionReporter |
executeCommand(Subject subject,
String command,
ParameterMap parameters,
javax.ws.rs.core.Response.Status status,
boolean includeFailureMessage,
boolean throwOnWarning,
boolean managed)
Execute an
AdminCommand with the specified parameters. |
ActionReporter |
executeDeleteCommand(Subject subject,
String command)
Execute a delete
AdminCommand with no parameters. |
ActionReporter |
executeDeleteCommand(Subject subject,
String command,
ParameterMap parameters)
Execute a delete
AdminCommand with the specified parameters. |
ActionReporter |
executeDeleteCommandManaged(Subject subject,
String command,
ParameterMap parameters)
Execute a delete
AdminCommand with the specified parameters. |
ActionReporter |
executeReadCommand(Subject subject,
String command)
Execute a read-only
AdminCommand with the specified parameters. |
ActionReporter |
executeReadCommand(Subject subject,
String command,
ParameterMap parameters)
Execute a read-only
AdminCommand with no parameters. |
org.glassfish.jersey.media.sse.EventOutput |
executeSseCommand(Subject subject,
String command,
ParameterMap parameters)
Execute an
AdminCommand with the specified parameters and
return EventOutput suitable for SSE. |
org.glassfish.jersey.media.sse.EventOutput |
executeSseCommand(Subject subject,
String command,
ParameterMap parameters,
SseCommandHelper.ActionReportProcessor processor)
Execute an
AdminCommand with the specified parameters and
return EventOutput suitable for SSE. |
ActionReporter |
executeWriteCommand(Subject subject,
String command)
Execute a writing
AdminCommand with no parameters. |
ActionReporter |
executeWriteCommand(Subject subject,
String command,
ParameterMap parameters)
Execute a writing
AdminCommand with the specified parameters. |
ActionReporter |
executeWriteCommandManaged(Subject subject,
String command,
ParameterMap parameters)
Execute a writing
AdminCommand with the specified parameters as managed job. |
String |
getHelpText(Annotation[] annos)
If the
HelpText annotation is in the list of Annotation s, return the value from the
specified bundle for the given key. |
Locale |
getLocale(javax.ws.rs.core.HttpHeaders requestHeaders) |
Locale |
getLocale(javax.ws.rs.core.MultivaluedMap<String,String> requestHeaders) |
<T> T |
getModel(Class<T> modelIface)
This method will return a generated concrete class that implements the interface requested, as well as any
interfaces intended to extend the base model interface.
|
Object |
getResourceExtensions(Class<?> baseClass,
Object data,
String method)
Find and execute all resource extensions for the specified base resource and HTTP method
TODO: method enum?
|
Set<Class<?>> |
getRestModels() |
<T> String |
getValidationFailureMessages(Locale locale,
Set<javax.validation.ConstraintViolation<T>> constraintViolations,
T model) |
static CompositeUtil |
instance() |
<T> T |
unmarshallClass(Locale locale,
Class<T> modelClass,
javax.json.JsonObject json)
Convert the given
RestModel encoded as Json to a live Java Object. |
<T> Set<javax.validation.ConstraintViolation<T>> |
validateRestModel(Locale locale,
T model) |
public static CompositeUtil instance()
public <T> T getModel(Class<T> modelIface)
modelIface
- The base interface for the desired data modelException
public Object getResourceExtensions(Class<?> baseClass, Object data, String method)
baseClass
- data
- method
- public ParameterMap addToParameterMap(ParameterMap parameters, String basePath, Class<?> configBean, Object source, Subject subject)
public <T> T unmarshallClass(Locale locale, Class<T> modelClass, javax.json.JsonObject json) throws javax.json.JsonException
RestModel
encoded as Json to a live Java Object.locale
- modelClass
- The target RestModel
typejson
- The json encoding of the objectjavax.json.JsonException
public String getHelpText(Annotation[] annos)
HelpText
annotation is in the list of Annotation
s, return the value from the
specified bundle for the given key.annos
- public <T> Set<javax.validation.ConstraintViolation<T>> validateRestModel(Locale locale, T model)
public <T> String getValidationFailureMessages(Locale locale, Set<javax.validation.ConstraintViolation<T>> constraintViolations, T model)
public void applyChanges(Map<String,String> changes, String basePath, Subject subject)
changes
- basePath
- public ActionReporter executeDeleteCommand(Subject subject, String command)
AdminCommand
with no parameters.subject
- command
- public ActionReporter executeDeleteCommand(Subject subject, String command, ParameterMap parameters)
AdminCommand
with the specified parameters.subject
- command
- parameters
- public ActionReporter executeDeleteCommandManaged(Subject subject, String command, ParameterMap parameters)
AdminCommand
with the specified parameters.subject
- command
- parameters
- public ActionReporter executeWriteCommand(Subject subject, String command)
AdminCommand
with no parameters.subject
- command
- public ActionReporter executeWriteCommand(Subject subject, String command, ParameterMap parameters)
AdminCommand
with the specified parameters.subject
- command
- parameters
- public ActionReporter executeWriteCommandManaged(Subject subject, String command, ParameterMap parameters)
AdminCommand
with the specified parameters as managed job.subject
- command
- parameters
- public ActionReporter executeReadCommand(Subject subject, String command)
AdminCommand
with the specified parameters.subject
- command
- public ActionReporter executeReadCommand(Subject subject, String command, ParameterMap parameters)
AdminCommand
with no parameters.subject
- command
- parameters
- public ActionReporter executeCommand(Subject subject, String command, ParameterMap parameters, javax.ws.rs.core.Response.Status status, boolean includeFailureMessage, boolean throwOnWarning, boolean managed)
AdminCommand
with the specified parameters.command
- parameters
- throwBadRequest
- (vs. NOT_FOUND)throwOnWarning
- (vs.ignore warning)public org.glassfish.jersey.media.sse.EventOutput executeSseCommand(Subject subject, String command, ParameterMap parameters)
AdminCommand
with the specified parameters and
return EventOutput suitable for SSE.public org.glassfish.jersey.media.sse.EventOutput executeSseCommand(Subject subject, String command, ParameterMap parameters, SseCommandHelper.ActionReportProcessor processor)
AdminCommand
with the specified parameters and
return EventOutput suitable for SSE.public Locale getLocale(javax.ws.rs.core.HttpHeaders requestHeaders)
Copyright © 2020. All rights reserved.