com.atlassian.bamboo.ww2
Class BambooActionSupport

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.bamboo.ww2.BambooActionSupport
All Implemented Interfaces:
ErrorCollection, BambooSessionAware, DomainObjectSecurityAware, GlobalReadSecurityAware, ReturnUrlAware, com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, com.uwyn.rife.continuations.ContinuableObject, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AbstractEntityPagerSupport, AbstractLicenseAction, AbstractPermissionAction, AbstractPluginConfigurationAction, AbstractSetupAction, AccessDeniedAction, AdminErrorAction, AdministerAction, AgentServerActionSupport, BambooAgentInstallerAction, BuildActionSupport, BuildConfigurationSupport, BuildExpiryAction, BuildList, BuildResultsFilterList, BulkPlanAction, ChangePassword, configureAutoFavouriteAction, ConfigureProfile, DeleteBuilds, ErrorAction, ExecuteBuild, FilterCookieWriterAction, FiveOhOh, ForgotPassword, GetBambooBuildNumber, GetFingerprintAction, GetLatestBuildResults, GetLatestBuildResultsForProject, GetLatestBuildsByUser, GetLatestUserBuilds, GetProjectDetails, GetRecentlyCompletedBuildResultsForBuild, GetRecentlyCompletedBuildResultsForProject, GlobalAdminAction, GlobalCreatePlanAction, GotoAuthors, ListBuildNames, ListProjectNames, Login, Login, Logout, Logout, LogToServer, Profile, SignupUser, StarterAction, SystemErrorList, SystemInfoAction, ViewAdministrators, ViewAgent, ViewAgents, ViewAuthor, ViewAuthorChart, ViewAuthors, ViewBuildResultsByJiraKey, ViewBuildResultsForLabelAction, ViewBuildResultsTable, ViewLabels, ViewPlanUpdates, ViewProject, ViewRecentlyCompletedBuilds, ViewReport, ViewReportChart, WelcomeWizard

public class BambooActionSupport
extends com.opensymphony.xwork.ActionSupport
implements ErrorCollection, ReturnUrlAware, BambooSessionAware, GlobalReadSecurityAware

See Also:
Serialized Form

Field Summary
protected  BuildManager buildManager
           
static java.lang.String CONFIRM
           
protected  CookieCutter cookieCutter
           
protected  DashboardCachingManager dashboardCachingManager
           
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
BambooActionSupport()
           
 
Method Summary
 void addError(java.lang.String field, java.lang.String message)
          Deprecated. Use ActionSupport.addFieldError(String, String) instead
 void addError(java.lang.String prefix, java.lang.String field, java.lang.String message)
          Adds a new form validation error with a given prefix.
 void addErrorCollection(ErrorCollection errors)
          Populate this ErrorCollection with general and field-specific errors.
 void addErrorMessage(java.lang.String message)
          Deprecated. Use ActionSupport.addActionError(String) instead
 java.lang.String addErrorMessage(java.lang.String message, java.lang.Exception e)
           
 void addErrorMessages(java.util.Collection errorMessages)
          Append new error messages to those already collected.
 void addErrors(java.util.Map<java.lang.String,?> errors)
          Append new field-specific errors to those already collected.
 void addIllegalArgumentException(java.lang.String field, java.lang.IllegalArgumentException e)
           
protected  boolean areCheckBoxesEmpty(java.lang.String field)
           
 java.lang.String doDefault()
          Default action just sends to the input
 boolean doesLabelKeyHaveMatchingDescription(java.lang.String labelKey)
           
 java.lang.String doExecute()
          Places the current user on the page
 java.lang.String execute()
           
