Incorporate the ECOMP SDC Artefact Generator code
[aai/babel.git] / src / main / java / org / onap / aai / babel / xml / generator / data / GeneratorConstants.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017-2018 European Software Marketing Ltd.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21 package org.onap.aai.babel.xml.generator.data;
22
23 public class GeneratorConstants {
24
25     /*
26      * Private constructor to prevent instantiation
27      */
28     private GeneratorConstants() {
29         throw new UnsupportedOperationException("This static class should not be instantiated!");
30     }
31
32     public static final String PROPERTY_ARTIFACT_GENERATOR_CONFIG_FILE = "artifactgenerator.config";
33
34     public static final String VERSION = "version";
35     public static final String CATEGORY = "category";
36     public static final String SUBCATEGORY = "subcategory";
37     public static final int ID_LENGTH = 36;
38
39     public static final String GENERATOR_AAI_GENERATED_ARTIFACT_EXTENSION = "xml";
40
41     // Error codes
42     public static final String GENERATOR_INVOCATION_ERROR_CODE = "ARTIFACT_GENERATOR_INVOCATION_ERROR";
43
44     // Error Constants
45     public static final String GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION = "Invalid Client Configuration";
46     public static final String GENERATOR_ERROR_ARTIFACT_GENERATION_FAILED =
47             "Unable to generate artifacts for the provided input";
48     public static final String GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED =
49             "Artifact Generation Service Instantiation failed";
50
51     // AAI Generator Error Messages
52     public static final String GENERATOR_AAI_ERROR_CHECKSUM_MISMATCH = "Checksum Mismatch for file : %s";
53     public static final String GENERATOR_AAI_ERROR_INVALID_TOSCA = "Invalid format for Tosca YML  : %s";
54     public static final String GENERATOR_AAI_ERROR_UNSUPPORTED_WIDGET_OPERATION = "Operation Not Supported for Widgets";
55     public static final String GENERATOR_AAI_ERROR_MISSING_SERVICE_TOSCA =
56             "Service tosca missing from list of input artifacts";
57     public static final String GENERATOR_AAI_ERROR_NULL_RESOURCE_VERSION_IN_SERVICE_TOSCA =
58             "Invalid Service definition mandatory attribute version missing for resource with UUID: <%s>";
59
60     public static final String GENERATOR_AAI_ERROR_INVALID_RESOURCE_VERSION_IN_SERVICE_TOSCA =
61             "Cannot generate artifacts. Invalid Resource version in Service tosca for resource with " + "UUID: "
62                     + "<%s>";
63     public static final String GENERATOR_AAI_ERROR_MISSING_RESOURCE_TOSCA =
64             "Cannot generate artifacts. Resource Tosca missing for resource with UUID: <%s>";
65
66     public static final String GENERATOR_AAI_ERROR_MISSING_SERVICE_VERSION =
67             "Cannot generate artifacts. Service version is not specified";
68
69     public static final String GENERATOR_AAI_INVALID_SERVICE_VERSION =
70             "Cannot generate artifacts. Service version is incorrect";
71
72     // Logging constants
73     public static final String PARTNER_NAME = "userId";
74     public static final String ERROR_CATEGORY = "ErrorCategory";
75     public static final String ERROR_CODE = "ErrorCode";
76     public static final String ERROR_DESCRIPTION = "ErrorDescription";
77
78     public static final String GENERATOR_ERROR_CODE = "300F";
79     public static final String GENERATOR_PARTNER_NAME = "SDC Catalog";
80
81     // AAI Generator Error Messages for Logging
82     public static final String GENERATOR_AAI_CONFIGFILE_NOT_FOUND =
83             "Cannot generate artifacts. Artifact Generator Configuration file not found at %s";
84     public static final String GENERATOR_AAI_CONFIGLOCATION_NOT_FOUND =
85             "Cannot generate artifacts. artifactgenerator.config system property not configured";
86     public static final String GENERATOR_AAI_CONFIGLPROP_NOT_FOUND =
87             "Cannot generate artifacts. Widget configuration not found for %s";
88     public static final String GENERATOR_AAI_PROVIDING_SERVICE_MISSING =
89             "Cannot generate artifacts. Providing Service is missing for allotted resource %s";
90     public static final String GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING =
91             "Cannot generate artifacts. Providing Service Metadata is missing for allotted resource %s";
92 }