com.atlassian.crowd.console.action
Class BaseAction

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.crowd.console.action.BaseAction
All Implemented Interfaces:
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, Serializable, Cloneable
Direct Known Subclasses:
AbstractBrowser, AccessDenied, AddApplicationAuthorisationDetails, AddApplicationConfirmation, AddApplicationConnectionDetails, AddApplicationDetails, AddApplicationDirectoryDetails, AddGroup, Administer, ApplicationBaseAction, Backup, BaseImporter, BaseSetupAction, BaseUserAction, ChangeExpiredPassword, Console, CreateDirectory, DefaultStartPage, ErrorAction, ImportType, License, Login, RemoveDirectory, RemoveGroup, RemovePrincipal, RemoveSession, SAMLAuthAction, SystemInfo, UpdateConnectionPool, UpdateConnectorConfiguration, UpdateConnectorConnection, UpdateCustomAttributes, UpdateGeneral, UpdateInternalConfiguration, UpdateLicensing, UpdateLoggingProfiling, UpdateMailServer, UpdateMailTemplate, UpdateOptions, UpdatePermissions, UpdateRemoteCrowdConnection, UpdateSAMLConfiguration, UpdateSessionConfig, UpdateTrustedProxies, ViewConnector, ViewCustom, ViewGroup, ViewGroupMembers, ViewGroupNestedPrincipals, ViewInternal, ViewPicker, ViewPrincipal, ViewRemoteCrowd, ViewTrustedProxies

public class BaseAction
extends com.opensymphony.xwork.ActionSupport

See Also:
Serialized Form

Field Summary
protected  String actionMessageAlertColor
          Webwork action messages color settings.
static String ALERT_BLUE
           
static String ALERT_GREEN
           
static String ALERT_RED
           
static String ALERT_YELLOW
           
protected  ApplicationManager applicationManager
           
protected  ApplicationService applicationService
           
protected  ClientProperties clientProperties
           
protected  CrowdLicenseManager crowdLicenseManager
           
protected  DirectoryManager directoryManager
           
protected  boolean initialLoad
           
protected  org.slf4j.Logger logger
           
protected  PropertyManager propertyManager
           
protected  Integer tab
           
protected  TokenAuthenticationManager tokenAuthenticationManager
           
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
BaseAction()
           
 
Method Summary
 void addActionMessage(String color, String message)
          Sets a UI message and the color type for the user.
protected  boolean authorisedToAccessCrowdAdminConsole(DirectoryMapping directoryMapping, Long directoryId, String username)
           
protected  boolean authorisedToAccessCrowdConsole(Long directoryId, String name)
           
 boolean containsActionMessages()
           
 boolean containsErrorMessages()
           
 Directory directory(long directoryID)
           
 String doDefault()
           
 String getActionMessageAlertColor()
          Gets the action message color dressing to use with the decorator.
 SOAPAttribute getAttribute(String name)
           
protected  CrowdBootstrapManager getBootstrapManager()
           
 Integer getCurrentLicenseResourceTotal()
           
 String getDisplayableLink(com.atlassian.plugin.web.model.WebLink link)
           
 String getFirstAttribute(String name)
           
protected  javax.servlet.http.HttpServletRequest getHttpRequest()
           
 String getImageLocation(boolean active, ApplicationType applicationType)
           
 String getImageTitle(boolean active, ApplicationType applicationType)
           
 com.atlassian.extras.api.crowd.CrowdLicense getLicense()
           
 String getLink(com.atlassian.plugin.web.model.WebLink link)
           
 SOAPPrincipal getRemoteUser()
           
