|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.ww2.FreemarkerContext
public class FreemarkerContext
This class is similar to BambooActionSupport but does not require an action or action context. This makes this functionality available to any servlets as well.
Constructor Summary | |
---|---|
FreemarkerContext(BambooLicenseManager bambooLicenseManager,
AdministrationConfigurationManager administrationConfigurationManager,
BambooPermissionManager bambooPermissionManager,
DashboardCachingManager dashboardCachingManager,
com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager,
BambooUserManager bambooUserManager,
com.atlassian.plugin.PluginAccessor pluginAccessor,
PlanFavouriteService planFavouriteService,
GravatarService gravatarService,
ServerLifecycleProvider serverLifecycleProvider,
PlanManager planManager,
BootstrapManager bootstrapManager,
FeatureManager featureManager)
|
Method Summary | |
---|---|
BambooLicenseManager |
getBambooLicenseManager()
|
BootstrapManager |
getBootstrapManager()
|
java.lang.String |
getCurrentUrl(javax.servlet.http.HttpServletRequest request)
|
ElasticConfiguration |
getElasticConfig()
|
FeatureManager |
getFeatureManager()
|
java.lang.String |
getGravatarUrl(java.lang.String userName,
java.lang.String size)
|
java.lang.String |
getInstanceName()
|
PluggableFooter |
getPluggableFooter()
Gets the pluggable footer plugin. |
PluggableTopNavigation |
getPluggableTopNavigation()
Gets the pluggable top navigation plugin. |
int |
getRemainingJobsLimit()
|
ServerLifecycleState |
getServerLifecycleState()
|
com.atlassian.user.User |
getUser(javax.servlet.http.HttpServletRequest request)
|
java.util.Map<java.lang.String,java.lang.Object> |
getWebFragmentsContextMapNoAction(javax.servlet.http.HttpServletRequest request)
A context map that gets appended to for web fragments. |
java.util.List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> |
getWebItemsForSectionNoAction(java.lang.String sectionName,
javax.servlet.http.HttpServletRequest request)
Will not bother putting any build information on the context |
java.util.Collection<java.lang.String> |
getWebPanels(java.lang.String location)
Gets all the rendered WebPanel s for the location specified. |
java.util.Collection<java.lang.String> |
getWebPanels(java.lang.String location,
java.util.Map<java.lang.String,java.lang.Object> context)
|
java.util.Collection<java.lang.String> |
getWebPanelsForPlan(java.lang.String location,
java.lang.String planKey)
Gets all the rendered WebPanel s for the location specified for a specific plan key. |
java.util.Collection<java.lang.String> |
getWebPanelsForResultsSummary(java.lang.String location,
ResultsSummary resultsSummary)
Gets all the rendered WebPanel s for the location specified for a specific ResultSummary. |
java.util.List<com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor> |
getWebSectionsForLocationNoAction(java.lang.String location,
javax.servlet.http.HttpServletRequest request)
Will not bother putting any build information on the context |
boolean |
hasAdminPermission()
|
boolean |
hasBuilds()
|
boolean |
hasGlobalAdminPermission()
|
boolean |
hasGlobalPermission(java.lang.String permission)
Does this user have the global permission right? |
boolean |
hasRestrictedAdminPermission()
|
boolean |
isAuthorBambooServer(java.lang.String userName)
Is the supplied author user the bamboo server? |
boolean |
isEc2ConfigurationWarningRequired()
|
boolean |
isEnableSignup()
|
boolean |
isFavourite(Plan plan,
javax.servlet.http.HttpServletRequest request)
|
boolean |
isUserAutocompleteAllowed()
|
java.lang.String |
renderFreemarkerTemplateNoAction(java.lang.String templateString,
javax.servlet.http.HttpServletRequest request)
Will not bother putting any build information on the context |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FreemarkerContext(BambooLicenseManager bambooLicenseManager, AdministrationConfigurationManager administrationConfigurationManager, BambooPermissionManager bambooPermissionManager, DashboardCachingManager dashboardCachingManager, com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager, BambooUserManager bambooUserManager, com.atlassian.plugin.PluginAccessor pluginAccessor, PlanFavouriteService planFavouriteService, GravatarService gravatarService, ServerLifecycleProvider serverLifecycleProvider, PlanManager planManager, BootstrapManager bootstrapManager, FeatureManager featureManager)
Method Detail |
---|
@Nullable public java.lang.String getInstanceName()
@Nullable public com.atlassian.user.User getUser(javax.servlet.http.HttpServletRequest request)
public boolean isEnableSignup()
public boolean isUserAutocompleteAllowed()
public boolean isEc2ConfigurationWarningRequired()
@Nullable public ElasticConfiguration getElasticConfig()
@Nullable public java.lang.String getCurrentUrl(javax.servlet.http.HttpServletRequest request)
public boolean hasBuilds()
public int getRemainingJobsLimit()
public boolean isFavourite(Plan plan, javax.servlet.http.HttpServletRequest request)
@Nullable public java.lang.String getGravatarUrl(@Nullable java.lang.String userName, java.lang.String size)
public boolean isAuthorBambooServer(@Nullable java.lang.String userName)
userName
-
public java.util.List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> getWebItemsForSectionNoAction(java.lang.String sectionName, javax.servlet.http.HttpServletRequest request)
sectionName
- - the section to retrieve the web items forrequest
- - the http request
public java.util.List<com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor> getWebSectionsForLocationNoAction(java.lang.String location, javax.servlet.http.HttpServletRequest request)
location
- - the location to retrieve the web sections forrequest
- - the http request
public java.lang.String renderFreemarkerTemplateNoAction(java.lang.String templateString, javax.servlet.http.HttpServletRequest request)
templateString
- - to renderrequest
- - the http request
public boolean hasGlobalPermission(java.lang.String permission)
permission
- The global permission being checked.
true
if the current user has this permission; false
otherwise.public boolean hasGlobalAdminPermission()
public boolean hasRestrictedAdminPermission()
public boolean hasAdminPermission()
public BambooLicenseManager getBambooLicenseManager()
@NotNull public ServerLifecycleState getServerLifecycleState()
@Nullable public PluggableTopNavigation getPluggableTopNavigation()
@Nullable public PluggableFooter getPluggableFooter()
public java.util.Map<java.lang.String,java.lang.Object> getWebFragmentsContextMapNoAction(javax.servlet.http.HttpServletRequest request)
request
- - servlet request
public java.util.Collection<java.lang.String> getWebPanelsForPlan(@NotNull java.lang.String location, @NotNull java.lang.String planKey)
WebPanel
s for the location specified for a specific plan key. Allows the same web
panel location to be used in multiple places on page with different plan contexts. If called in the context of
rendering a BambooActionSupport
action the context used is taken from BambooActionSupport.getWebPanelContext(String)
location
- the web panel will be displayedplanKey
- key of the plan for the context
public java.util.Collection<java.lang.String> getWebPanelsForResultsSummary(@NotNull java.lang.String location, @NotNull ResultsSummary resultsSummary)
WebPanel
s for the location specified for a specific ResultSummary. Allows the same
web panel location to be used in multiple places on page with different plan contexts. If called in the context
of rendering a BambooActionSupport
action the context used is taken from BambooActionSupport.getWebPanelContext(String)
location
- the web panel will be displayedresultsSummary
- passed to the web panels in the context
public java.util.Collection<java.lang.String> getWebPanels(@NotNull java.lang.String location)
WebPanel
s for the location specified.
If called in the context of rendering a BambooActionSupport
action the context used is taken from BambooActionSupport.getWebPanelContext(String)
location
-
public java.util.Collection<java.lang.String> getWebPanels(@NotNull java.lang.String location, @NotNull java.util.Map<java.lang.String,java.lang.Object> context)
public FeatureManager getFeatureManager()
public BootstrapManager getBootstrapManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |