org.apache.maven.continuum.web.action
Class ContinuumActionSupport

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
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:
AboutAction, AbstractFooterAction, AbstractNotifierEditActionSupport, AbstractReleaseAction, AddGroupNotifierAction, AddMavenProjectAction, AddProjectAction, AddProjectGroupAction, AddProjectNotifierAction, BuildProjectAction, CancelBuildAction, ConfigurationAction, ContinuumConfirmAction, DeleteGroupNotifierAction, DeleteProjectAction, DeleteProjectNotifierAction, DistributedReleasesAction, EditPomAction, GroupSummaryAction, HttpError, NotifierSummaryAction, ProfileAction, ProjectEditAction, ProjectsListAction, ProjectViewAction, QueuesAction, ReleaseCleanupAction, ReleaseInProgressAction, ReleaseProjectAction, ReleaseRollbackAction, ScmResultAction, SummaryAction, SurefireReportAction, ViewBuildsReportAction, WorkingCopyAction

public class ContinuumActionSupport
extends PlexusActionSupport
implements com.opensymphony.xwork2.Preparable

ContinuumActionSupport

Version:
$Id: ContinuumActionSupport.java 1395451 2012-10-08 05:06:18Z brett $
Author:
Jesse McConnell
See Also:
Serialized Form

Field Summary
protected  SimpleDateFormat dateFormatter
           
protected static String ERROR_MSG_AUTHORIZATION_REQUIRED
           
protected static String ERROR_MSG_PROCESSING_AUTHORIZATION
           
protected static String RELEASE_ERROR
           
protected static String REQUIRES_AUTHENTICATION
           
protected static String 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
ContinuumActionSupport()
           
 
Method Summary
protected  void checkAddGroupBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to add a build definition for the specified project group
protected  void checkAddProjectBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to add a group build definition to a specific project
protected  void checkAddProjectGroupAuthorization()
          Check if the current user is authorized to add a project group
protected  void checkAddProjectGroupNotifierAuthorization(String resource)
          Check if the current user is authorized to add a notifier to the specified project group
protected  void checkAddProjectNotifierAuthorization(String resource)
          Check if the current user is authorized to add a notifier to a specific project
protected  void checkAddProjectToGroupAuthorization(String resource)
          Check if the current user is authorized to add a project to a specific project group
protected  void checkAuthorization(String role)
          Check if the current user is authorized to do the action
protected  void checkAuthorization(String role, String resource)
          Check if the current user is authorized to do the action
protected  void checkAuthorization(String role, String resource, boolean requiredResource)
          Check if the current user is authorized to do the action
protected  void checkBuildProjectGroupAuthorization(String resource)
          Check if the current user is authorized to build the specified project group
protected  void checkBuildProjectInGroupAuthorization(String resource)
          Check if the current user is authorized to build a project in the specified group
protected  void checkManageConfigurationAuthorization()
          Check if the current user is authorized to manage the application's configuration
protected  void checkManageLocalRepositoriesAuthorization()
           
protected  void checkManageQueuesAuthorization()
          Check if the current user is authorized to manage queues
protected  void checkManageSchedulesAuthorization()
          Check if the current user is authorized to manage the project build schedules
protected  void checkModifyGroupBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to modify a build definition in the specified project group
protected  void checkModifyProjectBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to modify a build definition of a specific project
protected  void checkModifyProjectGroupAuthorization(String resource)
          Check if the current user is authorized to modify the specified project group
protected  void checkModifyProjectGroupNotifierAuthorization(String resource)
          Check if the current user is authorized to modify a notifier in the specified project group
protected  void checkModifyProjectInGroupAuthorization(String resource)
          Check if the current user is authorized to modify a project in the specified group
protected  void checkModifyProjectNotifierAuthorization(String resource)
          Check if the current user is authorized to modify a notifier in a specific project
protected  void checkRemoveGroupBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to delete a build definition in the specified project group
protected  void checkRemoveProjectBuildDefinitionAuthorization(String resource)
          Check if the current user is authorized to delete a build definition of a specific project
protected  void checkRemoveProjectFromGroupAuthorization(String resource)
          Check if the current user is authorized to delete a project from a specified group
protected  void checkRemoveProjectGroupAuthorization(String resource)
          Check if the current user is authorized to delete the specified project group
protected  void checkRemoveProjectGroupNotifierAuthorization(String resource)
          Check if the current user is authorized to delete a notifier in the specified project group
protected  void checkRemoveProjectNotifierAuthorization(String resource)
          Check if the current user is authorized to delete a notifier in a specific project
protected  void checkViewProjectGroupAuthorization(String resource)
          Check if the current user is authorized to view the specified project group
protected  void checkViewReportsAuthorization()
           
 String doDefault()
           
 String execute()
           
 Continuum getContinuum()
           