protected  javax.servlet.http.HttpSession getSession()
           
 Map<String,Object> getSitemeshPageProperties()
           
 String getSitemeshPageProperty(String propertyName)
           
 Integer getTab()
           
 String getText(String i18nKey, List args)
           
 String getText(String i18nKey, List args, boolean encode)
           
 String getUserName()
           
 Map<String,Object> getWebFragmentsContextMap()
           
 com.atlassian.plugin.web.WebInterfaceManager getWebInterfaceManager()
           
 List getWebItemsForSection(String sectionName)
           
 com.atlassian.plugin.webresource.WebResourceManager getWebResourceManager()
           
 List getWebSectionsForLocation(String location)
           
 String getXsrfToken()
           
 String getXsrfTokenName()
           
 boolean isAdmin()
           
 boolean isAtResourceLimit()
           
 boolean isAuthenticated()
           
 boolean isEvaluation()
           
 boolean isInitialLoad()
           
 boolean isLicenseExpired()
           
 boolean isSubscription()
           
 boolean isWithinGracePeriod()
           
 String renderFreemarkerTemplate(String templateString)
           
 void setApplicationManager(ApplicationManager applicationManager)
           
 void setApplicationService(ApplicationService applicationService)
           
 void setClientProperties(ClientProperties clientProperties)
           
 void setCrowdLicenseManager(CrowdLicenseManager crowdLicenseManager)
           
 void setCrowdUserDetailsService(CrowdUserDetailsService crowdUserDetailsService)
           
 void setDirectoryManager(DirectoryManager directoryManager)
           
 void setPropertyManager(PropertyManager propertyManager)
           
 void setTab(Integer tab)
           
 void setTokenAuthenticationManager(TokenAuthenticationManager tokenAuthenticationManager)
           
 void setWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager)
           
 void setWebResourceManager(com.atlassian.plugin.webresource.WebResourceManager webResourceManager)
           
 void setXsrfTokenGenerator(com.atlassian.xwork.XsrfTokenGenerator xsrfTokenGenerator)
           
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doInput, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, 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

logger

protected final org.slf4j.Logger logger

tab

protected Integer tab

initialLoad

protected boolean initialLoad

actionMessageAlertColor

protected String actionMessageAlertColor
Webwork action messages color settings. Displays the type of message dressing to use.


ALERT_GREEN

public static final String ALERT_GREEN
See Also:
BaseAction#actionMessageAlertColor;, Constant Field Values

ALERT_YELLOW

public static final String ALERT_YELLOW
See Also:
BaseAction#actionMessageAlertColor;, Constant Field Values

ALERT_RED

public static final String ALERT_RED
See Also:
BaseAction#actionMessageAlertColor;, Constant Field Values

ALERT_BLUE

public static final String ALERT_BLUE
See Also:
BaseAction#actionMessageAlertColor;, Constant Field Values

propertyManager

protected PropertyManager propertyManager

directoryManager

protected DirectoryManager directoryManager

applicationManager

protected ApplicationManager applicationManager

crowdLicenseManager

protected CrowdLicenseManager crowdLicenseManager

applicationService

protected ApplicationService applicationService

tokenAuthenticationManager

protected TokenAuthenticationManager tokenAuthenticationManager

clientProperties

protected ClientProperties clientProperties
Constructor Detail

BaseAction

public BaseAction()
Method Detail

doDefault

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

isAuthenticated

public boolean isAuthenticated()

isAdmin

public boolean isAdmin()

getSitemeshPageProperty

public String getSitemeshPageProperty(String propertyName)

getSitemeshPageProperties

public Map<String,Object> getSitemeshPageProperties()

getUserName

public String getUserName()
                   throws InvalidUserException
Throws:
InvalidUserException

getRemoteUser

public SOAPPrincipal getRemoteUser()

getAttribute

public SOAPAttribute getAttribute(String name)
                           throws InvalidUserException
Throws:
InvalidUserException

getFirstAttribute

public String getFirstAttribute(String name)
                         throws InvalidUserException
Throws:
InvalidUserException

getSession

protected javax.servlet.http.HttpSession getSession()

getHttpRequest

protected javax.servlet.http.HttpServletRequest getHttpRequest()

getTab

public Integer getTab()

setTab

public void setTab(Integer tab)

isInitialLoad

public boolean isInitialLoad()

getLicense

