Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.permission.form
Class UserGroupPermissibleForm  view UserGroupPermissibleForm download UserGroupPermissibleForm.java

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended bycom.RuntimeCollective.permission.form.UserGroupPermissibleForm
All Implemented Interfaces:
com.RuntimeCollective.webapps.form.BeanForm, java.io.Serializable

public class UserGroupPermissibleForm
extends org.apache.struts.action.ActionForm
implements com.RuntimeCollective.webapps.form.BeanForm

Form to configure several actions of a Permissible, by choosing one or many UserGroups from a list.

This is similar to PermissibleUserGroupPermissionRuleForm, but much more flexible.

Caveat: selecting no groups for an action means all users are accepted.

Version:
$Id: UserGroupPermissibleForm.java,v 1.7 2003/09/30 15:12:50 joe Exp $

Field Summary
protected  java.lang.String[] actions
          The actions which we are configuring now.
protected  java.lang.String formAction
          What the form is used for: "edit".
protected  java.lang.String parentPermissibleId
          The parentPermissible's id: used by some JSPs to inherit permissions, and by some actions to check whether the user is authorised to perform.
protected  java.lang.String permissibleId
          The permissible's id.
protected  java.lang.String[] permissions
          The permissions: an Array of 'action.groupId' Strings.
protected  java.lang.String returnPath
          The returnPath.
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
UserGroupPermissibleForm()
           
 
Method Summary
 java.lang.String[] getActions()
           
 java.lang.String getFormAction()
          Get the action that this form is being used for, such as "register" a new bean, or "delete" or "edit" an existing one.
 java.lang.String getParentPermissibleId()
           
 java.lang.String getPermissibleId()
           
 java.lang.String[] getPermissions()
           
 java.lang.String getReturnPath()
           
 com.RuntimeCollective.webapps.bean.EntityBean populateBean(com.RuntimeCollective.webapps.bean.EntityBean bean)
          This saves the PermissionRules, but not the Permissible.
 void populateForm(com.RuntimeCollective.webapps.bean.EntityBean bean)
          This doesn't populate the permissions.
 void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Reset all properties to default values.
 void setActions(java.lang.String[] perms)
           
 void setFormAction(java.lang.String action)
          Set the action that this form is being used for, such as "register" a new bean, or "delete" or "edit" an existing one.
 void setParentPermissibleId(java.lang.String id)
           
 void setPermissibleId(java.lang.String id)
           
 void setPermissions(java.lang.String[] perms)
           
 void setReturnPath(java.lang.String returnPath)
           
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Validate the properties that have been set for this HTTP request, and return an ActionErrors object that encapsulates any validation errors that have been found.
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

formAction

protected java.lang.String formAction
What the form is used for: "edit".


permissibleId

protected java.lang.String permissibleId
The permissible's id.


parentPermissibleId

protected java.lang.String parentPermissibleId
The parentPermissible's id: used by some JSPs to inherit permissions, and by some actions to check whether the user is authorised to perform.


permissions

protected java.lang.String[] permissions
The permissions: an Array of 'action.groupId' Strings.


actions

protected java.lang.String[] actions
The actions which we are configuring now.


returnPath

protected java.lang.String returnPath
The returnPath.

Constructor Detail

UserGroupPermissibleForm

public UserGroupPermissibleForm()
Method Detail

getFormAction

public java.lang.String getFormAction()
Description copied from interface: com.RuntimeCollective.webapps.form.BeanForm
Get the action that this form is being used for, such as "register" a new bean, or "delete" or "edit" an existing one.

Specified by:
getFormAction in interface com.RuntimeCollective.webapps.form.BeanForm

setFormAction

public void setFormAction(java.lang.String action)
Description copied from interface: com.RuntimeCollective.webapps.form.BeanForm
Set the action that this form is being used for, such as "register" a new bean, or "delete" or "edit" an existing one.

Specified by:
setFormAction in interface com.RuntimeCollective.webapps.form.BeanForm

getPermissibleId

public java.lang.String getPermissibleId()

setPermissibleId

public void setPermissibleId(java.lang.String id)

getParentPermissibleId

public java.lang.String getParentPermissibleId()

setParentPermissibleId

public void setParentPermissibleId(java.lang.String id)

getPermissions

public java.lang.String[] getPermissions()

setPermissions

public void setPermissions(java.lang.String[] perms)

getActions

public java.lang.String[] getActions()

setActions

public void setActions(java.lang.String[] perms)

getReturnPath

public java.lang.String getReturnPath()

setReturnPath

public void setReturnPath(java.lang.String returnPath)

populateForm

public void populateForm(com.RuntimeCollective.webapps.bean.EntityBean bean)
This doesn't populate the permissions.

Specified by:
populateForm in interface com.RuntimeCollective.webapps.form.BeanForm

populateBean

public com.RuntimeCollective.webapps.bean.EntityBean populateBean(com.RuntimeCollective.webapps.bean.EntityBean bean)
This saves the PermissionRules, but not the Permissible.

Specified by:
populateBean in interface com.RuntimeCollective.webapps.form.BeanForm

reset

public void reset(org.apache.struts.action.ActionMapping mapping,
                  javax.servlet.http.HttpServletRequest request)
Description copied from interface: com.RuntimeCollective.webapps.form.BeanForm
Reset all properties to default values.

Specified by:
reset in interface com.RuntimeCollective.webapps.form.BeanForm

validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
                                                      javax.servlet.http.HttpServletRequest request)
Description copied from class: org.apache.struts.action.ActionForm

Validate the properties that have been set for this HTTP request, and return an ActionErrors object that encapsulates any validation errors that have been found. If no errors are found, return null or an ActionErrors object with no recorded error messages.

The default implementation performs no validation and returns null. Subclasses must override this method to provide any validation they wish to perform.