com.atlassian.greenhopper.service.context
Class ContextListsManager

java.lang.Object
  extended by com.atlassian.greenhopper.service.context.ContextListsManager

@Service(value="gh-contextListsManager")
public class ContextListsManager
extends java.lang.Object

Manages the different lists of contexts (shared, user) and provides ContextInfo objects


Field Summary
static java.lang.String SERVICE
          Service identifier to be used for dependency injection.
 
Constructor Summary
ContextListsManager()
           
 
Method Summary
 void addSharedContext(ProjectConfiguration projectConfiguration, Context context)
           
 void addUserContext(UserBoardsPreferences userBoardsPreferences, Context context)
           
 java.util.Set<ContextInfo> getAllContexts(com.opensymphony.user.User user, ProjectConfiguration projectConfiguration)
          This method returns context info objects for whatever has been stored against user/shared contexts No attempt is taken at verifying that the context is still available.
 ContextInfo getDefaultInfo(ProjectConfiguration projectConfiguration)
           
 ContextInfo getInfo(com.opensymphony.user.User user, ProjectConfiguration projectConfiguration, java.lang.String nameOrId)
          Get a ContextInfo object for a given nameOrId string
 ContextInfo getOnTheFlyInfo(com.opensymphony.user.User user)
           
 void removeSharedContext(ProjectConfiguration projectConfiguration, Context context)
           
 void removeUserContext(UserBoardsPreferences userBoardsPreferences, Context context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE

public static final java.lang.String SERVICE
Service identifier to be used for dependency injection.

See Also:
Constant Field Values
Constructor Detail

ContextListsManager

public ContextListsManager()
Method Detail

getAllContexts

public java.util.Set<ContextInfo> getAllContexts(com.opensymphony.user.User user,
                                                 ProjectConfiguration projectConfiguration)
This method returns context info objects for whatever has been stored against user/shared contexts No attempt is taken at verifying that the context is still available.


getDefaultInfo

public ContextInfo getDefaultInfo(ProjectConfiguration projectConfiguration)

getOnTheFlyInfo

public ContextInfo getOnTheFlyInfo(com.opensymphony.user.User user)

getInfo

public ContextInfo getInfo(com.opensymphony.user.User user,
                           ProjectConfiguration projectConfiguration,
                           java.lang.String nameOrId)
Get a ContextInfo object for a given nameOrId string

Returns:
the ContextInfo object or null if not found/invalid/no permission

addSharedContext

public void addSharedContext(ProjectConfiguration projectConfiguration,
                             Context context)

removeSharedContext

public void removeSharedContext(ProjectConfiguration projectConfiguration,
                                Context context)

addUserContext

public void addUserContext(UserBoardsPreferences userBoardsPreferences,
                           Context context)

removeUserContext

public void removeUserContext(UserBoardsPreferences userBoardsPreferences,
                              Context context)


Copyright © 2007-2011 Atlassian. All Rights Reserved.