org.apache.maven.continuum.web.action.notifier
Class AbstractNotifierEditActionSupport

java.lang.Object
  extended by com.opensymphony.xwork2.ActionSupport
      extended by org.apache.maven.continuum.web.action.PlexusActionSupport
          extended by org.apache.maven.continuum.web.action.ContinuumActionSupport
              extended by org.apache.maven.continuum.web.action.notifier.AbstractNotifierEditActionSupport
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, org.apache.struts2.interceptor.SessionAware
Direct Known Subclasses:
AbstractGroupNotifierEditAction, AbstractProjectNotifierEditAction

public abstract class AbstractNotifierEditActionSupport
extends ContinuumActionSupport

Common base class that consolidates the common properties used by extending XXXEditAction implementations and defines a contract expected of the extending clases.

Since:
1.1
Version:
$Id: AbstractNotifierEditActionSupport.java 1372260 2012-08-13 04:29:09Z brett $
Author:
Rahul Thakur
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.maven.continuum.web.action.ContinuumActionSupport
dateFormatter, ERROR_MSG_AUTHORIZATION_REQUIRED, ERROR_MSG_PROCESSING_AUTHORIZATION, RELEASE_ERROR, REQUIRES_AUTHENTICATION, REQUIRES_AUTHORIZATION
 
Fields inherited from class org.apache.maven.continuum.web.action.PlexusActionSupport
session
 
Fields inherited from class com.opensymphony.xwork2.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
AbstractNotifierEditActionSupport()
           
 
Method Summary
protected abstract  void checkAuthorization()
           
 String edit()
          Obtains the ProjectNotifier instance for edit purposes.
protected abstract  ProjectNotifier getNotifier()
          Obtain and return the ProjectNotifier instance for editing.
 int getNotifierId()
           
 String getNotifierType()
           
protected abstract  void initConfiguration(Map<String,String> configuration)
          Initialises the configuration map that the ProjectNotifier instance is to be inited with.
 boolean isFromGroupPage()
           
 boolean isSendOnError()
           
 boolean isSendOnFailure()
           
 boolean isSendOnScmFailure()
           
 boolean isSendOnSuccess()
           
 boolean isSendOnWarning()
           
 String save()
          Creates or updates ProjectNotifier instance.
protected abstract  void saveNotifier(ProjectNotifier notifier)
          Persists update to the ProjectNotifier instance being edited.
 void setFromGroupPage(boolean fromGroupPage)
           
protected abstract  void setNotifierConfiguration(ProjectNotifier notifier)
          Sets the configuration for the specified ProjectNotifier instance.
 void setNotifierId(int notifierId)
           
 void setNotifierType(String notifierType)
           
 void setSendOnError(boolean sendOnError)
           
 void setSendOnFailure(boolean sendOnFailure)
           
 void setSendOnScmFailure(boolean sendOnScmFailure)
           
 void setSendOnSuccess(boolean sendOnSuccess)
           
 void setSendOnWarning(boolean sendOnWarning)
           
 
Methods inherited from class org.apache.maven.continuum.web.action.ContinuumActionSupport
checkAddGroupBuildDefinitionAuthorization, checkAddProjectBuildDefinitionAuthorization, checkAddProjectGroupAuthorization, checkAddProjectGroupNotifierAuthorization, checkAddProjectNotifierAuthorization, checkAddProjectToGroupAuthorization, checkAuthorization, checkAuthorization, checkAuthorization, checkBuildProjectGroupAuthorization, checkBuildProjectInGroupAuthorization, checkManageConfigurationAuthorization, checkManageLocalRepositoriesAuthorization, checkManageQueuesAuthorization, checkManageSchedulesAuthorization, checkModifyGroupBuildDefinitionAuthorization, checkModifyProjectBuildDefinitionAuthorization, checkModifyProjectGroupAuthorization, checkModifyProjectGroupNotifierAuthorization, checkModifyProjectInGroupAuthorization, checkModifyProjectNotifierAuthorization, checkRemoveGroupBuildDefinitionAuthorization, checkRemoveProjectBuildDefinitionAuthorization, checkRemoveProjectFromGroupAuthorization, checkRemoveProjectGroupAuthorization, checkRemoveProjectGroupNotifierAuthorization, checkRemoveProjectNotifierAuthorization, checkViewProjectGroupAuthorization, checkViewReportsAuthorization, doDefault, execute, getContinuum, getPrincipal, getResourceBundle, getSecuritySystem, getUser, input, isAuthenticated, prepare, requiresAuthentication, setContinuum
 