protected  AdministrationConfiguration getAdministrationConfiguration()
          Makes the current Admin configuration available to an action
 java.lang.String getAsPreformattedText(java.lang.Object o)
           
 Bamboo getBamboo()
          Allows access to the Bamboo container.
 BambooLicenseManager getBambooLicenseManager()
           
 BambooSession getBambooSession()
           
 BambooUserManager getBambooUserManager()
           
 java.lang.String getBaseUrl()
           
 BootstrapManager getBootstrapManager()
           
 java.util.Collection getBreadCrumbs()
           
 BuildManager getBuildManager()
           
 java.lang.String getConglomerateCookieValue(java.lang.String cookieKey, java.lang.String conglomerateKey)
           
 CookieCutter getCookieCutter()
           
 java.lang.String getCookieValue(java.lang.String key)
           
 java.lang.Long getCurrentSystemTime()
           
static java.lang.String getCurrentUrl()
           
protected  Persister getDefaultPersister()
           
 java.lang.String getDescriptionFromLabelKey(java.lang.String labelKey)
           
 java.util.Collection<java.lang.String> getFlushedErrorMessages()
          Get error messages, then get rid of them.
 java.lang.String getInstanceName()
           
 java.lang.String getReturnUrl()
           
 java.lang.Object getSecuredDomainObject()
           
 BambooUser getSessionUser(java.lang.String auth)
           
 int getTotalErrors()
           
 com.atlassian.user.User getUser()
           
 java.util.Map getWebFragmentsContextMap()
           
 java.util.List getWebItemsForSection(java.lang.String sectionName)
           
 com.atlassian.plugin.webresource.WebResourceManager getWebResourceManager()
           
 java.util.List getWebSectionsForLocation(java.lang.String location)
           
 boolean hasAnyErrors()
          Whether any errors (of any type - field-specific or otherwise) have been collected.
 boolean hasBuilds()
           
 boolean hasGlobalPermission(java.lang.String permission)
          Does this user have the global permission right?
 boolean hasPlanPermission(java.lang.String permission, Build build)
           
 boolean hasPlanPermission(java.lang.String permission, java.lang.String buildKey)
           
 boolean isEnableSignup()
           
 boolean isSelectFieldAndNull(java.lang.String buildKeysField)
           
 java.lang.String renderFreemarkerTemplate(java.lang.String templateString)
           
 void setAdministrationConfiguration(AdministrationConfiguration administrationConfiguration)
           
 void setAuthenticationContext(BambooAuthenticationContext authenticationContext)
           
 void setBambooLicenseManager(BambooLicenseManager bambooLicenseManager)
           
 void setBambooPermissionManager(BambooPermissionManager bambooPermissionManager)
           
 void setBambooUserManager(BambooUserManager bambooUserManager)
           
 void setBuildManager(BuildManager buildManager)
           
 void setCookieCutter(CookieCutter cookieCutter)
           
 void setDashboardCachingManager(DashboardCachingManager dashboardCachingManager)
           
 void setErrorMessages(java.util.Collection errorMessages)
          Deprecated. Use ActionSupport.setActionErrors(Collection) instead
 void setHtmlUtils(HtmlUtils htmlUtils)
           
 void setReturnUrl(java.lang.String returnUrl)
           
 void setWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager)
           
 void setWebResourceManager(com.atlassian.plugin.webresource.WebResourceManager webResourceManager)
           
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doInput, 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
 
Methods inherited from interface com.atlassian.bamboo.utils.error.ErrorCollection
getErrorMessages, getErrors, getFieldErrors
 

Field Detail

CONFIRM

public static final java.lang.String CONFIRM
See Also:
Constant Field Values

cookieCutter

protected CookieCutter cookieCutter

buildManager

protected BuildManager buildManager

dashboardCachingManager

protected DashboardCachingManager dashboardCachingManager
Constructor Detail

BambooActionSupport

public BambooActionSupport()
Method Detail

doDefault

public java.lang.String doDefault()
                           throws java.lang.Exception
Default action just sends to the input

Overrides:
doDefault in class com.opensymphony.xwork.ActionSupport
Returns:
Throws:
java.lang.Exception

getBambooSession

public BambooSession getBambooSession()
Specified by:
getBambooSession in interface BambooSessionAware

getBamboo

public Bamboo getBamboo()
Allows access to the Bamboo container. Currently not injected using Spring

