Package com.atlassian.jira.bc
Class JiraServiceContextImpl
java.lang.Object
com.atlassian.jira.bc.JiraServiceContextImpl
- All Implemented Interfaces:
JiraServiceContext
Default implementation of the JiraServiceContext.
For now, this guy has to be considered as API because devs must feed a JiraServiceContext instance to Service methods, and this is the only way to create one that will be compatible with mulitple versions of JIRA. If we don't like this, we need to provide a Factory or something.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates this class with given user and new empty error collection.JiraServiceContextImpl(ApplicationUser user, ErrorCollection errorCollection) Instantiates this class with user and error collection.JiraServiceContextImpl(ApplicationUser user, ErrorCollection errorCollection, I18nHelper i18nHelper) Instantiates this class with user and error collection and I18nHelper. -
Method Summary
-
Constructor Details
-
JiraServiceContextImpl
Instantiates this class with given user and new empty error collection. The I18nHelper will be created from the User supplied.- Parameters:
user- user
-
JiraServiceContextImpl
Instantiates this class with user and error collection. The I18nHelper will be created from the User supplied.- Parameters:
user- usererrorCollection- error collection; must not be null- Throws:
IllegalArgumentException- if error collection is null
-
JiraServiceContextImpl
public JiraServiceContextImpl(ApplicationUser user, ErrorCollection errorCollection, I18nHelper i18nHelper) Instantiates this class with user and error collection and I18nHelper.- Parameters:
user- usererrorCollection- error collection; must not be nulli18nHelper- optional I18nHelper to use- Throws:
IllegalArgumentException- if error collection is null
-
-
Method Details
-
getErrorCollection
Returns error collection, never null- Specified by:
getErrorCollectionin interfaceJiraServiceContext- Returns:
- error collection
-
getLoggedInApplicationUser
Description copied from interface:JiraServiceContextReturns the User who has invoked the JIRA service method.- Specified by:
getLoggedInApplicationUserin interfaceJiraServiceContext- Returns:
- user who is performing the operation (can be null).
-
getI18nBean
Description copied from interface:JiraServiceContextGet an I18nHelper for localising text.- Specified by:
getI18nBeanin interfaceJiraServiceContext- Returns:
- an I18nHelper for localising text.
-
equals
-
hashCode
public int hashCode() -
toString
Prints username and error collection
-