com.atlassian.jira.bc.project.component.ProjectComponentManager |
![]() |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
Methods for accessing and persisting project components.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | NO_COMPONENTS | Used to represent empty component fields. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Implement this method in order to check whether component with specified name is stored.
| |||||||||||
This method is deprecated.
don't use GenericValue use the ProjectComponent instead.
| |||||||||||
This method is deprecated.
don't use GenericValue use the ProjectComponent instead.
| |||||||||||
Implement this method to create a new ProjectComponent object associated with the project with the ID specified
and with the values given.
| |||||||||||
Implement this method to delete the component.
| |||||||||||
Deletes all components in given project.
| |||||||||||
Implement this method to find the component with the specified ID.
| |||||||||||
Implement this method to find all components.
| |||||||||||
Implement this method to find all components associated with the project with the ID specified.
| |||||||||||
Returns all unique names of the components that belong to the passed projects.
| |||||||||||
Returns all unique names of components associated with all the projects with the ID-s specified.
| |||||||||||
Finds the ProjectComponent with the given name in the project with the given id.
| |||||||||||
Finds all ProjectComponents with the given name with comparisons case insenstive.
| |||||||||||
This method is deprecated.
use findComponentsByIssue that returns a Collection
| |||||||||||
Retrieve a collection of ProjectComponents - where the lead of each component is the specified user.
| |||||||||||
Implement this method to look up the project ID for the given component ID.
| |||||||||||
Creates a list of ProjectComponent objects from the given list of IDs.
| |||||||||||
Returns a list of all Issue IDs with the given component.
| |||||||||||
Returns the component with the given ID or null if not found.
| |||||||||||
Implement this method to update the component specified with the values given.
| |||||||||||
Updates the list of components in issue
|
Used to represent empty component fields.
Implement this method in order to check whether component with specified name is stored.
name | component name, null will cause IllegalArgumentException |
---|---|
projectId | project ID |
This method is deprecated.
don't use GenericValue use the ProjectComponent instead.
Converts the ProjectComponent to GenericValue form, provided as a transitional measure until GenericValue is eradicated from the front end.
projectComponent | project component |
---|
This method is deprecated.
don't use GenericValue use the ProjectComponent instead.
Temporary method to allow conversion of a collection of ProjectComponent objects to a collection of GenericValues representing a project component.
projectComponents | a collection of project components |
---|
Implement this method to create a new ProjectComponent object associated with the project with the ID specified
and with the values given. It should also validate the values - store and return the ProjectComponent if
validation succeeds. Otherwise, throw ValidationErrorsException
.
name | name of component |
---|---|
description | description of component |
lead | user name associated with component |
assigneeType | assignee type |
projectId | ID of project that component is associated with |
IllegalArgumentException | if one or more arguments have invalid values |
---|
Implement this method to delete the component.
componentId | component id |
---|
EntityNotFoundException | if the component is not found |
---|
Deletes all components in given project. Note that this method will not fire a ProjectComponentDeleted upon deletion of a component.
projectId | id of the project in which components will be deleted. |
---|
Implement this method to find the component with the specified ID.
id | component ID to search for |
---|
EntityNotFoundException | if the component is not found |
---|
Implement this method to find all components.
Implement this method to find all components associated with the project with the ID specified.
projectId | ID of project to search for |
---|
Returns all unique names of the components that belong to the passed projects.
projects | projects to search in |
---|
Returns all unique names of components associated with all the projects with the ID-s specified.
projectIds | ID-s of project to search for |
---|
Finds the ProjectComponent with the given name in the project with the given id.
projectId | id of the project. |
---|---|
componentName | name of the component. |
Finds all ProjectComponents with the given name with comparisons case insenstive.
componentName | name of the component. |
---|
issue | find components on this issue |
---|
This method is deprecated.
use findComponentsByIssue that returns a Collection
This code used to live directly in the IssueImpl but it has been refactored into the ProjectComponentManager to make things a little cleaner. That's why it is "new in 4.2" but immediately marked as deprecated
issue | find components for this issue |
---|
Retrieve a collection of ProjectComponents - where the lead of each component is the specified user.
userName | the lead user name |
---|
Implement this method to look up the project ID for the given component ID. If project is not found, throws EntityNotFoundException.
componentId | component ID |
---|
EntityNotFoundException | if component with the specified id cannot be found |
---|
Creates a list of ProjectComponent objects from the given list of IDs.
ids | The List of ProjectComponent IDs. |
---|
EntityNotFoundException | if no ProjectComponent exists for any of the given IDs. |
---|
Returns a list of all Issue IDs with the given component.
component | the component |
---|
Returns the component with the given ID or null if not found.
projectComponentId | component ID |
---|
Implement this method to update the component specified with the values given.
component | component to be updated |
---|
EntityNotFoundException | if component is not found |
---|
Updates the list of components in issue
issue | updated issue |
---|---|
newValue | list of components |