Returns:
The singleton instance of Bamboo.

getUser

public com.atlassian.user.User getUser()

getAsPreformattedText

public java.lang.String getAsPreformattedText(java.lang.Object o)

doesLabelKeyHaveMatchingDescription

public boolean doesLabelKeyHaveMatchingDescription(java.lang.String labelKey)

getDescriptionFromLabelKey

public java.lang.String getDescriptionFromLabelKey(java.lang.String labelKey)

hasGlobalPermission

public boolean hasGlobalPermission(java.lang.String permission)
Does this user have the global permission right?

Parameters:
permission - The global permission being checked.
Returns:
true if the current user has this permission; false otherwise.

hasPlanPermission

public boolean hasPlanPermission(java.lang.String permission,
                                 java.lang.String buildKey)

hasPlanPermission

public boolean hasPlanPermission(java.lang.String permission,
                                 Build build)

isEnableSignup

public boolean isEnableSignup()

hasBuilds

public boolean hasBuilds()

getBreadCrumbs

public java.util.Collection getBreadCrumbs()

setHtmlUtils

public void setHtmlUtils(HtmlUtils htmlUtils)

setAuthenticationContext

public void setAuthenticationContext(BambooAuthenticationContext authenticationContext)

getReturnUrl

public java.lang.String getReturnUrl()
Specified by:
getReturnUrl in interface ReturnUrlAware

setReturnUrl

public void setReturnUrl(java.lang.String returnUrl)
Specified by:
setReturnUrl in interface ReturnUrlAware

getCurrentUrl

public static java.lang.String getCurrentUrl()

getCurrentSystemTime

public java.lang.Long getCurrentSystemTime()

getCookieValue

public java.lang.String getCookieValue(java.lang.String key)

getBambooLicenseManager

public BambooLicenseManager getBambooLicenseManager()

setBambooLicenseManager

public void setBambooLicenseManager(BambooLicenseManager bambooLicenseManager)

getBootstrapManager

public BootstrapManager getBootstrapManager()

getWebItemsForSection

public java.util.List getWebItemsForSection(java.lang.String sectionName)

getWebSectionsForLocation

public java.util.List getWebSectionsForLocation(java.lang.String location)

renderFreemarkerTemplate

public java.lang.String renderFreemarkerTemplate(java.lang.String templateString)

getWebFragmentsContextMap

public java.util.Map getWebFragmentsContextMap()

addError

public void addError(java.lang.String prefix,
                     java.lang.String field,
                     java.lang.String message)
Description copied from interface: ErrorCollection
Adds a new form validation error with a given prefix. ie. prefix of "builder.ant" and field "target" will result in a key of "builder.ant.target"

Specified by:
addError in interface ErrorCollection
Parameters:
prefix - The prefix of the field in . form
field - The id of the form element in error
message - The error message to display to the user

getFlushedErrorMessages

public java.util.Collection<java.lang.String> getFlushedErrorMessages()
Description copied from interface: ErrorCollection
Get error messages, then get rid of them.

Specified by:
getFlushedErrorMessages in interface ErrorCollection
Returns:
The (now cleared) error messages.

addErrorCollection

public void addErrorCollection(ErrorCollection errors)
Description copied from interface: ErrorCollection
Populate this ErrorCollection with general and field-specific errors.

Specified by:
addErrorCollection in interface ErrorCollection
Parameters:
errors - ErrorCollection whose errors/messages we obtain.

addErrorMessages

public void addErrorMessages(java.util.Collection errorMessages)
Description copied from interface: ErrorCollection
Append new error messages to those already collected.

Specified by:
addErrorMessages in interface ErrorCollection
Parameters:
errorMessages - Collection of error strings.

addErrors

public void addErrors(java.util.Map<java.lang.String,?> errors)
Description copied from interface: ErrorCollection
Append new field-specific errors to those already collected.

Specified by:
addErrors in interface ErrorCollection
Parameters:
errors - A Map from String field names, to String error messages, or Collections of String error messages.

