2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.aai.schemaservice.nodeschema.validation;
24 * Controls response to finding problems in the schema files.
26 public interface SchemaErrorStrategy {
28 * Gives if it is OK to proceed with whatever process
29 * invoked the validation (probably the installation of
30 * the A&AI instance).
34 public boolean isOK();
37 * Gets the error message(s) gathered in the course
40 * @return String error message or messages concatenated together
42 public String getErrorMsg();
45 * Invokes the ErrorStrategy to do whatever response to
46 * an issue in the schema having been found.
49 * -Throw an exception if the whole process should be
51 * -Set OK status to false, store the message and allow the
52 * validation process to continue and find any other issues
53 * -Completely ignore that something is wrong
56 * @param String errorMsg - the error message from the validator module
58 public void notifyOnError(String errorMsg);