Methods inherited from class org.apache.maven.continuum.web.action.PlexusActionSupport
setSession
 
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, pause, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNotifierEditActionSupport

public AbstractNotifierEditActionSupport()
Method Detail

getNotifier

protected abstract ProjectNotifier getNotifier()
                                        throws ContinuumException
Obtain and return the ProjectNotifier instance for editing.

Returns:
ProjectNotifier instance.
Throws:
ContinuumException - if there was error retrieving the target ProjectNotifier instance.

saveNotifier

protected abstract void saveNotifier(ProjectNotifier notifier)
                              throws ContinuumException
Persists update to the ProjectNotifier instance being edited.

Parameters:
notifier - ProjectNotifier to save.
Throws:
ContinuumException - if there was an error saving the ProjectNotifier instance.

save

public String save()
            throws ContinuumException
Creates or updates ProjectNotifier instance.

Returns:
result as String.
Throws:
ContinuumException

edit

public String edit()
            throws ContinuumException
Obtains the ProjectNotifier instance for edit purposes.

Returns:
result as String.
Throws:
ContinuumException

getNotifierId

public int getNotifierId()

getNotifierType

public String getNotifierType()
Returns:
the notifierType

setNotifierType

public void setNotifierType(String notifierType)
Parameters:
notifierType - the notifierType to set

isSendOnSuccess

public boolean isSendOnSuccess()
Returns:
the sendOnSuccess

setSendOnSuccess

public void setSendOnSuccess(boolean sendOnSuccess)
Parameters:
sendOnSuccess - the sendOnSuccess to set

isSendOnFailure

public boolean isSendOnFailure()
Returns:
the sendOnFailure

setSendOnFailure

public void setSendOnFailure(boolean sendOnFailure)
Parameters:
sendOnFailure - the sendOnFailure to set

isSendOnError

public boolean isSendOnError()
Returns:
the sendOnError

setSendOnError

public void setSendOnError(boolean sendOnError)
Parameters:
sendOnError - the sendOnError to set

isSendOnWarning

public boolean isSendOnWarning()
Returns:
the sendOnWarning

setSendOnWarning

public void setSendOnWarning(boolean sendOnWarning)
Parameters:
sendOnWarning - the sendOnWarning to set

isSendOnScmFailure

public boolean isSendOnScmFailure()

setSendOnScmFailure

public void setSendOnScmFailure(boolean sendOnScmFailure)

setNotifierId

public void setNotifierId(int notifierId)
Parameters:
notifierId - the notifierId to set

isFromGroupPage

public boolean isFromGroupPage()
Returns:
the fromGroupPage

setFromGroupPage

public void setFromGroupPage(boolean fromGroupPage)
Parameters:
fromGroupPage - the fromGroupPage to set

initConfiguration

protected abstract void initConfiguration(Map<String,String> configuration)
Initialises the configuration map that the ProjectNotifier instance is to be inited with.

Parameters:
configuration - map of configuration key-value pairs.

setNotifierConfiguration

protected abstract void setNotifierConfiguration(ProjectNotifier notifier)
Sets the configuration for the specified ProjectNotifier instance.

Parameters:
notifier - The project notifier.
See Also:
initConfiguration(Map)

checkAuthorization

protected abstract void checkAuthorization()
                                    throws AuthorizationRequiredException,
                                           ContinuumException
Throws:
AuthorizationRequiredException
ContinuumException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.