Collection syntax change because of Sonar
[aaf/authz.git] / auth / auth-certman / src / main / java / org / onap / aaf / auth / cm / AAF_CM.java
index c1bc820..a9a9b4e 100644 (file)
@@ -49,11 +49,12 @@ import org.onap.aaf.auth.env.AuthzTransFilter;
 import org.onap.aaf.auth.rserv.HttpMethods;
 import org.onap.aaf.auth.server.AbsService;
 import org.onap.aaf.auth.server.JettyServiceStarter;
+import org.onap.aaf.auth.server.Log4JLogIt;
 import org.onap.aaf.cadi.Access;
+import org.onap.aaf.cadi.Access.Level;
 import org.onap.aaf.cadi.CadiException;
 import org.onap.aaf.cadi.LocatorException;
 import org.onap.aaf.cadi.PropAccess;
-import org.onap.aaf.cadi.Access.Level;
 import org.onap.aaf.cadi.aaf.v2_0.AAFAuthn;
 import org.onap.aaf.cadi.aaf.v2_0.AAFLurPerm;
 import org.onap.aaf.cadi.aaf.v2_0.AAFTrustChecker;
@@ -70,7 +71,7 @@ import com.datastax.driver.core.Cluster;
 public class AAF_CM extends AbsService<AuthzEnv, AuthzTrans> {
 
        private static final String USER_PERMS = "userPerms";
-       private static final Map<String,CA> certAuths = new TreeMap<String,CA>();
+       private static final Map<String,CA> certAuths = new TreeMap<>();
        public Facade1_0 facade1_0; // this is the default Facade
        public Facade1_0 facade1_0_XML; // this is the XML Facade
        public Map<String, Dated> cacheUser;
@@ -200,11 +201,12 @@ public class AAF_CM extends AbsService<AuthzEnv, AuthzTrans> {
        }
 
        @Override
-       public Filter[] filters() throws CadiException, LocatorException {
+       public Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException {
                try {
                        return new Filter[] {
                                        new AuthzTransFilter(env,aafCon(),
-                                               new AAFTrustChecker((Env)env))
+                                       new AAFTrustChecker((Env)env),
+                                       additionalTafLurs)
                                };
                } catch (NumberFormatException e) {
                        throw new CadiException("Invalid Property information", e);
@@ -226,10 +228,11 @@ public class AAF_CM extends AbsService<AuthzEnv, AuthzTrans> {
        }
 
        public static void main(final String[] args) {
-               PropAccess propAccess = new PropAccess(args);
                try {
+                       Log4JLogIt logIt = new Log4JLogIt(args, "cm");
+                       PropAccess propAccess = new PropAccess(logIt,args);
+
                        AAF_CM service = new AAF_CM(new AuthzEnv(propAccess));
-//                     env.setLog4JNames("log4j.properties","authz","cm","audit","init","trace");
                        JettyServiceStarter<AuthzEnv,AuthzTrans> jss = new JettyServiceStarter<AuthzEnv,AuthzTrans>(service);
                        jss.start();
                } catch (Exception e) {