VinodKumarS-Huawei | af9c7a7 | 2016-08-30 19:43:39 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 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 org.onosproject.yms.ych; |
| 18 | |
| 19 | /** |
| 20 | * Abstraction of an entity which has the composite protocol request. |
Shankara-Huawei | d5823ab | 2016-11-22 10:14:52 +0530 | [diff] [blame] | 21 | * <p> |
VinodKumarS-Huawei | af9c7a7 | 2016-08-30 19:43:39 +0530 | [diff] [blame] | 22 | * Protocols like RESTCONF, have split the schema specific information across |
| 23 | * different components in the protocol encoding. |
Shankara-Huawei | d5823ab | 2016-11-22 10:14:52 +0530 | [diff] [blame] | 24 | * <p> |
VinodKumarS-Huawei | af9c7a7 | 2016-08-30 19:43:39 +0530 | [diff] [blame] | 25 | * 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 | */ |
| 29 | public 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-Huawei | d5823ab | 2016-11-22 10:14:52 +0530 | [diff] [blame] | 52 | |
| 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-Huawei | af9c7a7 | 2016-08-30 19:43:39 +0530 | [diff] [blame] | 73 | } |