summaryrefslogtreecommitdiffstats
path: root/sliPluginUtils/provider/src/main/java
diff options
context:
space:
mode:
authorKevin Smokowski <kevin.smokowski@att.com>2020-08-11 20:07:22 +0000
committerKevin Smokowski <kevin.smokowski@att.com>2020-08-11 20:34:12 +0000
commit45b5a460fdcec757f4482d69009b87da34728670 (patch)
tree746e2f4ca7165f28325d3c19f31cc90161a78153 /sliPluginUtils/provider/src/main/java
parente8f6c9650e8a082a3302dc182229e94962fea0f4 (diff)
add new print methods
create filtered print method for svclogic context Issue-ID: CCSDK-2643 Change-Id: I59261b1e581130d0fbe7d6735f96ee4c6e90ae75 Signed-off-by: Smokowski, Kevin (ks6305) <kevin.smokowski@att.com>
Diffstat (limited to 'sliPluginUtils/provider/src/main/java')
-rw-r--r--sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils.java b/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils.java
index 816bb5dff..2edb36dc4 100644
--- a/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils.java
+++ b/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils.java
@@ -733,6 +733,30 @@ public class SliPluginUtils implements SvcLogicJavaPlugin {
}
+ public static void logContextProperties(Map<String, String> parameters, SvcLogicContext ctx)
+ throws SvcLogicException {
+ if (LOG.isTraceEnabled()) {
+ String subpath = parameters.get("subpath");
+ if (subpath != null && !subpath.isEmpty()) {
+ ctx.printProperties(ctx.toProperties(), subpath);
+ } else {
+ ctx.printProperties(ctx.toProperties());
+ }
+ }
+ }
+
+ public static void logContextAttributes(Map<String, String> parameters, SvcLogicContext ctx)
+ throws SvcLogicException {
+ if (LOG.isTraceEnabled()) {
+ String subpath = parameters.get("subpath");
+ if (subpath != null && !subpath.isEmpty()) {
+ ctx.printAttributes(subpath);
+ } else {
+ ctx.printAttributes();
+ }
+ }
+ }
+
/**
* Checks context memory for a set of required parameters
* Every parameter aside from prefix will be treated as mandatory