org.objectweb.jonas.webapp.jonasadmin
Class JonasBaseAction

java.lang.Object
  extended byAction
      extended byorg.objectweb.jonas.webapp.jonasadmin.JonasBaseAction
Direct Known Subclasses:
ApplyConfirmRealmsAction, ApplyDatasourceAction, ApplyDatasourcePropertiesAction, ApplyDatasourcePropsConfirmAction, ApplyLoggingJonasAction, ApplyMemoryAction, ApplyMonitoringAction, ApplyRealmsAction, BaseDeployAction, BaseMemoryRealmAction, CatalinaBaseAction, EditContainerAction, EditContainerStatisticAction, EditDatasourceAction, EditDatasourcePropertiesAction, EditDatasourceRealmAction, EditEarAction, EditEjbAction, EditEjbCsStatisticAction, EditJmxServerAction, EditJonasServerAction, EditLdapRealmAction, EditLoggingJonasAction, EditMemoryAction, EditMonitoringAction, EditWarAction, JonasServerRunGCAction, JonasServerStopAction, ListAppContainersAction, ListContainersAction, ListDatabasesAction, ListDatasourcesAction, ListRegistryAction, ListWebContainersAction, SetupWhereAreYouAction

public abstract class JonasBaseAction
extends Action

See Also:
Serialized Form

Field Summary
protected  ActionErrors m_Errors
           
protected  MessageResources m_Resources
          The MessageResources we will be retrieving messages from.
protected  javax.servlet.http.HttpSession m_Session
           
 
Constructor Summary
JonasBaseAction()
           
 
Method Summary
protected  void addGlobalError(java.lang.Throwable p_Throwable)
          Add a global error in m_Errorsinstance of m_ErrorsActionErrors and log it.
abstract  ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form, javax.servlet.http.HttpServletRequest p_Request, javax.servlet.http.HttpServletResponse p_Response)
           
protected  boolean getBooleanAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName)
          MBean ObjectName accessor.
protected  boolean getBooleanAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName)
          Properties accessor.
protected  boolean getBooleanAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName, boolean p_Default)
          Properties accessor.
protected  int getIntegerAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName)
          MBean ObjectName accessor.
protected  int getIntegerAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName)
          Properties accessor.
protected  int getIntegerAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName, int p_Default)
          Properties accessor.
protected  long getLongAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName)
          MBean ObjectName accessor.
protected  long getLongAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName)
          Properties accessor.
protected  long getLongAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName, long p_Default)
          Properties accessor.
protected  java.lang.String getStringAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName)
          MBean ObjectName accessor.
protected  java.lang.String getStringAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName)
          Properties accessor.
protected  java.lang.String getStringAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName, java.lang.String p_Default)
          Properties accessor.
 ActionForward perform(ActionMapping p_Mapping, ActionForm p_Form, javax.servlet.http.HttpServletRequest p_Request, javax.servlet.http.HttpServletResponse p_Response)
          Process the specified HTTP request, and create the corresponding HTTP response (or forward to another web component that will create it).
protected  void setBooleanAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName, boolean p_Value)
          MBean ObjectName accessor.
protected  void setBooleanAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName, boolean p_Value)
          Properties accessor.
protected  void setIntegerAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName, int p_Value)
          MBean ObjectName accessor.
protected  void setIntegerAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName, java.lang.String p_Value)
          MBean ObjectName accessor.
protected  void setIntegerAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName, int p_Value)
          Properties accessor.
protected  void setLongAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName, long p_Value)
          MBean ObjectName accessor.
protected  void setLongAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName, long p_Value)
          Properties accessor.
protected  void setStringAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName, java.lang.String p_Value)
          MBean ObjectName accessor.
protected  void setStringAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName, java.lang.String p_Value)
          Properties accessor.
protected  void setStringAttribute(java.util.Properties p_Props, java.lang.String ps_AttrName, java.lang.String p_Value, java.lang.String p_Default)
          Properties accessor.
protected  java.lang.String toStringBooleanAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName)
          MBean ObjectName accessor.
protected  java.lang.String toStringIntegerAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName)
          MBean ObjectName accessor.
protected  java.lang.String toStringLongAttribute(javax.management.ObjectName p_ObjectName, java.lang.String ps_AttrName)
          MBean ObjectName accessor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Resources

protected MessageResources m_Resources
The MessageResources we will be retrieving messages from.


m_Session

protected javax.servlet.http.HttpSession m_Session

m_Errors

protected ActionErrors m_Errors
Constructor Detail

JonasBaseAction

public JonasBaseAction()
Method Detail

executeAction

public abstract ActionForward executeAction(ActionMapping p_Mapping,
                                            ActionForm p_Form,
                                            javax.servlet.http.HttpServletRequest p_Request,
                                            javax.servlet.http.HttpServletResponse p_Response)
                                     throws java.io.IOException,
                                            javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

perform

public ActionForward perform(ActionMapping p_Mapping,
                             ActionForm p_Form,
                             javax.servlet.http.HttpServletRequest p_Request,
                             javax.servlet.http.HttpServletResponse p_Response)
                      throws java.io.IOException,
                             javax.servlet.ServletException
Process the specified HTTP request, and create the corresponding HTTP response (or forward to another web component that will create it). Return an ActionForward instance describing where and how control should be forwarded, or null if the response has already been completed.

Parameters:
p_Mapping - The ActionMapping used to select this instance
p_Form - The optional ActionForm bean for this request (if any)
p_Request - The HTTP request we are processing
p_Response - The HTTP response we are creating
Returns:
The forward where redirect
Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet exception occurs

