com.atlassian.greenhopper.jira
Class JiraServiceContextFactory

java.lang.Object
  extended by com.atlassian.greenhopper.jira.JiraServiceContextFactory

@Service
public class JiraServiceContextFactory
extends java.lang.Object

JiraServiceContext is needed quite a lot when calling JIRA. The only information we normally care about passing in is the current user. We've got our own ErrorCollection implementation, and don't really care about i18n here.

Author:
ahennecke

Constructor Summary
JiraServiceContextFactory()
           
 
Method Summary
 com.atlassian.jira.bc.JiraServiceContext buildAnonymousContext()
           
 com.atlassian.jira.bc.JiraServiceContext buildCurrentUserContext()
           
 com.atlassian.jira.bc.JiraServiceContext buildUserContext(com.atlassian.crowd.embedded.api.User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraServiceContextFactory

public JiraServiceContextFactory()
Method Detail

buildAnonymousContext

public com.atlassian.jira.bc.JiraServiceContext buildAnonymousContext()
Returns:
A JiraServiceContext that doesn't have a user. Use this in cases where there's no user around, like in lifecycle events.

buildCurrentUserContext

public com.atlassian.jira.bc.JiraServiceContext buildCurrentUserContext()
Returns:
A JiraServiceContext with the current user from the threadLocal request context.

buildUserContext

public com.atlassian.jira.bc.JiraServiceContext buildUserContext(com.atlassian.crowd.embedded.api.User user)


Copyright © 2007-2012 Atlassian. All Rights Reserved.