Merge "Sonar fixes related to exceptions"
[aaf/authz.git] / auth / auth-core / src / main / java / org / onap / aaf / auth / server / AbsService.java
index d8c7311..bb6f198 100644 (file)
@@ -104,8 +104,18 @@ public abstract class AbsService<ENV extends BasicEnv, TRANS extends Trans> exte
                }
     }
 
-       public abstract Filter[] filters() throws CadiException,  LocatorException;
-
+       protected abstract Filter[] _filters(Object ... additionalTafLurs) throws CadiException,  LocatorException;
+       
+       /**
+        * Overload this method to add new TAF or LURs
+        * 
+        * @return
+        * @throws CadiException
+        * @throws LocatorException
+        */
+       public Filter[] filters() throws CadiException,  LocatorException {
+               return _filters();
+       }
 
     public abstract Registrant<ENV>[] registrants(final int port) throws CadiException, LocatorException;
 
@@ -126,16 +136,13 @@ public abstract class AbsService<ENV extends BasicEnv, TRANS extends Trans> exte
      * @return
      * @throws LocatorException 
      */
-    protected synchronized AAFConHttp _newAAFConHttp() throws CadiException, LocatorException {
-               try {
+               protected synchronized AAFConHttp _newAAFConHttp() throws CadiException, LocatorException {
                        if(aafCon==null) {
                                aafCon = new AAFConHttp(access);
-                       } 
+                       }
                        return aafCon;
-               } catch (APIException e) {
-                       throw new CadiException(e);
+
                }
-    }
     
     // This is a method, so we can overload for AAFAPI
     public String aaf_url() {
@@ -176,4 +183,5 @@ public abstract class AbsService<ENV extends BasicEnv, TRANS extends Trans> exte
                }
                return def;
        }
+
 }