protected  String getPrincipal()
           
protected  ResourceBundle getResourceBundle()
           
protected  org.codehaus.plexus.redback.system.SecuritySystem getSecuritySystem()
          Get the security system
protected  org.codehaus.plexus.redback.users.User getUser(String principal)
           
 String input()
           
 boolean isAuthenticated()
          Check if the current user is already authenticated
 void prepare()
           
protected  boolean requiresAuthentication()
           
 void setContinuum(Continuum continuum)
           
 
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
 

Field Detail

REQUIRES_AUTHENTICATION

protected static final String REQUIRES_AUTHENTICATION
See Also:
Constant Field Values

REQUIRES_AUTHORIZATION

protected static final String REQUIRES_AUTHORIZATION
See Also:
Constant Field Values

RELEASE_ERROR

protected static final String RELEASE_ERROR
See Also:
Constant Field Values

ERROR_MSG_AUTHORIZATION_REQUIRED

protected static final String ERROR_MSG_AUTHORIZATION_REQUIRED
See Also:
Constant Field Values

ERROR_MSG_PROCESSING_AUTHORIZATION

protected static final String ERROR_MSG_PROCESSING_AUTHORIZATION
See Also:
Constant Field Values

dateFormatter

protected final SimpleDateFormat dateFormatter
Constructor Detail

ContinuumActionSupport

public ContinuumActionSupport()
Method Detail

prepare

public void prepare()
             throws Exception
Specified by:
prepare in interface com.opensymphony.xwork2.Preparable
Throws:
Exception

getContinuum

public Continuum getContinuum()

setContinuum

public void setContinuum(Continuum continuum)

doDefault

public String doDefault()
                 throws Exception
Overrides:
doDefault in class com.opensymphony.xwork2.ActionSupport
Throws:
Exception

input

public String input()
             throws Exception
Overrides:
input in class com.opensymphony.xwork2.ActionSupport
Throws:
Exception

execute

public String execute()
               throws Exception
Specified by:
execute in interface com.opensymphony.xwork2.Action
Overrides:
execute in class com.opensymphony.xwork2.ActionSupport
Throws:
Exception

checkAuthorization

protected void checkAuthorization(String role)
                           throws AuthorizationRequiredException
Check if the current user is authorized to do the action

Parameters:
role - the role
Throws:
AuthorizationRequiredException - if the user isn't authorized

checkAuthorization

protected void checkAuthorization(String role,
                                  String resource)
                           throws AuthorizationRequiredException
Check if the current user is authorized to do the action

Parameters:
role - the role
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized

checkAuthorization

protected void checkAuthorization(String role,
                                  String resource,
                                  boolean requiredResource)
                           throws AuthorizationRequiredException
Check if the current user is authorized to do the action

Parameters:
role - the role
resource - the operation resource
requiredResource - true if resource can't be null
Throws:
AuthorizationRequiredException - if the user isn't authorized

checkViewProjectGroupAuthorization

protected void checkViewProjectGroupAuthorization(String resource)
                                           throws AuthorizationRequiredException
Check if the current user is authorized to view the specified project group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkAddProjectGroupAuthorization

protected void checkAddProjectGroupAuthorization()
                                          throws AuthorizationRequiredException
Check if the current user is authorized to add a project group

Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkRemoveProjectGroupAuthorization

protected void checkRemoveProjectGroupAuthorization(String resource)
                                             throws AuthorizationRequiredException
Check if the current user is authorized to delete the specified project group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkBuildProjectGroupAuthorization

protected void checkBuildProjectGroupAuthorization(String resource)
                                            throws AuthorizationRequiredException
Check if the current user is authorized to build the specified project group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkModifyProjectGroupAuthorization

protected void checkModifyProjectGroupAuthorization(String resource)
                                             throws AuthorizationRequiredException
Check if the current user is authorized to modify the specified project group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkAddProjectToGroupAuthorization

protected void checkAddProjectToGroupAuthorization(String resource)
                                            throws AuthorizationRequiredException
Check if the current user is authorized to add a project to a specific project group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkRemoveProjectFromGroupAuthorization

protected void checkRemoveProjectFromGroupAuthorization(String resource)
                                                 throws AuthorizationRequiredException
Check if the current user is authorized to delete a project from a specified group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkModifyProjectInGroupAuthorization

protected void checkModifyProjectInGroupAuthorization(String resource)
                                               throws AuthorizationRequiredException
Check if the current user is authorized to modify a project in the specified group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkBuildProjectInGroupAuthorization

protected void checkBuildProjectInGroupAuthorization(String resource)
                                              throws AuthorizationRequiredException
Check if the current user is authorized to build a project in the specified group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkAddGroupBuildDefinitionAuthorization

