|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.bc.project.component.DefaultProjectComponentService
public class DefaultProjectComponentService
Field Summary | |
---|---|
static String |
FIELD_COMPONENT_LEAD
lead field name |
static String |
FIELD_NAME
name field name |
static String |
FIELD_PROJECT_ID
project ID field name |
static String |
KEY_ID_NULL
|
static String |
KEY_LEAD_SET_FOR_NONENTERPRISE_EDITION
|
static String |
KEY_NAME_NOT_SET
|
static String |
KEY_NAME_NOT_UNIQUE
|
static String |
KEY_NO_SUCH_COMPONENT
|
static String |
KEY_NO_SUCH_COMPONENT_TO_SWAP_WITH_ID
|
static String |
KEY_NO_SUCH_COMPONENT_WITH_ID
|
static String |
KEY_PROJECT_ID_NOT_FOUND
|
static String |
KEY_PROJECT_ID_NULL
|
static String |
KEY_USER_DOES_NOT_EXIST
|
static String |
KEY_USER_NO_PERMISSION
|
static String |
KEY_USER_NO_PERMISSION_WITH_USER
|
Constructor Summary | |
---|---|
DefaultProjectComponentService(JiraAuthenticationContext jiraAuthenticationContext,
PermissionManager permissionManager,
ProjectComponentManager projectComponentManager,
ProjectManager projectManager,
IssueManager issueManager)
|
Method Summary | |
---|---|
ProjectComponent |
create(User user,
ErrorCollection errorCollection,
String name,
String description,
String lead,
Long projectId)
Create a new ProjectComponent object associated with the project with the ID specified and with the values given. |
void |
deleteAndSwapComponentForIssues(JiraServiceContext context,
Long componentId,
Long swapComponentId)
|
void |
deleteComponentForIssues(JiraServiceContext context,
Long componentId)
|
ProjectComponent |
find(ErrorCollection errorCollection,
Long id)
|
Collection |
findAllForProject(ErrorCollection errorCollection,
Long projectId)
|
ProjectComponent |
update(User user,
ErrorCollection errorCollection,
MutableProjectComponent component)
|
protected void |
validateLead(com.atlassian.jira.bc.project.component.DefaultProjectComponentService.Handler handler,
String lead)
Validates lead. |
protected void |
validateName(com.atlassian.jira.bc.project.component.DefaultProjectComponentService.Handler handler,
String oldName,
String newName,
Long projectId)
Validates newName. |
protected void |
validateProjectId(com.atlassian.jira.bc.project.component.DefaultProjectComponentService.Handler handler,
Long projectId)
Validates project ID. |
protected void |
verifyUserExists(com.atlassian.jira.bc.project.component.DefaultProjectComponentService.Handler handler,
String user)
Verifies that the user with the name specified is a valid JIRA user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String KEY_USER_NO_PERMISSION
public static final String KEY_USER_NO_PERMISSION_WITH_USER
public static final String KEY_NO_SUCH_COMPONENT
public static final String KEY_NO_SUCH_COMPONENT_WITH_ID
public static final String KEY_NO_SUCH_COMPONENT_TO_SWAP_WITH_ID
public static final String KEY_ID_NULL
public static final String KEY_PROJECT_ID_NULL
public static final String KEY_PROJECT_ID_NOT_FOUND
public static final String KEY_NAME_NOT_SET
public static final String KEY_NAME_NOT_UNIQUE
public static final String KEY_LEAD_SET_FOR_NONENTERPRISE_EDITION
public static final String KEY_USER_DOES_NOT_EXIST
public static final String FIELD_PROJECT_ID
public static final String FIELD_NAME
public static final String FIELD_COMPONENT_LEAD
Constructor Detail |
---|
public DefaultProjectComponentService(JiraAuthenticationContext jiraAuthenticationContext, PermissionManager permissionManager, ProjectComponentManager projectComponentManager, ProjectManager projectManager, IssueManager issueManager)
Method Detail |
---|
public ProjectComponent create(User user, ErrorCollection errorCollection, String name, String description, String lead, Long projectId)
create
in interface ProjectComponentService
user
- user performing this operationerrorCollection
- collection to add error messages to if validation and permission checks fail - String objectsname
- name of componentdescription
- description of componentlead
- user name associated with componentprojectId
- ID of project that component is associated with
public ProjectComponent find(ErrorCollection errorCollection, Long id)
find
in interface ProjectComponentService
public Collection findAllForProject(ErrorCollection errorCollection, Long projectId)
findAllForProject
in interface ProjectComponentService
public ProjectComponent update(User user, ErrorCollection errorCollection, MutableProjectComponent component)
update
in interface ProjectComponentService
public void deleteComponentForIssues(JiraServiceContext context, Long componentId)
deleteComponentForIssues
in interface ProjectComponentService
public void deleteAndSwapComponentForIssues(JiraServiceContext context, Long componentId, Long swapComponentId)
deleteAndSwapComponentForIssues
in interface ProjectComponentService
protected void validateProjectId(com.atlassian.jira.bc.project.component.DefaultProjectComponentService.Handler handler, Long projectId)
handler
- validation and permission check handlerprojectId
- project IDprotected void validateName(com.atlassian.jira.bc.project.component.DefaultProjectComponentService.Handler handler, String oldName, String newName, Long projectId)
oldName
- old namenewName
- new nameprojectId
- project IDhandler
- validation and permission check handlerprotected void validateLead(com.atlassian.jira.bc.project.component.DefaultProjectComponentService.Handler handler, String lead)
lead
- leadhandler
- validation and permission check handlerprotected void verifyUserExists(com.atlassian.jira.bc.project.component.DefaultProjectComponentService.Handler handler, String user)
user
- user to verify
IllegalArgumentException
- if user does not exist
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |