|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.acsinet_solutions.cetia4.controller.rest.RestModuleSupport
public abstract class RestModuleSupport
Base class for nested REST modules. The default modules' name will be taken from the module class name without the Module suffix.
Concrete subclasses should end their names with the Module suffix, and the REST level name that will be used in path info paths will be obtained eliminating that suffix ( if any ) and passing the first name of the class to lowercase. In that way, no additional configuration is needed. Maybe an annotation will be created later to provide alternatives for module naming, but that won't be done until needed.
| Field Summary |
|---|
| Fields inherited from interface com.acsinet_solutions.cetia4.controller.ControllerConstants |
|---|
_METHOD_PARAM, _PAGE_PARAM, _ROOT_PARAM, DEFAULT_VIEW, ERROR_URL, ERROR_VIEW, LOAD_CANCEL, LOAD_CURRENT, LOAD_DEFAULT, LOAD_ERROR, LOAD_PREVIOUS |
| Fields inherited from interface com.acsinet_solutions.cetia4.controller.AttributeKeys |
|---|
_BUNDLE_KEY, _CONFIGURATION_KEY, _DEFAULT_CONTROLLER_KEY, _FORM_ACTION_KEY, _FORM_ATTRIBUTE_KEY, _LOCALE_KEY, _MESSAGE_KEY, _NAVIGATION_FLOW_KEY, _PORTAL_PATH_KEY, _RENDER_PARAMETERS_KEY, _SERVICE_LOCATOR_KEY, _SESSION_KEY, _SYSTEM_EXCEPTION_KEY, _VALIDATION_EXCEPTION_KEY |
| Constructor Summary | |
|---|---|
RestModuleSupport()
A root REST module reference. |
|
RestModuleSupport(RestModule parent)
A rest module with 0-nested index. |
|
RestModuleSupport(RestModule parent,
int nestedIndex)
A rest module with a nonnegative nested index. |
|
| Method Summary | |
|---|---|
Configuration |
getConfiguration()
Get a reference to the configuration instance for the current module. |
ServiceLocator |
getLocator()
Get the service locator reference, if any was configured. |
org.apache.commons.logging.Log |
getLogger()
Get the logger for the current servlet. |
java.lang.String |
getModuleName()
Get the REST module name; this will be used in mappings and path-info to identify if a request belongs or not to the current module. |
int |
getNestedIndex()
Get the nested index of available path-info params between this module and the previous one. |
java.util.List<RestModule> |
getNestedModules()
Get the not-null maybe empty list of nested modules inside this instance. |
RestModule |
getParentModule()
Get the parent module; servlets have no parent module and return null; other components always return not null. |
RestModule |
getRootModule()
Returns the parent root module. |
protected void |
nest(java.lang.Class<? extends RestModuleSupport> c)
Add a nested rest module that will be dynamically enhanced. |
protected void |
nest(RestModule module)
Add a nested rest module. |
void |
setConfiguration(Configuration configuration)
Set the configuration instance; this will be called by a dynamic factory |
void |
setParentModule(RestModule parent)
Set the parent module; this will be called by a dynamic factory |
void |
setServiceLocator(ServiceLocator serviceLocator)
Set the service locator; this will be called by a dynamic factory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RestModuleSupport()
public RestModuleSupport(RestModule parent)
public RestModuleSupport(RestModule parent,
int nestedIndex)
| Method Detail |
|---|
public void setParentModule(RestModule parent)
public void setServiceLocator(ServiceLocator serviceLocator)
serviceLocator - A not-null valid referencepublic void setConfiguration(Configuration configuration)
serviceLocator - A not-null valid referencepublic final java.util.List<RestModule> getNestedModules()
RestModule
getNestedModules in interface RestModulepublic final RestModule getParentModule()
RestModule
getParentModule in interface RestModulepublic final RestModule getRootModule()
getRootModule in interface RestModulepublic final int getNestedIndex()
RestModule
getNestedIndex in interface RestModulepublic final java.lang.String getModuleName()
RestModule
getModuleName in interface RestModulepublic final org.apache.commons.logging.Log getLogger()
RestModule
getLogger in interface RestModulepublic ServiceLocator getLocator()
RestModule
getLocator in interface RestModulepublic Configuration getConfiguration()
RestModule
getConfiguration in interface RestModuleprotected final void nest(RestModule module)
protected final void nest(java.lang.Class<? extends RestModuleSupport> c)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||