blob: 05694acd59ca767da5dd6cc416ddd20dca9f3350 [file] [log] [blame]
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +05303 *
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
17package org.onosproject.yms.ych;
18
19/**
20 * Abstraction of an entity which has the composite protocol request.
Shankara-Huaweid5823ab2016-11-22 10:14:52 +053021 * <p>
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +053022 * Protocols like RESTCONF, have split the schema specific information across
23 * different components in the protocol encoding.
Shankara-Huaweid5823ab2016-11-22 10:14:52 +053024 * <p>
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +053025 * There is a resource identifier, which is part of the RESTCONF request URL.
26 * and there is the information about the resource being operated on in the
27 * request, this is part of the request body.
28 */
29public interface YangCompositeEncoding {
30
31 /**
32 * Retrieves the resource identifier on which the operation is being
33 * performed.
34 *
35 * @return the string representation of the resource being identified
36 */
37 String getResourceIdentifier();
38
39 /**
40 * Retrieves the representation format of the resource identifier.
41 *
42 * @return the type of the resource identifier
43 */
44 YangResourceIdentifierType getResourceIdentifierType();
45
46 /**
47 * Retrieves the resource information in the protocol encoding format.
48 *
49 * @return the resource information in the protocol encoding format
50 */
51 String getResourceInformation();
Shankara-Huaweid5823ab2016-11-22 10:14:52 +053052
53 /**
54 * Sets resource identifier.
55 *
56 * @param resourceId resource identifier
57 */
58 void setResourceIdentifier(String resourceId);
59
60 /**
61 * Sets the resource information.
62 *
63 * @param resourceInfo resource information
64 */
65 void setResourceInformation(String resourceInfo);
66
67 /**
68 * Sets the resource identifier type.
69 *
70 * @param idType resource identifier
71 */
72 void setResourceIdentifierType(YangResourceIdentifierType idType);
VinodKumarS-Huaweiaf9c7a72016-08-30 19:43:39 +053073}