blob: 975c3f411e95217c8f2d70fdff84c5af32bf1333 [file] [log] [blame]
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +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
VinodKumarS-Huawei2ee9e7e2016-06-01 14:30:22 +053017package org.onosproject.yangutils.linker;
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053018
Gaurav Agrawal0d43bb52016-05-17 18:06:38 +053019import org.onosproject.yangutils.linker.exceptions.LinkerException;
Vinod Kumar S427d2932016-04-20 13:02:58 +053020
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053021/**
22 * Abstraction of YANG resolvable information. Abstracted to obtain the
23 * information required for linking resolution.
24 */
25public interface Resolvable {
26
27 /**
28 * Returns the status of resolution. If completely resolved returns enum
29 * value "RESOLVED", if not returns "UNRESOLVED", in case reference of
30 * grouping/typedef is added to uses/type but it's not resolved
Vinod Kumar Sd4deb062016-04-15 18:08:57 +053031 * "INTRA_FILE_RESOLVED" is returned.
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053032 *
33 * @return status of resolution
34 */
35 ResolvableStatus getResolvableStatus();
36
37 /**
38 * Set the status of type/uses resolution. If completely resolved set enum
39 * value "RESOLVED", if not set it to "UNRESOLVED", in case reference of
40 * grouping/typedef is added to uses/type but it's not resolved
Vinod Kumar Sd4deb062016-04-15 18:08:57 +053041 * "INTRA_FILE_RESOLVED" should be set.
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053042 *
43 * @param resolvableStatus status of resolution
44 */
45 void setResolvableStatus(ResolvableStatus resolvableStatus);
46
47 /**
48 * Resolves the linking.
Vinod Kumar S427d2932016-04-20 13:02:58 +053049 *
Gaurav Agrawal0d43bb52016-05-17 18:06:38 +053050 * @throws LinkerException linker error
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053051 */
Vinod Kumar S427d2932016-04-20 13:02:58 +053052 void resolve()
Gaurav Agrawal0d43bb52016-05-17 18:06:38 +053053 throws LinkerException;
Gaurav Agrawald9d6cc82016-03-29 02:17:23 +053054}