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

Package class diagram package 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, java.io.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.

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, 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
 java.lang.String doDefault()
           
protected abstract  org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult doExecute(java.lang.String pomUrl, int selectedProjectGroup, boolean checkProtocol, boolean scmUseCache)
          Subclasses must implement this method calling the appropiate operation on the continuum service.
 java.lang.String execute()
           
 int getBuildDefinitionTemplateId()
           
 java.util.List<org.apache.maven.continuum.model.project.BuildDefinitionTemplate> getBuildDefinitionTemplates()
           
 java.util.List<java.lang.String> getErrorMessages()
           
 java.lang.String getPom()
           
 java.io.File getPomFile()
           
 java.lang.String getPomUrl()
           
 int getProjectGroupId()
           
 java.lang.String getProjectGroupName()
           
 java.util.Collection getProjectGroups()
           
 java.lang.String getScmUsername()
           
 int getSelectedProjectGroup()
           
protected  java.lang.String hidePasswordInUrl(java.lang.String url)
           
 java.lang.String input()
           
 boolean isDisableGroupSelection()
           
 boolean isScmUseCache()
           
 void setBuildDefinitionTemplateId(int buildDefinitionTemplateId)
           
 void setBuildDefinitionTemplates(java.util.List<org.apache.maven.continuum.model.project.BuildDefinitionTemplate> buildDefinitionTemplates)
           
 void setDisableGroupSelection(boolean disableGroupSelection)
           
 void setErrorMessages(java.util.List<java.lang.String> errorMessages)
           
 void setPom(java.lang.String pom)
           
 void setPomFile(java.io.File pomFile)
           
 void setPomUrl(java.lang.String pomUrl)
           
 void setProjectGroupId(int projectGroupId)
           
 void setProjectGroupName(java.lang.String projectGroupName)
           
 void setScmPassword(java.lang.String scmPassword)
           
 void setScmUseCache(boolean scmUseCache)
           
 void setScmUsername(java.lang.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, getContinuum, getPrincipal, getResourceBundle, getSecuritySystem, 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, clearErrorsAndMessages, clone, getActionErrors, getActionMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, 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 java.lang.String execute()
                         throws org.apache.maven.continuum.ContinuumException,
                                org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException
Specified by:
execute in interface com.opensymphony.xwork2.Action
Overrides:
execute in class ContinuumActionSupport
Throws:
org.apache.maven.continuum.ContinuumException
org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException

doExecute

protected abstract org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult doExecute(java.lang.String pomUrl,
                                                                                                       int selectedProjectGroup,
                                                                                                       boolean checkProtocol,
                                                                                                       boolean scmUseCache)
                                                                                                throws org.apache.maven.continuum.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:
org.apache.maven.continuum.ContinuumException

doDefault

public java.lang.String doDefault()
                           throws org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException
Overrides:
doDefault in class ContinuumActionSupport
Throws:
org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException

input

public java.lang.String input()
                       throws org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException
Overrides:
input in class ContinuumActionSupport
Throws:
org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException

hidePasswordInUrl

protected java.lang.String hidePasswordInUrl(java.lang.String url)

getPom

public java.lang.String getPom()

setPom

public void setPom(java.lang.String pom)

getPomFile

public java.io.File getPomFile()

setPomFile

public void setPomFile(java.io.File pomFile)

getPomUrl

public java.lang.String getPomUrl()

setPomUrl

public void setPomUrl(java.lang.String pomUrl)

setScmPassword

public void setScmPassword(java.lang.String scmPassword)

getScmUsername

public java.lang.String getScmUsername()

setScmUsername

public void setScmUsername(java.lang.String scmUsername)

getProjectGroups

public java.util.Collection getProjectGroups()

getProjectGroupName

public java.lang.String getProjectGroupName()

setProjectGroupName

public void setProjectGroupName(java.lang.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 java.util.List<org.apache.maven.continuum.model.project.BuildDefinitionTemplate> getBuildDefinitionTemplates()

setBuildDefinitionTemplates

public void setBuildDefinitionTemplates(java.util.List<org.apache.maven.continuum.model.project.BuildDefinitionTemplate> buildDefinitionTemplates)

getBuildDefinitionTemplateId

public int getBuildDefinitionTemplateId()

setBuildDefinitionTemplateId

public void setBuildDefinitionTemplateId(int buildDefinitionTemplateId)

getErrorMessages

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

setErrorMessages

public void setErrorMessages(java.util.List<java.lang.String> errorMessages)

setServletRequest

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