com.atlassian.jira.bc
Class JiraServiceContextImpl

java.lang.Object
  extended by com.atlassian.jira.bc.JiraServiceContextImpl
All Implemented Interfaces:
JiraServiceContext

public class JiraServiceContextImpl
extends Object
implements JiraServiceContext

Default implementation of the JiraServiceContext.


Constructor Summary
JiraServiceContextImpl(User user)
          Instantiates this class with given user and new empty error collection
JiraServiceContextImpl(User user, ErrorCollection errorCollection)
          Instantiates this class with user and error collection
 
Method Summary
 boolean equals(Object o)
           
 ErrorCollection getErrorCollection()
          Returns error collection, never null
 I18nHelper getI18nBean()
          Get an I18nHelper for localising text.
 User getUser()
          Returns user, can be null
 int hashCode()
           
 String toString()
          Prints username and error collection
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JiraServiceContextImpl

public JiraServiceContextImpl(User user,
                              ErrorCollection errorCollection)
                       throws IllegalArgumentException
Instantiates this class with user and error collection

Parameters:
user - user
errorCollection - error collection
Throws:
IllegalArgumentException - if error collection is null

JiraServiceContextImpl

public JiraServiceContextImpl(User user)
Instantiates this class with given user and new empty error collection

Parameters:
user - user
Method Detail

getErrorCollection

public ErrorCollection getErrorCollection()
Returns error collection, never null

Specified by:
getErrorCollection in interface JiraServiceContext
Returns:
error colleciton

getUser

public User getUser()
Returns user, can be null

Specified by:
getUser in interface JiraServiceContext
Returns:
user

getI18nBean

public I18nHelper getI18nBean()
Description copied from interface: JiraServiceContext
Get an I18nHelper for localising text.

Specified by:
getI18nBean in interface JiraServiceContext
Returns:
an I18nHelper for localising text.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Prints username and error collection

Overrides:
toString in class Object
Returns:
string representing username and error collection of this context


Copyright © 2002-2010 Atlassian. All Rights Reserved.