org.objectweb.jonas.webapp.jonasadmin.joramplatform
Class EditJoramBaseAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction
          extended by org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction
              extended by org.objectweb.jonas.webapp.jonasadmin.joramplatform.EditJoramBaseAction
Direct Known Subclasses:
AddJoramReaderAction, AddJoramWriterAction, ApplyJoramQueueAction, ApplyJoramReaderAction, ApplyJoramTopicAction, ApplyJoramWriterAction, CreateJoramDestinationAction, CreateJoramLocalDestinationAction, CreateJoramUserAction, EditJoramDestinationAction, EditJoramLocalServerAction, EditJoramPlatformAction, EditJoramQueueAction, EditJoramRemoteServerAction, EditJoramResourceAdapterAction, EditJoramServerAction, EditJoramTopicAction, EditJoramUserAction, ExportRepository, ListJoramServersAction, ListLocalDestinationsAction, ListRemoteDestinationsAction, ReloadJoramAdmin

public abstract class EditJoramBaseAction
extends BaseDeployAction

Author:
Adriana Danes

Field Summary
 
Fields inherited from class org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction
DEPTH_DOMAIN, DEPTH_SERVER, m_Errors, m_Resources, m_Session, m_WhereAreYou
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
EditJoramBaseAction()
           
 
Method Summary
static java.lang.String currentServerId(java.lang.String id)
          Determine the server Id from a String structure as follows: id=#x.y.z.
