View Javadoc

1   /*
2    * Copyright (C) 2012 Atlassian
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package com.atlassian.jira.rest.client;
17  
18  import com.atlassian.jira.rest.client.domain.ProjectRole;
19  
20  import java.net.URI;
21  
22  /**
23   * The client handling roles resources.
24   *
25   * @since 1.0
26   */
27  public interface ProjectRolesRestClient {
28  
29  	/**
30  	 * Retrieves a full information about the selected role.
31  	 *
32  	 * @param uri URI of the role to retrieve.
33  	 * @param progressMonitor progress monitor.
34  	 * @return full information about selected role.
35  	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
36  	 */
37  	ProjectRole getRole(URI uri, ProgressMonitor progressMonitor);
38  
39  	/**
40  	 * Retrieves a full information about the selected role.
41  	 *
42  	 * @param projectUri uri of the project of the role to retrieve.
43  	 * @param roleId unique role id.
44  	 * @param progressMonitor progress monitor.
45  	 * @return full information about selected role.
46  	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
47  	 */
48  	ProjectRole getRole(URI projectUri, Long roleId, ProgressMonitor progressMonitor);
49  
50  	/**
51  	 * Retrieves a collection of roles in the selected project.
52  	 *
53  	 * @param projectUri uri of the project of the roles to retrieve.
54  	 * @param progressMonitor progress monitor.
55  	 * @return a collection of roles in the selected project.
56  	 * @throws RestClientException in case of problems (connectivity, malformed messages, etc.)
57  	 */
58  	Iterable<ProjectRole> getRoles(URI projectUri, ProgressMonitor progressMonitor);
59  
60  
61  
62  }