diff options
author | Wiktor Garbarek <wiktor.garbarek@nokia.com> | 2018-06-25 15:43:14 +0200 |
---|---|---|
committer | Wiktor Garbarek <wiktor.garbarek@nokia.com> | 2018-06-25 15:56:05 +0200 |
commit | d874753af8a4f5d8db615370c607cc938659eefe (patch) | |
tree | 84040a15ea981c3b0f2983c0ac1fa1e61fa64f2c | |
parent | 9482344fa5f2a5c68c369a7662456bc23a2fb11c (diff) |
Extracted repeating strings; added annotations
Change-Id: Ibe92169b6819f032f5609849f785c22d76ffc237
Issue-ID: AAI-1239
Signed-off-by: Wiktor Garbarek <wiktor.garbarek@nokia.com>
3 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java index 648d9d0..0c26eb3 100644 --- a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java +++ b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java @@ -43,10 +43,11 @@ public class AAIMicroServiceAuthCore { private static LogHelper applicationLogger = LogHelper.INSTANCE; + public static final String CONFIG_HOME = "CONFIG_HOME"; public static final String FILESEP = (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator"); - public static final String APPCONFIG_DIR = (System.getProperty("CONFIG_HOME") == null) - ? System.getProperty("APP_HOME") + FILESEP + "appconfig" : System.getProperty("CONFIG_HOME"); + public static final String APPCONFIG_DIR = (System.getProperty(CONFIG_HOME) == null) + ? System.getProperty("APP_HOME") + FILESEP + "appconfig" : System.getProperty(CONFIG_HOME); private static String appConfigAuthDir = APPCONFIG_DIR + FILESEP + "auth"; private static String defaultAuthFileName = appConfigAuthDir + FILESEP + "auth_policy.json"; @@ -85,7 +86,7 @@ public class AAIMicroServiceAuthCore { throw new AAIAuthException(e.getMessage()); } if (policyAuthFileName == null) { - throw new AAIAuthException("Auth policy file could not be found" + System.getProperty("CONFIG_HOME") + APPCONFIG_DIR); + throw new AAIAuthException("Auth policy file could not be found" + System.getProperty(CONFIG_HOME) + APPCONFIG_DIR); } AAIMicroServiceAuthCore.reloadUsers(); diff --git a/src/main/java/org/onap/aai/babel/service/GenerateArtifactsService.java b/src/main/java/org/onap/aai/babel/service/GenerateArtifactsService.java index 33f6f1a..205d208 100644 --- a/src/main/java/org/onap/aai/babel/service/GenerateArtifactsService.java +++ b/src/main/java/org/onap/aai/babel/service/GenerateArtifactsService.java @@ -36,6 +36,7 @@ import org.onap.aai.auth.AAIAuthException; @Path("/app") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) +@FunctionalInterface public interface GenerateArtifactsService { @POST diff --git a/src/main/java/org/onap/aai/babel/xml/generator/ArtifactGenerator.java b/src/main/java/org/onap/aai/babel/xml/generator/ArtifactGenerator.java index 3d07a7a..6558ed5 100644 --- a/src/main/java/org/onap/aai/babel/xml/generator/ArtifactGenerator.java +++ b/src/main/java/org/onap/aai/babel/xml/generator/ArtifactGenerator.java @@ -24,6 +24,7 @@ import java.util.List; import org.onap.aai.babel.service.data.BabelArtifact; import org.onap.aai.babel.xml.generator.data.Artifact; +@FunctionalInterface public interface ArtifactGenerator { /** |