1 /*
2 * Copyright (C) 2010 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
17 package com.atlassian.jira.rest.client.api;
18
19 import java.io.Closeable;
20 import java.io.IOException;
21
22 /**
23 * Main access point to REST com.atlassian.jira.rest.client.api.
24 * As there are many types resources exposed by JIRA REST API, various resources are grouped into clusters
25 * and then handled by different specialized *RestClient classes.
26 *
27 * @since v0.1
28 */
29 public interface JiraRestClient extends Closeable {
30 /**
31 * @return com.atlassian.jira.rest.client.api for performing operations on selected issue
32 */
33 IssueRestClient getIssueClient();
34
35 /**
36 * @return the com.atlassian.jira.rest.client.api handling session information
37 */
38 SessionRestClient getSessionClient();
39
40 /**
41 * @return the com.atlassian.jira.rest.client.api handling full user information
42 */
43 UserRestClient getUserClient();
44
45 /**
46 * @return the com.atlassian.jira.rest.client.api handling project metadata
47 */
48 ProjectRestClient getProjectClient();
49
50 /**
51 * @return the com.atlassian.jira.rest.client.api handling components
52 */
53 ComponentRestClient getComponentClient();
54
55 /**
56 * @return the com.atlassian.jira.rest.client.api handling basic meta-data (data dictionaries defined in JIRA - like resolutions, statuses,
57 * priorities)
58 */
59 MetadataRestClient getMetadataClient();
60
61 /**
62 * @return the com.atlassian.jira.rest.client.api handling search (e.g. JQL)
63 */
64 SearchRestClient getSearchClient();
65
66 /**
67 * @return the com.atlassian.jira.rest.client.api handling project versions.
68 */
69 VersionRestClient getVersionRestClient();
70
71 /**
72 * @return the com.atlassian.jira.rest.client.api for project roles.
73 */
74 ProjectRolesRestClient getProjectRolesRestClient();
75
76 /**
77 * Destroys this instance of JIRA Rest Client.
78 *
79 * @throws Exception
80 */
81 void close() throws IOException;
82 }