org.jafer.registry.web.struts.action
Class JaferRegistryAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.jafer.registry.web.struts.action.JaferRegistryAction
Direct Known Subclasses:
AddAccessPointAction, AddCategoryAction, AddServiceAction, CheckLogonStatusAction, CreateProviderAction, CreateServiceAction, DeleteProviderAction, DeleteServiceAction, GetAccessPointAction, GetCategoryProtocolTypesAction, GetCategoryTypesAction, GetProtocolTypesAction, GetReturnPageAction, LogoffAction, LogonAction, RelayAction, RemoveAccessPointAction, RemoveCategoryAction, RemoveServiceAction, RequiresLogonAction, SearchAccessPointAction, SearchProviderAction, SearchServiceAction, SetNewTokenAction, SetReturnPageAction, UpdateAccessPointAction, UpdateProviderAction, UpdateServiceAction, ViewProviderAction, ViewProviderServicesAction, ViewServiceAction

public abstract class JaferRegistryAction
extends org.apache.struts.action.Action

Super class for all actions providing common functions


Field Summary
protected  org.apache.struts.validator.DynaValidatorActionForm dynaForm
          Stores a reference to the DynaValidatorActionForm
protected  org.apache.struts.action.ActionMapping mapping
          Stores a reference to the mapping
protected  javax.servlet.http.HttpServletRequest request
          Stores a reference to the request
protected  javax.servlet.http.HttpServletResponse response
          Stores a reference to the response
protected  javax.servlet.http.HttpSession session
          Stores a reference to the session
protected static java.lang.String SUCCESS
          Stores a reference to the SUCCESS MAPPING
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
JaferRegistryAction()
           
 
Method Summary
protected  void addErrorMessage(java.lang.String messageKey)
          Adds the message looked up from the resource bundle
protected  void addInfoMessage(java.lang.String messageKey)
          Adds the message looked up from the resource bundle
protected  org.apache.struts.action.ActionForward getActionForward()
          Get the action forward for the submit action
protected  org.apache.struts.action.ActionForward getActionForward(java.lang.String key)
          Get the action forward for the key
protected  org.apache.struts.action.ActionForward getErrorPage()
          Returns an action forward to the standard error page
protected  RegistryManager getRegistryManager()
          Get the registry manager creating it if it does not exist
protected  java.lang.String getReturnPage()
          Gets the current return page
protected  ServiceLocator getServiceLocator()
          Get the service locator creating it if it does not exist
protected  ServiceManager getServiceManager()
          Get the service manager
 void initAction(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Saves all the paramaters for use
protected  void setReturnPage()
          Stores the current return page into the session
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

protected javax.servlet.http.HttpSession session
Stores a reference to the session


mapping

protected org.apache.struts.action.ActionMapping mapping
Stores a reference to the mapping


request

protected javax.servlet.http.HttpServletRequest request
Stores a reference to the request


response

protected javax.servlet.http.HttpServletResponse response
Stores a reference to the response


dynaForm

protected org.apache.struts.validator.DynaValidatorActionForm dynaForm
Stores a reference to the DynaValidatorActionForm


SUCCESS

protected static final java.lang.String SUCCESS
Stores a reference to the SUCCESS MAPPING

See Also:
Constant Field Values
Constructor Detail

JaferRegistryAction

public JaferRegistryAction()
Method Detail

initAction

public void initAction(org.apache.struts.action.ActionMapping mapping,
                       org.apache.struts.action.ActionForm form,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws RegistryException,
                       java.io.IOException,
                       javax.servlet.ServletException
Saves all the paramaters for use

Parameters:
mapping - The struts action mapping
form - The action form sent in the request
request - The request object
response - The response object
Throws:
java.io.IOException
javax.servlet.ServletException
RegistryException

setReturnPage

protected void setReturnPage()
Stores the current return page into the session


getReturnPage

protected java.lang.String getReturnPage()
Gets the current return page

Returns:
The current return page

getRegistryManager

protected RegistryManager getRegistryManager()
                                      throws RegistryException
Get the registry manager creating it if it does not exist

Returns:
An instance of the the registry manager
Throws:
RegistryException

getServiceLocator

protected ServiceLocator getServiceLocator()
                                    throws RegistryException
Get the service locator creating it if it does not exist

Returns:
An instance of the the service locator
Throws:
RegistryException

getServiceManager

protected ServiceManager getServiceManager()
                                    throws RegistryException
Get the service manager

Returns:
An instance of the the service manager
Throws:
RegistryException

getActionForward

protected org.apache.struts.action.ActionForward getActionForward()
Get the action forward for the submit action

Returns:
The Action Forward to return

getActionForward

protected org.apache.struts.action.ActionForward getActionForward(java.lang.String key)
Get the action forward for the key

Parameters:
key - The key to lookup in the action mapping
Returns:
The Action Forward to return

getErrorPage

protected org.apache.struts.action.ActionForward getErrorPage()
Returns an action forward to the standard error page

Returns:
The standard error page forward path

addInfoMessage

protected void addInfoMessage(java.lang.String messageKey)
Adds the message looked up from the resource bundle

Parameters:
messageKey - The key to lookup

addErrorMessage

protected void addErrorMessage(java.lang.String messageKey)
Adds the message looked up from the resource bundle

Parameters:
messageKey - The key to lookup