diff options
author | Dominic Lunanuova <dgl@research.att.com> | 2018-02-07 22:10:00 +0000 |
---|---|---|
committer | Dominic Lunanuova <dgl@research.att.com> | 2018-02-08 18:49:02 +0000 |
commit | b9a6ae1246c02031deb7f5e0d016f242e7d99452 (patch) | |
tree | d71f92fe43309c79500dd111b7e0d483a4ba8d55 /dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/util/DbcappProperties.java | |
parent | b5a2c68c1a2c00751575d938d983f4301822f6d3 (diff) |
Refactor to use org.onap local packages
This is stage 1 of refactoring to use org.onap instead of org.openecomp
in java packages and class names.
Leaving the update from openecomp portalsdk to onap epsdk for a future
exercise since I'm trying to get a standalone GUI working (i.e. non-portal).
Issue-ID: DMAAP-159
Change-Id: I6a9368c66fa3603b1d9984f600802326ff2f0592
Signed-off-by: Dominic Lunanuova <dgl@research.att.com>
Diffstat (limited to 'dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/util/DbcappProperties.java')
-rw-r--r-- | dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/util/DbcappProperties.java | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/util/DbcappProperties.java b/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/util/DbcappProperties.java deleted file mode 100644 index b08e007..0000000 --- a/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/dcae/dmaapbc/dbcapp/util/DbcappProperties.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.openecomp.dcae.dmaapbc.dbcapp.util; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.core.env.Environment; - -/** - * Publishes a list of constants and methods to access the properties that are - * read by Spring from the specified configuration file(s). - * - * Should be used like this (and never in a constructor): - * - * <pre> - * @Autowired - * DbcappProperties properties; - * </pre> - */ -@Configuration -@PropertySource(value = { "${container.classpath:}/WEB-INF/dbcapp/dbcapp.properties" }) -public class DbcappProperties { - - public static final String DMAAP_REST_URL_LIST = "dmaap.rest.url.list"; - public static final String DMAAP_MECHID_NAME = "dmaap.mechid.name"; - public static final String DMAAP_MECHID_PASSWORD = "dmaap.mechid.password"; - public static final String PROFILE_ACCESS_METHOD = "profile.access.method"; - public static final String PROFILE_USVC_URL = "profile.microservice.url"; - public static final String PROFILE_USVC_USER = "profile.microservice.user.name"; - public static final String PROFILE_USVC_PASS = "profile.microservice.user.password"; - public static final String DMAAP_PII_TYPE_LIST = "dmaap.pii.type.list"; - - private Environment environment; - - public DbcappProperties() { - } - - protected Environment getEnvironment() { - return environment; - } - - @Autowired - public void setEnvironment(final Environment environment) { - this.environment = environment; - } - - public boolean containsProperty(String key) { - return environment.containsProperty(key); - } - - public String getProperty(String key) { - return environment.getRequiredProperty(key); - } - - /** - * Gets the values for a comma-separated list property value as a String - * array. - * - * @param key - * Property key - * @return Array of values with leading and trailing whitespace removed; - * null if key is not found. - */ - public String[] getCsvListProperty(final String key) { - String listVal = getProperty(key); - if (listVal == null) - return null; - String[] vals = listVal.split("\\s*,\\s*"); - return vals; - } - -} |