com.atlassian.jira.config
Class DefaultFeatureStore

java.lang.Object
  extended by com.atlassian.jira.config.DefaultFeatureStore
All Implemented Interfaces:
FeatureStore

public class DefaultFeatureStore
extends Object
implements FeatureStore

Non cached implementation of feature store

Since:
v6.0

Constructor Summary
DefaultFeatureStore(OfBizDelegator ofBizDelegator)
           
 
Method Summary
 void create(String featureKey, String userKey)
          Creates an feature with the properties of the given feature.
 void delete(String featureKey, String userKey)
          Permanently removes the feature from the system.
 Set<String> getSiteFeatures()
          Returns a list of all enabled site features
 Set<String> getUserFeatures(String userKey)
          Returns a list of all enabled features for a user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFeatureStore

public DefaultFeatureStore(OfBizDelegator ofBizDelegator)
Method Detail

delete

public void delete(String featureKey,
                   String userKey)
            throws DataAccessException
Description copied from interface: FeatureStore
Permanently removes the feature from the system.

Specified by:
delete in interface FeatureStore
Parameters:
featureKey - the feature's id, must not be null.
userKey - the user who the feature is for. null if site feature
Throws:
DataAccessException - if there is a back-end storage problem.

create

public void create(String featureKey,
                   String userKey)
            throws DataAccessException
Description copied from interface: FeatureStore
Creates an feature with the properties of the given feature.

Specified by:
create in interface FeatureStore
Parameters:
featureKey - the name of the feature to create
userKey - the user who the feature is for. null if site feature
Throws:
DataAccessException - if there is a back-end storage problem.

getUserFeatures

public Set<String> getUserFeatures(@Nonnull
                                   String userKey)
                            throws DataAccessException
Description copied from interface: FeatureStore
Returns a list of all enabled features for a user

Specified by:
getUserFeatures in interface FeatureStore
Parameters:
userKey - the ApplicationUser key
Returns:
the enabled features for a user or an empty set
Throws:
DataAccessException

getSiteFeatures

public Set<String> getSiteFeatures()
                            throws DataAccessException
Description copied from interface: FeatureStore
Returns a list of all enabled site features

Specified by:
getSiteFeatures in interface FeatureStore
Returns:
the enabled site features or an empty set
Throws:
DataAccessException


Copyright © 2002-2014 Atlassian. All Rights Reserved.