mailreader2
Class Subscription

java.lang.Object
  extended by com.opensymphony.xwork2.ActionSupport
      extended by mailreader2.MailreaderSupport
          extended by mailreader2.Subscription
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, Serializable, ApplicationAware, SessionAware

public class Subscription
extends MailreaderSupport
implements com.opensymphony.xwork2.Preparable

Provide an Edit method for retrieving an existing subscription, and a Save method for updating or inserting a subscription.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class mailreader2.MailreaderSupport
log
 
Fields inherited from class com.opensymphony.xwork2.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
Subscription()
           
 
Method Summary
 String delete()
          Prepare to present a confirmation page before removing Subscription.
 String edit()
          Prepare to edit User Subscription.
 String find()
          Load User Subscription for the local Host property.
 Map getTypes()
          Provide the list of MailServer types.
 String input()
          Setup a temporary User Subscription object to capture input values.
 void prepare()
          Setup the MailerServer types and set the local Host property from the User Subscription (if any).
 String save()
           Examine the Task property and DELETE, CREATE, or save the User Subscription, as appropriate.
 
Methods inherited from class mailreader2.MailreaderSupport
cancel, copySubscription, copySubscription, copyUser, copyUser, createInputSubscription, createInputUser, createSubscription, createUser, findSubscription, findSubscription, findUser, getApplication, getDatabase, getHost, getPassword, getPassword2, getSession, getSubscription, getSubscriptionHost, getTask, getToken, getUser, getUsername, removeSubscription, saveUser, setApplication, setDatabase, setHost, setPassword, setPassword2, setSession, setSubscription, setTask, setToken, setUser, setUsername
 
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getFormatted, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Subscription

public Subscription()
Method Detail

getTypes

public Map getTypes()

Provide the list of MailServer types.

Returns:
List of MailServer types

prepare

public void prepare()

Setup the MailerServer types and set the local Host property from the User Subscription (if any).

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

input

public String input()

Setup a temporary User Subscription object to capture input values.

Overrides:
input in class com.opensymphony.xwork2.ActionSupport
Returns:
INPUT

find

public String find()

Load User Subscription for the local Host property.

Usually, the Host is being set from the request by a link to an Edit or Delete task.

Returns:
INPUT or Error, if Subscription is not found

delete

public String delete()

Prepare to present a confirmation page before removing Subscription.

Returns:
INPUT or Error, if Subscription is not found

edit

public String edit()

Prepare to edit User Subscription.

Returns:
INPUT or Error, if Subscription is not found

save

public String save()
            throws Exception

Examine the Task property and DELETE, CREATE, or save the User Subscription, as appropriate.

Returns:
SUCCESS
Throws:
Exception - on a database error


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.