com.atlassian.greenhopper.service.configuration
Class GreenHopperSettingsServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.configuration.GreenHopperSettingsServiceImpl
All Implemented Interfaces:
GreenHopperAnalyticsSettingsSupplier, GreenHopperSettingsService

@Service
public class GreenHopperSettingsServiceImpl
extends java.lang.Object
implements GreenHopperSettingsService

This service provides general system wide GreenHopper configuration.

Currently this passes through to GHConfiguration


Constructor Summary
GreenHopperSettingsServiceImpl()
           
 
Method Summary
 void disableBetaFeature(BetaFeatures feature)
          Disable the specified beta feature.
 void enableBetaFeature(BetaFeatures feature)
          Enable the specified beta feature.
 java.util.List<BetaFeatures> getAllBetaFeatures()
           
 boolean getPreviousAnalyticsPreference()
          Retrieve the previously set Analytics preference.
 int getQueryResultLimit()
          Get the query result limit for this instance.
 boolean isAnalyticsEnabled()
           
 boolean isBetaFeatureEnabled(BetaFeatures feature)
          Is the specified beta feature enabled?
 boolean isHostedEnvironment()
          Is this JIRA instance hosted?
 boolean isQueryResultLimited()
          Is a query result limit set?
 void setPreviousAnalyticsPreference(boolean wasEnabled)
          Store a value to reflect the previously set Analytics preference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GreenHopperSettingsServiceImpl

public GreenHopperSettingsServiceImpl()
Method Detail

getQueryResultLimit

public int getQueryResultLimit()
Description copied from interface: GreenHopperSettingsService
Get the query result limit for this instance.

Specified by:
getQueryResultLimit in interface GreenHopperSettingsService
Returns:
the set resource limit or Integer.MAX_VALUE if not set. The returned int is guaranteed to be positive (limit > 0)

isQueryResultLimited

public boolean isQueryResultLimited()
Description copied from interface: GreenHopperSettingsService
Is a query result limit set?

Specified by:
isQueryResultLimited in interface GreenHopperSettingsService

isHostedEnvironment

public boolean isHostedEnvironment()
Description copied from interface: GreenHopperSettingsService
Is this JIRA instance hosted?

Specified by:
isHostedEnvironment in interface GreenHopperSettingsService

getAllBetaFeatures

public java.util.List<BetaFeatures> getAllBetaFeatures()
Specified by:
getAllBetaFeatures in interface GreenHopperSettingsService
Returns:
all the GH beta features applicable to this instance.

isBetaFeatureEnabled

public boolean isBetaFeatureEnabled(BetaFeatures feature)
Description copied from interface: GreenHopperSettingsService
Is the specified beta feature enabled?

Specified by:
isBetaFeatureEnabled in interface GreenHopperSettingsService
Parameters:
feature - the feature
Returns:
true if enabled; false otherwise

enableBetaFeature

public void enableBetaFeature(BetaFeatures feature)
Description copied from interface: GreenHopperSettingsService
Enable the specified beta feature.

Specified by:
enableBetaFeature in interface GreenHopperSettingsService
Parameters:
feature - the feature to enable

disableBetaFeature

public void disableBetaFeature(BetaFeatures feature)
Description copied from interface: GreenHopperSettingsService
Disable the specified beta feature.

Specified by:
disableBetaFeature in interface GreenHopperSettingsService
Parameters:
feature - the feature to disable

setPreviousAnalyticsPreference

public void setPreviousAnalyticsPreference(boolean wasEnabled)
Description copied from interface: GreenHopperSettingsService
Store a value to reflect the previously set Analytics preference.

Specified by:
setPreviousAnalyticsPreference in interface GreenHopperSettingsService
Parameters:
wasEnabled - whether the previous value was true or false.

getPreviousAnalyticsPreference

public boolean getPreviousAnalyticsPreference()
Description copied from interface: GreenHopperSettingsService
Retrieve the previously set Analytics preference. This was reset for legal reasons in GH 6.3 in order to show users the new opt in message.

Specified by:
getPreviousAnalyticsPreference in interface GreenHopperSettingsService
Returns:

isAnalyticsEnabled

public boolean isAnalyticsEnabled()
Specified by:
isAnalyticsEnabled in interface GreenHopperAnalyticsSettingsSupplier


Copyright © 2007-2013 Atlassian. All Rights Reserved.