hasAnyErrors

public boolean hasAnyErrors()
Description copied from interface: ErrorCollection
Whether any errors (of any type - field-specific or otherwise) have been collected.

Specified by:
hasAnyErrors in interface ErrorCollection
Returns:
true if there are errors; false otherwise.

getTotalErrors

public int getTotalErrors()
Specified by:
getTotalErrors in interface ErrorCollection

addError

public void addError(java.lang.String field,
                     java.lang.String message)
Deprecated. Use ActionSupport.addFieldError(String, String) instead

Description copied from interface: ErrorCollection
Add a field-specific error message.

Specified by:
addError in interface ErrorCollection
Parameters:
field - Field name, eg. "assignee"
message - Error message.

addErrorMessage

public void addErrorMessage(java.lang.String message)
Deprecated. Use ActionSupport.addActionError(String) instead

Description copied from interface: ErrorCollection
Add error message relating to system state (not field-specific).

Specified by:
addErrorMessage in interface ErrorCollection
Parameters:
message - Error message.

setErrorMessages

public void setErrorMessages(java.util.Collection errorMessages)
Deprecated. Use ActionSupport.setActionErrors(Collection) instead

Description copied from interface: ErrorCollection
Populate this ErrorCollection with a new set of messages (existing errors are lost).

Specified by:
setErrorMessages in interface ErrorCollection
Parameters:
errorMessages - List of error message Strings.

addErrorMessage

public java.lang.String addErrorMessage(java.lang.String message,
                                        java.lang.Exception e)
Specified by:
addErrorMessage in interface ErrorCollection

addIllegalArgumentException

public void addIllegalArgumentException(java.lang.String field,
                                        java.lang.IllegalArgumentException e)

setCookieCutter

public void setCookieCutter(CookieCutter cookieCutter)

getCookieCutter

public CookieCutter getCookieCutter()

setBuildManager

public void setBuildManager(BuildManager buildManager)

getBuildManager

public BuildManager getBuildManager()

setBambooPermissionManager

public void setBambooPermissionManager(BambooPermissionManager bambooPermissionManager)

setWebInterfaceManager

public void setWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager)

setWebResourceManager

public void setWebResourceManager(com.atlassian.plugin.webresource.WebResourceManager webResourceManager)

getWebResourceManager

public com.atlassian.plugin.webresource.WebResourceManager getWebResourceManager()

isSelectFieldAndNull

public boolean isSelectFieldAndNull(java.lang.String buildKeysField)

getConglomerateCookieValue

public java.lang.String getConglomerateCookieValue(java.lang.String cookieKey,
                                                   java.lang.String conglomerateKey)

getDefaultPersister

protected Persister getDefaultPersister()

areCheckBoxesEmpty

protected boolean areCheckBoxesEmpty(java.lang.String field)

getAdministrationConfiguration

protected AdministrationConfiguration getAdministrationConfiguration()
Makes the current Admin configuration available to an action

Returns:
The admin settings

setAdministrationConfiguration

public void setAdministrationConfiguration(AdministrationConfiguration administrationConfiguration)

getBaseUrl

public java.lang.String getBaseUrl()

getInstanceName

public java.lang.String getInstanceName()

doExecute

public java.lang.String doExecute()
                           throws java.lang.Exception
Places the current user on the page

Returns:
webwork success status
Throws:
java.lang.Exception - something nasty went wrong

execute

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

getSecuredDomainObject

public java.lang.Object getSecuredDomainObject()
Specified by:
getSecuredDomainObject in interface DomainObjectSecurityAware

setDashboardCachingManager

public void setDashboardCachingManager(DashboardCachingManager dashboardCachingManager)

getBambooUserManager

public BambooUserManager getBambooUserManager()

setBambooUserManager

public void setBambooUserManager(BambooUserManager bambooUserManager)

getSessionUser

public BambooUser getSessionUser(java.lang.String auth)
                          throws BambooRemoteException
Throws:
BambooRemoteException


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.