|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.mock.project.component.MockProjectComponentManager
public class MockProjectComponentManager
| Field Summary |
|---|
| Fields inherited from interface com.atlassian.jira.bc.project.component.ProjectComponentManager |
|---|
NO_COMPONENTS |
| Constructor Summary | |
|---|---|
MockProjectComponentManager()
|
|
| Method Summary | |
|---|---|
boolean |
containsName(String name,
Long projectId)
Implement this method in order to check whether component with specified name is stored. |
org.ofbiz.core.entity.GenericValue |
convertToGenericValue(ProjectComponent projectComponent)
Converts the ProjectComponent to GenericValue form, provided as a transitional measure until GenericValue is eradicated from the front end. |
Collection<org.ofbiz.core.entity.GenericValue> |
convertToGenericValues(Collection<ProjectComponent> projectComponents)
Temporary method to allow conversion of a collection of ProjectComponent objects to a collection of GenericValues representing a project component. |
ProjectComponent |
create(String name,
String description,
String lead,
long assigneeType,
Long projectId)
Implement this method to create a new ProjectComponent object associated with the project with the ID specified and with the values given. |
void |
delete(Long componentId)
Implement this method to delete the component. |
ProjectComponent |
find(Long id)
Implement this method to find the component with the specified ID. |
Collection<ProjectComponent> |
findAll()
Implement this method to find all components. |
Collection<ProjectComponent> |
findAllForProject(Long projectId)
Implement this method to find all components associated with the project with the ID specified. |
Collection<String> |
findAllUniqueNamesForProjectObjects(Collection<Project> projects)
Returns all unique names of the components that belong to the passed projects. |
Collection<String> |
findAllUniqueNamesForProjects(Collection<Long> projectIds)
Returns all unique names of components associated with all the projects with the ID-s specified. |
ProjectComponent |
findByComponentName(Long projectId,
String componentName)
Finds the ProjectComponent with the given name in the project with the given id. |
Collection<ProjectComponent> |
findByComponentNameCaseInSensitive(String componentName)
Finds all ProjectComponents with the given name with comparisons case insenstive. |
Collection<ProjectComponent> |
findComponentsByIssue(Issue issue)
|
Collection<org.ofbiz.core.entity.GenericValue> |
findComponentsByIssueGV(Issue issue)
This code used to live directly in the IssueImpl but it has been refactored into the ProjectComponentManager to make things a little cleaner. |
Collection<ProjectComponent> |
findComponentsByLead(String userName)
Retrieve a collection of ProjectComponents - where the lead of each component is the specified user. |
Long |
findProjectIdForComponent(Long componentId)
Implement this method to look up the project ID for the given component ID. |
List<ProjectComponent> |
getComponents(List<Long> ids)
Creates a list of ProjectComponent objects from the given list of IDs. |
Collection<Long> |
getIssueIdsWithComponent(ProjectComponent component)
Returns a list of all Issue IDs with the given component. |
ProjectComponent |
update(MutableProjectComponent component)
Implement this method to update the component specified with the values given. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockProjectComponentManager()
| Method Detail |
|---|
public ProjectComponent create(String name,
String description,
String lead,
long assigneeType,
Long projectId)
throws IllegalArgumentException
ProjectComponentManagerValidationErrorsException.
create in interface ProjectComponentManagername - name of componentdescription - description of componentlead - user name associated with componentassigneeType - assignee typeprojectId - ID of project that component is associated with
IllegalArgumentException - if one or more arguments have invalid values
public ProjectComponent find(Long id)
throws EntityNotFoundException
ProjectComponentManager
find in interface ProjectComponentManagerid - component ID to search for
EntityNotFoundException - if the component is not foundpublic Collection<ProjectComponent> findAllForProject(Long projectId)
ProjectComponentManager
findAllForProject in interface ProjectComponentManagerprojectId - ID of project to search for
public Collection<String> findAllUniqueNamesForProjects(Collection<Long> projectIds)
ProjectComponentManager
findAllUniqueNamesForProjects in interface ProjectComponentManagerprojectIds - ID-s of project to search for
public Collection<ProjectComponent> findAll()
ProjectComponentManager
findAll in interface ProjectComponentManagerpublic Collection<String> findAllUniqueNamesForProjectObjects(Collection<Project> projects)
ProjectComponentManager
findAllUniqueNamesForProjectObjects in interface ProjectComponentManagerprojects - projects to search in
public List<ProjectComponent> getComponents(List<Long> ids)
throws EntityNotFoundException
ProjectComponentManager
getComponents in interface ProjectComponentManagerids - The List of ProjectComponent IDs.
EntityNotFoundException - if no ProjectComponent exists for any of the given IDs.
public ProjectComponent update(MutableProjectComponent component)
throws EntityNotFoundException
ProjectComponentManager
update in interface ProjectComponentManagercomponent - component to be updated
EntityNotFoundException - if component is not found
public void delete(Long componentId)
throws EntityNotFoundException
ProjectComponentManager
delete in interface ProjectComponentManagercomponentId - component id
EntityNotFoundException - if the component is not found
public boolean containsName(String name,
Long projectId)
ProjectComponentManager
containsName in interface ProjectComponentManagername - component name, null will cause IllegalArgumentExceptionprojectId - project ID
public Long findProjectIdForComponent(Long componentId)
throws EntityNotFoundException
ProjectComponentManager
findProjectIdForComponent in interface ProjectComponentManagercomponentId - component ID
EntityNotFoundException - if component with the specified id cannot be foundpublic org.ofbiz.core.entity.GenericValue convertToGenericValue(ProjectComponent projectComponent)
ProjectComponentManager
convertToGenericValue in interface ProjectComponentManagerprojectComponent - project component
public Collection<org.ofbiz.core.entity.GenericValue> convertToGenericValues(Collection<ProjectComponent> projectComponents)
ProjectComponentManager
convertToGenericValues in interface ProjectComponentManagerprojectComponents - a collection of project components
public ProjectComponent findByComponentName(Long projectId,
String componentName)
ProjectComponentManager
findByComponentName in interface ProjectComponentManagerprojectId - id of the project.componentName - name of the component.
public Collection<ProjectComponent> findByComponentNameCaseInSensitive(String componentName)
ProjectComponentManager
findByComponentNameCaseInSensitive in interface ProjectComponentManagercomponentName - name of the component.
public Collection<ProjectComponent> findComponentsByLead(String userName)
ProjectComponentManager
findComponentsByLead in interface ProjectComponentManageruserName - the lead user name
public Collection<ProjectComponent> findComponentsByIssue(Issue issue)
findComponentsByIssue in interface ProjectComponentManagerissue - find components on this issue
@Nonnull
public Collection<Long> getIssueIdsWithComponent(@Nonnull
ProjectComponent component)
ProjectComponentManager
getIssueIdsWithComponent in interface ProjectComponentManagercomponent - the component
public Collection<org.ofbiz.core.entity.GenericValue> findComponentsByIssueGV(Issue issue)
ProjectComponentManager
findComponentsByIssueGV in interface ProjectComponentManagerissue - find components for this issue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||