addGlobalError

protected void addGlobalError(java.lang.Throwable p_Throwable)
Add a global error in m_Errorsinstance of m_ErrorsActionErrors and log it.

Parameters:
p_Throwable - Error to add

getStringAttribute

protected java.lang.String getStringAttribute(javax.management.ObjectName p_ObjectName,
                                              java.lang.String ps_AttrName)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
Returns:
The value of attribute

setStringAttribute

protected void setStringAttribute(javax.management.ObjectName p_ObjectName,
                                  java.lang.String ps_AttrName,
                                  java.lang.String p_Value)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
p_Value - Value to write

getIntegerAttribute

protected int getIntegerAttribute(javax.management.ObjectName p_ObjectName,
                                  java.lang.String ps_AttrName)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
Returns:
The value of attribute

toStringIntegerAttribute

protected java.lang.String toStringIntegerAttribute(javax.management.ObjectName p_ObjectName,
                                                    java.lang.String ps_AttrName)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
Returns:
The value of attribute

setIntegerAttribute

protected void setIntegerAttribute(javax.management.ObjectName p_ObjectName,
                                   java.lang.String ps_AttrName,
                                   int p_Value)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
p_Value - Value to write

setIntegerAttribute

protected void setIntegerAttribute(javax.management.ObjectName p_ObjectName,
                                   java.lang.String ps_AttrName,
                                   java.lang.String p_Value)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
p_Value - Value to write

getLongAttribute

protected long getLongAttribute(javax.management.ObjectName p_ObjectName,
                                java.lang.String ps_AttrName)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
Returns:
The value of attribute

toStringLongAttribute

protected java.lang.String toStringLongAttribute(javax.management.ObjectName p_ObjectName,
                                                 java.lang.String ps_AttrName)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
Returns:
The value of attribute

setLongAttribute

protected void setLongAttribute(javax.management.ObjectName p_ObjectName,
                                java.lang.String ps_AttrName,
                                long p_Value)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
p_Value - Value to write

getBooleanAttribute

protected boolean getBooleanAttribute(javax.management.ObjectName p_ObjectName,
                                      java.lang.String ps_AttrName)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
Returns:
The value of attribute

toStringBooleanAttribute

protected java.lang.String toStringBooleanAttribute(javax.management.ObjectName p_ObjectName,
                                                    java.lang.String ps_AttrName)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
Returns:
The value of attribute

setBooleanAttribute

protected void setBooleanAttribute(javax.management.ObjectName p_ObjectName,
                                   java.lang.String ps_AttrName,
                                   boolean p_Value)
MBean ObjectName accessor.

Parameters:
p_ObjectName - Instance of ObjectName to access to MBean
ps_AttrName - Attribute name of MBean
p_Value - Value to write

getStringAttribute

protected java.lang.String getStringAttribute(java.util.Properties p_Props,
                                              java.lang.String ps_AttrName)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
Returns:
The value of attribute

getStringAttribute

protected java.lang.String getStringAttribute(java.util.Properties p_Props,
                                              java.lang.String ps_AttrName,
                                              java.lang.String p_Default)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
p_Default - The returned value if the attribute don't exists in the properties
Returns:
The value of attribute

setStringAttribute

protected void setStringAttribute(java.util.Properties p_Props,
                                  java.lang.String ps_AttrName,
                                  java.lang.String p_Value)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
p_Value - Value to write

setStringAttribute

protected void setStringAttribute(java.util.Properties p_Props,
                                  java.lang.String ps_AttrName,
                                  java.lang.String p_Value,
                                  java.lang.String p_Default)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
p_Value - Value to write
p_Default - The forced value if the value is null or empty

getIntegerAttribute

protected int getIntegerAttribute(java.util.Properties p_Props,
                                  java.lang.String ps_AttrName)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
Returns:
The value of attribute (return 0 if attribute don't exists)

getIntegerAttribute

protected int getIntegerAttribute(java.util.Properties p_Props,
                                  java.lang.String ps_AttrName,
                                  int p_Default)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
p_Default - The returned value if the attribute don't exists in the properties
Returns:
The value of attribute

setIntegerAttribute

protected void setIntegerAttribute(java.util.Properties p_Props,
                                   java.lang.String ps_AttrName,
                                   int p_Value)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
p_Value - Value to write

getLongAttribute

protected long getLongAttribute(java.util.Properties p_Props,
                                java.lang.String ps_AttrName)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
Returns:
The value of attribute (return 0 if attribute don't exists)

getLongAttribute

protected long getLongAttribute(java.util.Properties p_Props,
                                java.lang.String ps_AttrName,
                                long p_Default)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
p_Default - The returned value if the attribute don't exists in the properties
Returns:
The value of attribute

setLongAttribute

protected void setLongAttribute(java.util.Properties p_Props,
                                java.lang.String ps_AttrName,
                                long p_Value)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
p_Value - Value to write

getBooleanAttribute

protected boolean getBooleanAttribute(java.util.Properties p_Props,
                                      java.lang.String ps_AttrName)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
Returns:
The value of attribute (return false if attribute don't exists)

getBooleanAttribute

protected boolean getBooleanAttribute(java.util.Properties p_Props,
                                      java.lang.String ps_AttrName,
                                      boolean p_Default)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
p_Default - The returned value if the attribute don't exists in the properties
Returns:
The value of attribute

setBooleanAttribute

protected void setBooleanAttribute(java.util.Properties p_Props,
                                   java.lang.String ps_AttrName,
                                   boolean p_Value)
Properties accessor.

Parameters:
p_Props - Instance of Properties
ps_AttrName - Attribute name of Properties
p_Value - Value to write