Gizmo to load multiple Db Edge Rules files
[aai/gizmo.git] / src / main / java / org / onap / schema / util / SchemaIngestPropertyReader.java
index 71ea47e..ca5fa6b 100644 (file)
@@ -46,11 +46,37 @@ public class SchemaIngestPropertyReader {
      * Gets the location of the OXM
      *
      * @return
-     * @throws SpikeException
-     * @throws IOException
+     * @throws CrudException
      */
     public String getNodeDir() throws CrudException {
 
+        return getProps ().getProperty("nodeDir");
+    }
+
+    /**
+     * Gets the location of the Edge Rules
+     *
+     * @return
+     * @throws CrudException
+     */
+    public String getEdgeDir() throws CrudException {
+
+        return getProps ().getProperty("edgeDir");
+    }
+
+    /**
+     * Gets the location of the Edge Properties
+     *
+     * @return
+     * @throws CrudException
+     */
+    public String getEdgePropsDir() throws CrudException {
+
+        return getProps ().getProperty("edgePropsDir");
+    }
+
+    private Properties getProps() throws CrudException {
+
         Properties prop = new Properties();
         try {
             prop = loadFromFile(SCHEMA_INGEST_PROPERTIES_LOCATION);
@@ -66,7 +92,7 @@ public class SchemaIngestPropertyReader {
             logger.error(CrudServiceMsgs.SCHEMA_INGEST_LOAD_ERROR, e.getMessage());
             throw new CrudException("Failed to load schemaIngest.properties", e);
         }
-        return prop.getProperty("nodeDir");
+        return prop;
     }
 
     private Properties loadFromFile(String filename) throws IOException {