protected void checkAddGroupBuildDefinitionAuthorization(String resource)
                                                  throws AuthorizationRequiredException
Check if the current user is authorized to add a build definition for the specified project group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkRemoveGroupBuildDefinitionAuthorization

protected void checkRemoveGroupBuildDefinitionAuthorization(String resource)
                                                     throws AuthorizationRequiredException
Check if the current user is authorized to delete a build definition in the specified project group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkModifyGroupBuildDefinitionAuthorization

protected void checkModifyGroupBuildDefinitionAuthorization(String resource)
                                                     throws AuthorizationRequiredException
Check if the current user is authorized to modify a build definition in the specified project group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkAddProjectBuildDefinitionAuthorization

protected void checkAddProjectBuildDefinitionAuthorization(String resource)
                                                    throws AuthorizationRequiredException
Check if the current user is authorized to add a group build definition to a specific project

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkModifyProjectBuildDefinitionAuthorization

protected void checkModifyProjectBuildDefinitionAuthorization(String resource)
                                                       throws AuthorizationRequiredException
Check if the current user is authorized to modify a build definition of a specific project

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkRemoveProjectBuildDefinitionAuthorization

protected void checkRemoveProjectBuildDefinitionAuthorization(String resource)
                                                       throws AuthorizationRequiredException
Check if the current user is authorized to delete a build definition of a specific project

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkAddProjectGroupNotifierAuthorization

protected void checkAddProjectGroupNotifierAuthorization(String resource)
                                                  throws AuthorizationRequiredException
Check if the current user is authorized to add a notifier to the specified project group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkRemoveProjectGroupNotifierAuthorization

protected void checkRemoveProjectGroupNotifierAuthorization(String resource)
                                                     throws AuthorizationRequiredException
Check if the current user is authorized to delete a notifier in the specified project group

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkModifyProjectGroupNotifierAuthorization

protected void checkModifyProjectGroupNotifierAuthorization(String resource)
                                                     throws AuthorizationRequiredException
Check if the current user is authorized to modify a notifier in the specified project group

Parameters:
resource - the operartion resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkAddProjectNotifierAuthorization

protected void checkAddProjectNotifierAuthorization(String resource)
                                             throws AuthorizationRequiredException
Check if the current user is authorized to add a notifier to a specific project

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkRemoveProjectNotifierAuthorization

protected void checkRemoveProjectNotifierAuthorization(String resource)
                                                throws AuthorizationRequiredException
Check if the current user is authorized to delete a notifier in a specific project

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkModifyProjectNotifierAuthorization

protected void checkModifyProjectNotifierAuthorization(String resource)
                                                throws AuthorizationRequiredException
Check if the current user is authorized to modify a notifier in a specific project

Parameters:
resource - the operation resource
Throws:
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkManageConfigurationAuthorization

protected void checkManageConfigurationAuthorization()
                                              throws AuthenticationRequiredException,
                                                     AuthorizationRequiredException
Check if the current user is authorized to manage the application's configuration

Throws:
AuthenticationRequiredException - if the user isn't authorized if the user isn't authenticated
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkManageSchedulesAuthorization

protected void checkManageSchedulesAuthorization()
                                          throws AuthenticationRequiredException,
                                                 AuthorizationRequiredException
Check if the current user is authorized to manage the project build schedules

Throws:
AuthenticationRequiredException - if the user isn't authorized if the user isn't authenticated
AuthorizationRequiredException - if the user isn't authorized if the user isn't authorized

checkManageQueuesAuthorization

protected void checkManageQueuesAuthorization()
                                       throws AuthenticationRequiredException,
                                              AuthorizationRequiredException
Check if the current user is authorized to manage queues

Throws:
AuthenticationRequiredException - if the user isn't authenticated
AuthorizationRequiredException - if the user isn't authorized

checkManageLocalRepositoriesAuthorization

protected void checkManageLocalRepositoriesAuthorization()
                                                  throws AuthorizationRequiredException
Throws:
AuthorizationRequiredException

checkViewReportsAuthorization

protected void checkViewReportsAuthorization()
                                      throws AuthorizationRequiredException
Throws:
AuthorizationRequiredException

getSecuritySystem

protected org.codehaus.plexus.redback.system.SecuritySystem getSecuritySystem()
Get the security system

Returns:
the security system

requiresAuthentication

protected boolean requiresAuthentication()

isAuthenticated

public boolean isAuthenticated()
Check if the current user is already authenticated

Returns:
true if the user is authenticated

getResourceBundle

protected ResourceBundle getResourceBundle()

getPrincipal

protected String getPrincipal()

getUser

protected org.codehaus.plexus.redback.users.User getUser(String principal)
                                                  throws org.codehaus.plexus.redback.users.UserNotFoundException
Throws:
org.codehaus.plexus.redback.users.UserNotFoundException


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