protected  java.util.ArrayList getBaseItemList(java.util.List inputList, java.lang.String serverName)
          Treat a list (Vector) of Joram user items (example: User[anonymous]:#0.0.1035)
 ItemDestination getDestinationItem(java.lang.String joramAdminDestination, java.lang.String serverName)
          Create a ItemDestination object from a String structured as follows: type=queue/topic, name=destName, id=#x.y.z
protected  java.lang.String getPathToExportRepository()
           
protected  java.lang.String getPathToReloadJoramAdmin()
          Get the path to the joramAdmin.xml file
protected  void getStatistics(javax.management.ObjectName destOn, MonitoringDestForm oMonitForm, DestinationForm oForm, java.lang.String serverName)
           
protected  ItemUser getUserItem(java.lang.String joramAdminUser, java.lang.String serverName)
          Create a ItemUser object from a String structured as follows: User[anonymous]:#0.0.1035
protected  java.lang.String getUserName(java.lang.String userId, java.lang.String jonasServerName)
          Return the name of the User corresponding to a given agent id
protected  javax.management.ObjectName getUserOn(java.lang.String userId, java.lang.String serverName)
          Return the ObjectName of the User MBean corresponding to a given agent id
protected  boolean hasDeps(java.lang.String pDestName, java.lang.String jonasServerName)
           
protected  void initRefs(java.lang.String jonasServerName)
           
protected  void populate(DestinationForm p_Form)
           
protected  void populateDestination(javax.management.ObjectName destOn, DestinationForm oForm, java.lang.String serverName)
           
 void printDestination(ItemDestination dest, java.lang.String serverName)
           
protected  org.apache.struts.action.ActionForward treatError(java.lang.Throwable pThrowable, org.apache.struts.action.ActionMapping pMapping, javax.servlet.http.HttpServletRequest pRequest)
          Treat specific case where Joram RAR was unloaded
protected  void updateReadablesWriteables(DestinationForm pForm, java.lang.String jonasServerName)
           
 
Methods inherited from class org.objectweb.jonas.webapp.jonasadmin.deploy.BaseDeployAction
deploy, deployDataSource, deployMailFactory, getCurrentJonasDeployment, getDomainDeploymentMethodName, getDomainUploadDeployMethodName, getForwardEdit, getListDeployableFiles, getListDeployedFiles, isConfigurable, isDomain, isModule, refreshJoramTree, refreshMBeansTree, refreshServiceTree, refreshTree, refreshWebServiceTree, removeFile, runGC, setCurrentJonasDeployment, undeploy, undeployDataSource, undeployMailFactory
 
Methods inherited from class org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction
addGlobalError, execute, executeAction, getBooleanAttribute, getBooleanAttribute, getBooleanAttribute, getIntegerAttribute, getIntegerAttribute, getIntegerAttribute, getJonasBase, getListAttribute, getLongAttribute, getLongAttribute, getLongAttribute, getPropsFromString, getShortAttribute, getStringArrayAttribute, getStringAttribute, getStringAttribute, getStringAttribute, getTreeBranchName, initialize, refreshDomainDeployTree, refreshDomainMonitoringTree, refreshServerTree, removeChar, setBooleanAttribute, setBooleanAttribute, setIntegerAttribute, setIntegerAttribute, setIntegerAttribute, setLongAttribute, setLongAttribute, setShortAttribute, setStringAttribute, setStringAttribute, setStringAttribute, toStringBooleanAttribute, toStringIntegerAttribute, toStringLongAttribute, toStringShortAttribute
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, 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
 

Constructor Detail

EditJoramBaseAction

public EditJoramBaseAction()
Method Detail

treatError

protected org.apache.struts.action.ActionForward treatError(java.lang.Throwable pThrowable,
                                                            org.apache.struts.action.ActionMapping pMapping,
                                                            javax.servlet.http.HttpServletRequest pRequest)
Treat specific case where Joram RAR was unloaded

Parameters:
t - Exception to treat
pMapping - provided by executeAction
pRequest - provided by executeAction
Returns:

getPathToExportRepository

protected java.lang.String getPathToExportRepository()

getPathToReloadJoramAdmin

protected java.lang.String getPathToReloadJoramAdmin()
Get the path to the joramAdmin.xml file

Returns:

getDestinationItem

public ItemDestination getDestinationItem(java.lang.String joramAdminDestination,
                                          java.lang.String serverName)
                                   throws javax.management.MalformedObjectNameException
Create a ItemDestination object from a String structured as follows: type=queue/topic, name=destName, id=#x.y.z

Parameters:
joramAdminDestination - String containing destination description
serverName - the name of the JOnAS server to which the current JORAM server is connected
Returns:
ItemDestination containing name, type, id and ObjectName of the MBean associated to the corresponding destination
Throws:
javax.management.MalformedObjectNameException - could not construct destination ObjectName

getUserItem

protected ItemUser getUserItem(java.lang.String joramAdminUser,
                               java.lang.String serverName)
                        throws javax.management.MalformedObjectNameException
Create a ItemUser object from a String structured as follows: User[anonymous]:#0.0.1035

Parameters:
joramAdminUser - String containing user description
serverName - the name of the JOnAS server to which the current JORAM server is connected
Returns:
ItemUser containing name and ObjectName of the MBean associated to the corresponding user
Throws:
javax.management.MalformedObjectNameException

getUserOn

protected javax.management.ObjectName getUserOn(java.lang.String userId,
                                                java.lang.String serverName)
Return the ObjectName of the User MBean corresponding to a given agent id

Parameters:
userId - Agent id for a user (#x.y.z.)
serverName - the name of the JOnAS server to which the current JORAM server is connected
Returns:
the Objectname of the User MBean having the ProxyId attribute equal to the userId

getUserName

protected java.lang.String getUserName(java.lang.String userId,
                                       java.lang.String jonasServerName)
Return the name of the User corresponding to a given agent id

Parameters:
userId - Agent id for a user (#x.y.z.)
jonasServerName - the name of the JOnAS server to which the current JORAM server is connected
Returns:
the value of the name attribute of the User MBean having the ProxyId attribute equal to the userId

printDestination

public void printDestination(ItemDestination dest,
                             java.lang.String serverName)

initRefs

protected void initRefs(java.lang.String jonasServerName)

hasDeps

protected boolean hasDeps(java.lang.String pDestName,
                          java.lang.String jonasServerName)

currentServerId

public static java.lang.String currentServerId(java.lang.String id)
Determine the server Id from a String structure as follows: id=#x.y.z. The serrver id to be returned is "y"

Parameters:
id - #x.y.z
Returns:
y

populateDestination

protected void populateDestination(javax.management.ObjectName destOn,
                                   DestinationForm oForm,
                                   java.lang.String serverName)
                            throws javax.management.MalformedObjectNameException
Throws:
javax.management.MalformedObjectNameException

getBaseItemList

protected java.util.ArrayList getBaseItemList(java.util.List inputList,
                                              java.lang.String serverName)
                                       throws javax.management.MalformedObjectNameException
Treat a list (Vector) of Joram user items (example: User[anonymous]:#0.0.1035)

Parameters:
inputList - list of Joram user items
Returns:
a list of user item objects (ItemUser type)
Throws:
javax.management.MalformedObjectNameException

getStatistics

protected void getStatistics(javax.management.ObjectName destOn,
                             MonitoringDestForm oMonitForm,
                             DestinationForm oForm,
                             java.lang.String serverName)

populate

protected void populate(DestinationForm p_Form)
                 throws java.lang.Exception
Throws:
java.lang.Exception

updateReadablesWriteables

protected void updateReadablesWriteables(DestinationForm pForm,
                                         java.lang.String jonasServerName)