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

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.AddMavenProjectAction
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.ServletRequestAware, org.apache.struts2.interceptor.SessionAware
Direct Known Subclasses:
AddMavenOneProjectAction, AddMavenTwoProjectAction

public abstract class AddMavenProjectAction
extends ContinuumActionSupport
implements org.apache.struts2.interceptor.ServletRequestAware

Action to add a Maven project to Continuum, either Maven 1 or Maven 2.

Version:
$Id: AddMavenProjectAction.java 1372260 2012-08-13 04:29:09Z brett $
Author:
Carlos Sanchez
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
AddMavenProjectAction()
           
 
Method Summary
 String doDefault()
           
protected abstract  ContinuumProjectBuildingResult doExecute(String pomUrl, int selectedProjectGroup, boolean checkProtocol, boolean scmUseCache)
          Subclasses must implement this method calling the appropiate operation on the continuum service.
 String execute()
           
 int getBuildDefinitionTemplateId()
           
 List<BuildDefinitionTemplate> getBuildDefinitionTemplates()
           
 List<String> getErrorMessages()
           
 String getPom()
           
 File getPomFile()
           
 String getPomUrl()
           
 int getProjectGroupId()
           
 String getProjectGroupName()
           
 Collection getProjectGroups()
           
 String getScmUsername()
           
 int getSelectedProjectGroup()
           
protected  String hidePasswordInUrl(String url)
           
 String input()
           
 boolean isDisableGroupSelection()
           
 boolean isScmUseCache()
           
 void setBuildDefinitionTemplateId(int buildDefinitionTemplateId)
           
 void setBuildDefinitionTemplates(List<BuildDefinitionTemplate> buildDefinitionTemplates)
           
 void setDisableGroupSelection(boolean disableGroupSelection)
           
 void setErrorMessages(List<String> errorMessages)
           
 void setPom(String pom)
           
 void setPomFile(File pomFile)
           
 void setPomUrl(String pomUrl)
           
 void setProjectGroupId(int projectGroupId)
           
 void setProjectGroupName(String projectGroupName)
           
 void setScmPassword(String scmPassword)
           
 void setScmUseCache(boolean scmUseCache)
           
 void setScmUsername(String scmUsername)
           
 void setSelectedProjectGroup(int selectedProjectGroup)
           
 void setServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest)
           
 
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, getContinuum, getPrincipal, getResourceBundle, getSecuritySystem, getUser, 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, 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

AddMavenProjectAction

public AddMavenProjectAction()
Method Detail

execute

public String execute()
               throws ContinuumException,
                      BuildDefinitionServiceException
Specified by:
execute in interface com.opensymphony.xwork2.Action
Overrides:
execute in class ContinuumActionSupport
Throws:
ContinuumException
BuildDefinitionServiceException

doExecute

protected abstract ContinuumProjectBuildingResult doExecute(String pomUrl,
                                                            int selectedProjectGroup,
                                                            boolean checkProtocol,
                                                            boolean scmUseCache)
                                                     throws ContinuumException
Subclasses must implement this method calling the appropiate operation on the continuum service.

Parameters:
pomUrl - url of the pom specified by the user
selectedProjectGroup - project group id selected by the user
checkProtocol - check if the protocol is allowed, use false if the pom is uploaded
Returns:
result of adding the pom to continuum
Throws:
ContinuumException

doDefault

public String doDefault()
                 throws BuildDefinitionServiceException
Overrides:
doDefault in class ContinuumActionSupport
Throws:
BuildDefinitionServiceException

input

public String input()
             throws BuildDefinitionServiceException
Overrides:
input in class ContinuumActionSupport
Throws:
BuildDefinitionServiceException

hidePasswordInUrl

protected String hidePasswordInUrl(String url)

getPom

public String getPom()

setPom

public void setPom(String pom)

getPomFile

public File getPomFile()

setPomFile

public void setPomFile(File pomFile)

getPomUrl

public String getPomUrl()

setPomUrl

public void setPomUrl(String pomUrl)

setScmPassword

public void setScmPassword(String scmPassword)

getScmUsername

public String getScmUsername()

setScmUsername

public void setScmUsername(String scmUsername)

getProjectGroups

public Collection getProjectGroups()

getProjectGroupName

public String getProjectGroupName()

setProjectGroupName

public void setProjectGroupName(String projectGroupName)

getSelectedProjectGroup

public int getSelectedProjectGroup()

setSelectedProjectGroup

public void setSelectedProjectGroup(int selectedProjectGroup)

isDisableGroupSelection

public boolean isDisableGroupSelection()

setDisableGroupSelection

public void setDisableGroupSelection(boolean disableGroupSelection)

isScmUseCache

public boolean isScmUseCache()

setScmUseCache

public void setScmUseCache(boolean scmUseCache)

getProjectGroupId

public int getProjectGroupId()

setProjectGroupId

public void setProjectGroupId(int projectGroupId)

getBuildDefinitionTemplates

public List<BuildDefinitionTemplate> getBuildDefinitionTemplates()

setBuildDefinitionTemplates

public void setBuildDefinitionTemplates(List<BuildDefinitionTemplate> buildDefinitionTemplates)

getBuildDefinitionTemplateId

public int getBuildDefinitionTemplateId()

setBuildDefinitionTemplateId

public void setBuildDefinitionTemplateId(int buildDefinitionTemplateId)

getErrorMessages

public List<String> getErrorMessages()
Overrides:
getErrorMessages in class com.opensymphony.xwork2.ActionSupport

setErrorMessages

public void setErrorMessages(List<String> errorMessages)

setServletRequest

public void setServletRequest(javax.servlet.http.HttpServletRequest httpServletRequest)
Specified by:
setServletRequest in interface org.apache.struts2.interceptor.ServletRequestAware


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