org.objectweb.jonas.webapp.jonasadmin.security
Class BaseMemoryRealmAction

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.security.BaseSecurityAction
                  extended by org.objectweb.jonas.webapp.jonasadmin.security.BaseMemoryRealmAction
Direct Known Subclasses:
ApplyConfirmMemoryRealmAction, ApplyDatasourceRealmAction, ApplyGroupMemoryRealmAction, ApplyLdapRealmAction, ApplyMemoryRealmAction, ApplyRoleMemoryRealmAction, ApplyUserMemoryRealmAction, EditGroupMemoryRealmAction, EditMemoryRealmAction, EditMemoryRealmGroupsAction, EditMemoryRealmRolesAction, EditMemoryRealmUsersAction, EditNewGroupMemoryRealmAction, EditNewRoleMemoryRealmAction, EditNewUserMemoryRealmAction, EditRoleMemoryRealmAction, EditUserMemoryRealmAction, ListRealmsAction

public abstract class BaseMemoryRealmAction
extends BaseSecurityAction


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
BaseMemoryRealmAction()
           
 
Method Summary
protected  java.lang.String encryptPassword(java.lang.String p_Password, java.lang.String p_EncrypMethod, java.lang.String jonasServerName)
          Encrypt a password with MBean security service method.
protected  MemoryRealmForm getForm(org.apache.struts.action.ActionMapping p_Mapping, javax.servlet.http.HttpServletRequest p_Request)
           
protected  void populateGroupForm(MemoryRealmForm p_RealmForm, GroupMemoryRealmForm p_GroupForm, java.lang.String p_GroupName, java.lang.String jonasServerName)
          Populate the GroupMemoryRealmForm with MBeans.
protected  void populateRoleForm(MemoryRealmForm p_RealmForm, RoleMemoryRealmForm p_RoleForm, java.lang.String p_RoleName)
          Populate the RoleMemoryRealmForm with MBeans.
protected  void populateUserForm(MemoryRealmForm p_RealmForm, UserMemoryRealmForm p_UserForm, java.lang.String p_UserName, java.lang.String jonasServerName)
          Populate the UserMemoryRealmForm with MBeans.
protected  void removeItemsMemoryRealmForm(java.lang.String p_Type)
          Remove of session the ItemsMemoryRealmForm instance if the given type is different of the current type.
 
Methods inherited from class org.objectweb.jonas.webapp.jonasadmin.security.BaseSecurityAction
refreshSecurityTree, refreshTree
 
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, 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

BaseMemoryRealmAction

public BaseMemoryRealmAction()
Method Detail

getForm

protected MemoryRealmForm getForm(org.apache.struts.action.ActionMapping p_Mapping,
                                  javax.servlet.http.HttpServletRequest p_Request)

removeItemsMemoryRealmForm

protected void removeItemsMemoryRealmForm(java.lang.String p_Type)
Remove of session the ItemsMemoryRealmForm instance if the given type is different of the current type.

Parameters:
p_Type - Current type (user, role, group)

populateUserForm

protected void populateUserForm(MemoryRealmForm p_RealmForm,
                                UserMemoryRealmForm p_UserForm,
                                java.lang.String p_UserName,
                                java.lang.String jonasServerName)
                         throws java.lang.Exception
Populate the UserMemoryRealmForm with MBeans. If the user name is null, the User MBean is not called to populate the form.

Parameters:
p_RealmForm - Used for the resource name
p_UserForm - Form to populate
p_UserName - The user (Can be null)
Throws:
java.lang.Exception

encryptPassword

protected java.lang.String encryptPassword(java.lang.String p_Password,
                                           java.lang.String p_EncrypMethod,
                                           java.lang.String jonasServerName)
                                    throws java.lang.Exception
Encrypt a password with MBean security service method.

Parameters:
p_Password - Password to encrypt
p_EncrypMethod - MD5 or SHA string
Returns:
The encrypted password
Throws:
java.lang.Exception

populateRoleForm

protected void populateRoleForm(MemoryRealmForm p_RealmForm,
                                RoleMemoryRealmForm p_RoleForm,
                                java.lang.String p_RoleName)
                         throws java.lang.Exception
Populate the RoleMemoryRealmForm with MBeans. If the Role name is null, the Role MBean is not called to populate the form.

Parameters:
p_RealmForm - Used for the resource name
p_RoleForm - Form to populate
p_RoleName - The user (Can be null)
Throws:
java.lang.Exception

populateGroupForm

protected void populateGroupForm(MemoryRealmForm p_RealmForm,
                                 GroupMemoryRealmForm p_GroupForm,
                                 java.lang.String p_GroupName,
                                 java.lang.String jonasServerName)
                          throws java.lang.Exception
Populate the GroupMemoryRealmForm with MBeans. If the user name is null, the Group MBean is not called to populate the form.

Parameters:
p_RealmForm - Used for the resource name
p_GroupForm - Form to populate
p_GroupName - The user (Can be null)
Throws:
java.lang.Exception