public com.atlassian.extras.api.crowd.CrowdLicense getLicense()

isEvaluation

public boolean isEvaluation()

isSubscription

public boolean isSubscription()
Returns:
true if the license is a subscription license, false otherwise.

isWithinGracePeriod

public boolean isWithinGracePeriod()
Returns:
true if the license

isLicenseExpired

public boolean isLicenseExpired()

getActionMessageAlertColor

public String getActionMessageAlertColor()
Gets the action message color dressing to use with the decorator.

Returns:
The window dressing color to use.

addActionMessage

public void addActionMessage(String color,
                             String message)
Sets a UI message and the color type for the user.

Parameters:
color - The color to use.
message - The message to display.

getWebItemsForSection

public List getWebItemsForSection(String sectionName)

getWebSectionsForLocation

public List getWebSectionsForLocation(String location)

renderFreemarkerTemplate

public String renderFreemarkerTemplate(String templateString)

getWebFragmentsContextMap

public Map<String,Object> getWebFragmentsContextMap()

getDisplayableLink

public String getDisplayableLink(com.atlassian.plugin.web.model.WebLink link)

getLink

public String getLink(com.atlassian.plugin.web.model.WebLink link)

directory

public Directory directory(long directoryID)

containsErrorMessages

public boolean containsErrorMessages()

containsActionMessages

public boolean containsActionMessages()

setPropertyManager

public void setPropertyManager(PropertyManager propertyManager)

setDirectoryManager

public void setDirectoryManager(DirectoryManager directoryManager)

setCrowdLicenseManager

public void setCrowdLicenseManager(CrowdLicenseManager crowdLicenseManager)

setApplicationManager

public void setApplicationManager(ApplicationManager applicationManager)

setCrowdUserDetailsService

public void setCrowdUserDetailsService(CrowdUserDetailsService crowdUserDetailsService)

setWebInterfaceManager

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

getWebInterfaceManager

public com.atlassian.plugin.web.WebInterfaceManager getWebInterfaceManager()

getWebResourceManager

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

setWebResourceManager

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

getBootstrapManager

protected CrowdBootstrapManager getBootstrapManager()

isAtResourceLimit

public boolean isAtResourceLimit()

getCurrentLicenseResourceTotal

public Integer getCurrentLicenseResourceTotal()

getImageTitle

public String getImageTitle(boolean active,
                            ApplicationType applicationType)

getImageLocation

public String getImageLocation(boolean active,
                               ApplicationType applicationType)

authorisedToAccessCrowdConsole

protected boolean authorisedToAccessCrowdConsole(Long directoryId,
                                                 String name)
                                          throws DirectoryNotFoundException,
                                                 UserNotFoundException
Throws:
DirectoryNotFoundException
UserNotFoundException

authorisedToAccessCrowdAdminConsole

protected boolean authorisedToAccessCrowdAdminConsole(DirectoryMapping directoryMapping,
                                                      Long directoryId,
                                                      String username)
                                               throws DirectoryNotFoundException,
                                                      UserNotFoundException
Throws:
DirectoryNotFoundException
UserNotFoundException

getText

public String getText(String i18nKey,
                      List args,
                      boolean encode)

getXsrfTokenName

public String getXsrfTokenName()

getXsrfToken

public String getXsrfToken()

getText

public String getText(String i18nKey,
                      List args)
Specified by:
getText in interface com.opensymphony.xwork.TextProvider
Overrides:
getText in class com.opensymphony.xwork.ActionSupport

setApplicationService

public void setApplicationService(ApplicationService applicationService)

setTokenAuthenticationManager

public void setTokenAuthenticationManager(TokenAuthenticationManager tokenAuthenticationManager)

setClientProperties

public void setClientProperties(ClientProperties clientProperties)

setXsrfTokenGenerator

public void setXsrfTokenGenerator(com.atlassian.xwork.XsrfTokenGenerator xsrfTokenGenerator)


Copyright © 2012 Atlassian. All Rights Reserved.