public abstract class AbstractConfigBasedClassicHandler
extends AbstractClassicResourceHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright notice field.
|
Modifier | Constructor and Description |
---|---|
protected | AbstractConfigBasedClassicHandler()
This is the default handler constructor that will be called to process the REST request.
|
protected | AbstractConfigBasedClassicHandler(TypeConverterRegistry pTypeConverterRegistry, ModelParser pModelParser, MappingProfileParser pMappingProfileParser, FillerFactory fillerFactory)
This constructor should only be used for testing or if you want control of the composition of the abstract class.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.commons.json.JSONObject | composeResponseFromMappingProfile(ClassModel classModel, java.lang.Object container, MappingProfile profile)
Compose a response based on a mapping profile and a container.
|
protected ControllerCommand | createControllerCommand(java.lang.String storeId, model)
Create a controller command.
|
protected void | execute(java.lang.String cmdRefKey, TypedProperty requestProperties, java.lang.String responseFormat, ControllerCommand pCmd)
This method creates a command context, looks up the command implementation from the command registry, associates the command context created and the request properties to the command.
|
org.apache.commons.json.JSONObject | executeConfigBasedBean(java.lang.String beanClassName, java.lang.String profileName, java.lang.String responseFormat, java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap)
Process a data bean request using the configuration-based profile mappings.
|
javax.ws.rs.core.Response | executeConfigBasedBeanWithContext(java.lang.String beanClassName, java.lang.String profileName, java.lang.String responseFormat, java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap)
This methods sets up the BusinessContextService start request, then delegates to executeConfigBasedBean(String, String, String, Map), and finally ends BCS the request.
|
org.apache.commons.json.JSONObject | executeConfigBasedCommand(java.lang.String pCmdInterfaceName, java.lang.String profileName, java.lang.String responseFormat, java.lang.String storeId, java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap)
Process a controller command request using the configuration-based profile mappings.
|
javax.ws.rs.core.Response | executeConfigBasedCommandWithContext(java.lang.String commandInterfaceName, java.lang.String profileName, java.lang.String responseFormat, java.lang.String storeId, java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap)
This methods sets up the BusinessContextService start request, then delegates to #executeControllerCommand(String, String, TypedProperty, String), and finally ends BCS the request.
|
protected java.lang.Class<? extends DataBean> | loadBeanClass(java.lang.String pBeanClassName)
Load a bean class.
|
protected java.lang.Class<? extends ControllerCommand> | loadControllerCommandClass(java.lang.String pCommandInterfaceName)
Load a controller command class.
|
public static final java.lang.String COPYRIGHT
protected AbstractConfigBasedClassicHandler()
protected AbstractConfigBasedClassicHandler(TypeConverterRegistry pTypeConverterRegistry, ModelParser pModelParser, MappingProfileParser pMappingProfileParser, FillerFactory fillerFactory)
public javax.ws.rs.core.Response executeConfigBasedBeanWithContext(java.lang.String beanClassName, java.lang.String profileName, java.lang.String responseFormat, java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap)
public javax.ws.rs.core.Response executeConfigBasedCommandWithContext(java.lang.String commandInterfaceName, java.lang.String profileName, java.lang.String responseFormat, java.lang.String storeId, java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap)
public org.apache.commons.json.JSONObject executeConfigBasedBean(java.lang.String beanClassName, java.lang.String profileName, java.lang.String responseFormat, java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap) throws java.lang.Exception
The input parameters will automatically be filled in based on any path parameters specified in the URL followed by any query parameters. An override map can be provided to inject more parameters or override pre-existing parameters.
public org.apache.commons.json.JSONObject executeConfigBasedCommand(java.lang.String pCmdInterfaceName, java.lang.String profileName, java.lang.String responseFormat, java.lang.String storeId, java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap) throws java.lang.Exception
The input parameters will automatically be filled in based on any path parameters specified in the URL followed by any parameters found in the request body. An override map can be provided to inject more parameters or override pre-existing parameters.
Although the store ID is specified in the method call, it will not be automatically included in the list of parameters provided to populate the setters of the command. You must explicitly add it to the override map, or have it included via the URL path parameters or request body.
protected org.apache.commons.json.JSONObject composeResponseFromMappingProfile(ClassModel classModel, java.lang.Object container, MappingProfile profile) throws RestException
protected java.lang.Class<? extends DataBean> loadBeanClass(java.lang.String pBeanClassName) throws RestException
protected java.lang.Class<? extends ControllerCommand> loadControllerCommandClass(java.lang.String pCommandInterfaceName) throws RestException
protected ControllerCommand createControllerCommand(java.lang.String storeId, model) throws RestException
protected void execute(java.lang.String cmdRefKey, TypedProperty requestProperties, java.lang.String responseFormat, ControllerCommand pCmd) throws java.lang.Exception