diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2018-12-17 22:59:54 +0530 |
---|---|---|
committer | IBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com> | 2018-12-17 23:00:03 +0530 |
commit | d014abc1d5d72d7e4fcf56f81936fb22f8967262 (patch) | |
tree | 2ea4e2f80ed1586abd2e276e11541a93003cb990 /auth/auth-batch/src/main/java | |
parent | 52c89c9940544c1b2db1dd1e0ce9b22e2fcdca42 (diff) |
Sonar Fix: Perm.java
Fixed sonar issues/code-smells across this file
Issue-ID: AAF-676
Change-Id: I6175fa46bb1d36d2ec72608d7b68b322fe81e65d
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'auth/auth-batch/src/main/java')
-rw-r--r-- | auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Perm.java | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Perm.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Perm.java index 21bd71ee..acf54274 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Perm.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Perm.java @@ -3,6 +3,8 @@ * org.onap.aaf * =========================================================================== * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright © 2018 IBM. * =========================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,9 +44,24 @@ public class Perm implements Comparable<Perm> { public static final TreeMap<String,Perm> keys = new TreeMap<>(); private static List<Perm> deletePerms = new ArrayList<>(); - public final String ns, type, instance, action,description; - private String fullType = null, fullPerm = null, encode = null; + public final String ns; + public final String type; + public final String instance; + public final String action; + public final String description; + private String fullType = null; + private String fullPerm = null; + private String encode = null; public final Set<String> roles; + + public Perm(String ns, String type, String instance, String action, String description, Set<String> roles) { + this.ns = ns; + this.type = type; + this.instance = instance; + this.action = action; + this.description = description; + this.roles = roles; + } public String encode() { if (encode == null) { @@ -66,17 +83,6 @@ public class Perm implements Comparable<Perm> { } return fullPerm; } - - public Perm(String ns, String type, String instance, String action, String description, Set<String> roles) { - this.ns = ns; - this.type = type; - this.instance = instance; - this.action = action; - this.description = description; - // 2.0.11 -// this.full = encode();//ns+'.'+type+'|'+instance+'|'+action; - this.roles = roles; - } public static void load(Trans trans, Session session) { load(trans, session, "select ns, type, instance, action, description, roles from authz.perm;"); |