aboutsummaryrefslogtreecommitdiffstats
path: root/operation-utils/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'operation-utils/src/main/resources')
-rw-r--r--operation-utils/src/main/resources/GenericMessages.properties65
-rw-r--r--operation-utils/src/main/resources/GenericMessages.yaml36
-rw-r--r--operation-utils/src/main/resources/messageEnum.java_template18
-rw-r--r--operation-utils/src/main/resources/operationEnum.java_template13
-rw-r--r--operation-utils/src/main/resources/properties_template9
5 files changed, 141 insertions, 0 deletions
diff --git a/operation-utils/src/main/resources/GenericMessages.properties b/operation-utils/src/main/resources/GenericMessages.properties
new file mode 100644
index 0000000..b7322f8
--- /dev/null
+++ b/operation-utils/src/main/resources/GenericMessages.properties
@@ -0,0 +1,65 @@
+########################################################################
+#Resource key=Error Code|Message text|Resolution text |Description text
+#######
+# {component}-{subcomponent}-{4-digit code}{classification}
+#Newlines can be utilized to add some clarity ensuring continuing line
+#has atleast one leading space
+#ResourceKey=\
+# ERR0000E\
+# Sample error msg txt\
+# Sample resolution msg\
+# Sample description txt
+#
+#######
+#Error code classification category for other components
+#1400-1499 Security/Permission Related
+#2400-2499 Availability/Timeout Related
+#3400-3499 Data Access/Integrity Related
+#4400-4499 Schema Interface Type/Validation
+#5400-5499 Business/Flow Processing Related
+#6400-6499 Reserved \u2013 do not use
+#9400-9499 Unknown Errors
+#
+######
+#{classification} description
+# I = Information
+# W = Warning
+# E = Error
+# F = Fatal
+########################################################################
+GENERAL_INFO=\
+ ECOMP-GENERAL-INFO-5401|\
+ {0}|\
+ Please check other logs for more detailed info|\
+ General info
+GENERAL_WARNING=\
+ ECOMP-GENERAL-WARNING-5402|\
+ {0}|\
+ Please check other logs for more detailed info|\
+ General warning
+GENERAL_ERROR=\
+ ECOMP-GENERAL-ERROR-5403|\
+ {0}|\
+ Please check other logs for more detailed info|\
+ General error
+AUDIT_BEGIN=\
+ ECOMP-GENERAL-5403|\
+ Entering method|\
+ No resolution needed|\
+ Entering method
+AUDIT_END=\
+ ECOMP-GENERAL-5404|\
+ Exiting method|\
+ No resolution needed|\
+ Exiting method
+METRICS_BEGIN=\
+ ECOMP-GENERAL-5403|\
+ Entering method|\
+ No resolution needed|\
+ Entering method
+METRICS_END=\
+ ECOMP-GENERAL-5404|\
+ Exiting method|\
+ No resolution needed|\
+ Exiting method
+
diff --git a/operation-utils/src/main/resources/GenericMessages.yaml b/operation-utils/src/main/resources/GenericMessages.yaml
new file mode 100644
index 0000000..df592e2
--- /dev/null
+++ b/operation-utils/src/main/resources/GenericMessages.yaml
@@ -0,0 +1,36 @@
+GENERAL_ERROR:
+ errorCode: ECOMP-GENERAL-ERROR-5403
+ messageFormat: '{0}'
+ resolution: Please check other logs for more detailed info
+ description: General error
+GENERAL_INFO:
+ errorCode: ECOMP-GENERAL-INFO-5401
+ messageFormat: '{0}'
+ resolution: Please check other logs for more detailed info
+ description: General info
+GENERAL_WARNING:
+ errorCode: ECOMP-GENERAL-WARNING-5402
+ messageFormat: '{0}'
+ resolution: Please check other logs for more detailed info
+ description: General warning
+METRICS_END:
+ errorCode: ECOMP-GENERAL-5404
+ messageFormat: Exiting method
+ resolution: No resolution needed
+ description: Exiting method
+AUDIT_END:
+ errorCode: ECOMP-GENERAL-5404
+ messageFormat: Exiting method
+ resolution: No resolution needed
+ description: Exiting method
+AUDIT_BEGIN:
+ errorCode: ECOMP-GENERAL-5403
+ messageFormat: Entering method
+ resolution: No resolution needed
+ description: Entering method
+METRICS_BEGIN:
+ errorCode: ECOMP-GENERAL-5403
+ messageFormat: Entering method
+ resolution: No resolution needed
+ description: Entering method
+
diff --git a/operation-utils/src/main/resources/messageEnum.java_template b/operation-utils/src/main/resources/messageEnum.java_template
new file mode 100644
index 0000000..e0b3c12
--- /dev/null
+++ b/operation-utils/src/main/resources/messageEnum.java_template
@@ -0,0 +1,18 @@
+
+package $packageName;
+
+import com.att.eelf.i18n.EELFResourceManager;
+import org.openecomp.logger.EcompMessageEnum;
+
+public enum ${name}MessageEnum implements EcompMessageEnum {
+<%
+def last
+messages.each { n, v -> last = n }
+messages.each { n, v -> %>
+ $n${n==last ? ";" : ","}\
+<% } %>
+
+ static {
+ EELFResourceManager.loadMessageBundle("${packageName}.$name");
+ }
+}
diff --git a/operation-utils/src/main/resources/operationEnum.java_template b/operation-utils/src/main/resources/operationEnum.java_template
new file mode 100644
index 0000000..9ec9d3d
--- /dev/null
+++ b/operation-utils/src/main/resources/operationEnum.java_template
@@ -0,0 +1,13 @@
+
+package $packageName;
+
+import org.openecomp.entity.EcompOperationEnum;
+
+public enum ${name}OperationEnum implements EcompOperationEnum {
+<%
+def last
+operations.each { n, v -> last = n }
+operations.each { n, v -> %>
+ $n${n==last ? ";" : ","}\
+<% } %>
+}
diff --git a/operation-utils/src/main/resources/properties_template b/operation-utils/src/main/resources/properties_template
new file mode 100644
index 0000000..76b2b48
--- /dev/null
+++ b/operation-utils/src/main/resources/properties_template
@@ -0,0 +1,9 @@
+<%
+ messages.each { n, v ->
+%>
+$n=\\
+ $v.errorCode|\\
+ $v.messageFormat|\\
+ $v.resolution|\\
+ $v.description
+<% } %> \ No newline at end of file