diff options
author | 2018-06-13 08:40:26 -0400 | |
---|---|---|
committer | 2018-06-13 08:54:06 -0400 | |
commit | 00832f054dd0c21492af531548e321ea25cdb8b4 (patch) | |
tree | e9017ca88d1e987a315c2faad1c49b873d3e5ca1 /src/main/java/org/onap/schema/util/SchemaIngestPropertyReader.java | |
parent | 18703cdc19842806969d30f19f8171469c79a0fe (diff) |
Gizmo to load multiple Db Edge Rules files
There is an Edge Rule file for each OXM file.
For every OXM version that is loaded, an edge rule file
should also be loaded.
Issue-ID: AAI-1201
Change-Id: I728e577ea8152623d3c5e2f0e8edf677f0eb9ef4
Signed-off-by: Shwetank Dave <shwetank.dave@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap/schema/util/SchemaIngestPropertyReader.java')
-rw-r--r-- | src/main/java/org/onap/schema/util/SchemaIngestPropertyReader.java | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/main/java/org/onap/schema/util/SchemaIngestPropertyReader.java b/src/main/java/org/onap/schema/util/SchemaIngestPropertyReader.java index 71ea47e..ca5fa6b 100644 --- a/src/main/java/org/onap/schema/util/SchemaIngestPropertyReader.java +++ b/src/main/java/org/onap/schema/util/SchemaIngestPropertyReader.java @@ -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 { |