Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gisgraphy.webapp.action
Class UserAction

    java.lang.Object
      com.opensymphony.xwork2.ActionSupport
          com.gisgraphy.webapp.action.BaseAction
              com.gisgraphy.webapp.action.UserAction

All Implemented Interfaces:
  com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.Preparable, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, java.io.Serializable

    public class UserAction

extends BaseAction
implements com.opensymphony.xwork2.Preparable

Action for facilitating User Management feature.

See Also:
  Serialized Form

Field Summary

Fields inherited from class com.gisgraphy.webapp.action.BaseAction
`cancel, CANCEL, delete, from, log, mailEngine, mailMessage, roleManager, save, templateName, userManager`

Fields inherited from class com.opensymphony.xwork2.ActionSupport
`LOG`

Fields inherited from interface com.opensymphony.xwork2.Action
`ERROR, INPUT, LOGIN, NONE, SUCCESS`

Constructor Summary
`UserAction()`

Method Summary
`java.lang.String` | `cancel()` Sends users to "mainMenu" when !
`java.lang.String` | `delete()` Delete the user passed in.
`java.lang.String` | `edit()` Grab the user from the database based on the "id" passed in.
`java.lang.String` | `execute()` Default: just returns "success"
`User` | `getUser()`
`java.util.List<User>` | `getUsers()` Holder for users to display on list screen
`java.lang.String` | `list()` Fetch all users from database and put into local "users" variable for retrieval in the UI.
`void` | `prepare()` Grab the entity from the database before populating with request parameters
`java.lang.String` | `save()` Save user
`void` | `setId(java.lang.String id)`
`void` | `setUser(User user)`

Methods inherited from class com.gisgraphy.webapp.action.BaseAction
`getConfiguration, getRequest, getResponse, getSession, saveMessage, sendUserMessage, setDelete, setFrom, setMailEngine, setMailMessage, setRoleManager, setSave, setTemplateName, setUserManager`

Methods inherited from class com.opensymphony.xwork2.ActionSupport
`addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, input, pause, setActionErrors, setActionMessages, setFieldErrors, validate`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UserAction

    public UserAction()

Method Detail

### prepare

    public void prepare()

  Grab the entity from the database before populating with request parameters

  Specified by:
    `prepare` in interface `com.opensymphony.xwork2.Preparable`

### getUsers

    public java.util.List<User> getUsers()

  Holder for users to display on list screen

  Returns:
    list of users

### setId

    public void setId(java.lang.String id)

### getUser

    public User getUser()

### setUser

    public void setUser(User user)

### delete

    public java.lang.String delete()

  Delete the user passed in.

  Returns:
    success

### edit

    public java.lang.String edit()
                          throws java.io.IOException

  Grab the user from the database based on the "id" passed in.

  Returns:
    success if user found
  Throws:
    `java.io.IOException` - can happen when sending a "forbidden" from response.sendError()

### execute

    public java.lang.String execute()

  Default: just returns "success"

  Specified by:
    `execute` in interface `com.opensymphony.xwork2.Action`
  Overrides:
    `execute` in class `com.opensymphony.xwork2.ActionSupport`
  Returns:
    "success"

### cancel

    public java.lang.String cancel()

  Sends users to "mainMenu" when !from.equals("list"). Sends everyone else to "cancel"

  Overrides:
    `cancel` in class `BaseAction`
  Returns:
    "mainMenu" or "cancel"

### save

    public java.lang.String save()
                          throws java.io.IOException

  Save user

  Returns:
    success if everything worked, otherwise input
  Throws:
    `java.io.IOException` - when setting "access denied" fails on response

### list

    public java.lang.String list()

  Fetch all users from database and put into local "users" variable for retrieval in the UI.

  Returns:
    "success" if no exceptions thrown

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.