From 3c86680e532b959bd637b6c093b3916ae5bcee11 Mon Sep 17 00:00:00 2001 From: "Thomas Nelson Jr (arthurdent3) tn1381@att.com" Date: Tue, 13 Mar 2018 20:10:04 -0400 Subject: Docker update and POM fix Update the docker for cassandra to change ownership of imported files. Update the POM to fix bug Numerous bug fixes fro Logging and Error reporting. Change-Id: I518807f9796734134341ebefd109219050a84b51 Issue-ID: MUSIC-56, MUSIC-57, MUSIC-58 Signed-off-by: Thomas Nelson Jr (arthurdent3) tn1381@att.com --- src/main/java/org/onap/music/main/CachingUtil.java | 40 ---------------------- 1 file changed, 40 deletions(-) (limited to 'src/main/java/org/onap/music/main/CachingUtil.java') diff --git a/src/main/java/org/onap/music/main/CachingUtil.java b/src/main/java/org/onap/music/main/CachingUtil.java index aee3abbf..16a02862 100755 --- a/src/main/java/org/onap/music/main/CachingUtil.java +++ b/src/main/java/org/onap/music/main/CachingUtil.java @@ -60,7 +60,6 @@ public class CachingUtil implements Runnable { private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CachingUtil.class); private static CacheAccess musicCache = JCS.getInstance("musicCache"); - private static CacheAccess musicLockCache = JCS.getInstance("musicLockCache"); private static CacheAccess> aafCache = JCS.getInstance("aafCache"); private static CacheAccess appNameCache = JCS.getInstance("appNameCache"); private static Map userAttempts = new HashMap<>(); @@ -98,7 +97,6 @@ public class CachingUtil implements Runnable { String userId = row.getString("username"); String password = row.getString("password"); String keySpace = row.getString("application_name"); - String uuid = row.getUUID("uuid").toString(); try { userAttempts.put(nameSpace, 0); AAFResponse responseObj = triggerAAF(nameSpace, userId, password); @@ -107,7 +105,6 @@ public class CachingUtil implements Runnable { map.put(userId, password); aafCache.put(nameSpace, map); musicCache.put(nameSpace, keySpace); - musicLockCache.put(nameSpace, uuid); logger.debug("Cronjob: Cache Updated with AAF response for namespace " + nameSpace); } @@ -260,43 +257,6 @@ public class CachingUtil implements Runnable { resultMap.put("aid", uuid); return resultMap; } - - - public static Map authenticateAIDUserLock(String aid, String nameSpace) - throws Exception { - Map resultMap = new HashMap<>(); - String uuid = null; - - if (musicLockCache.get(nameSpace) == null) { - PreparedQueryObject pQuery = new PreparedQueryObject(); - pQuery.appendQueryString( - "SELECT uuid from admin.keyspace_master where application_name = '" - + nameSpace + "' allow filtering"); - Row rs = MusicCore.get(pQuery).one(); - try { - uuid = rs.getUUID("uuid").toString(); - musicLockCache.put(nameSpace, uuid); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(), AppMessages.QUERYERROR,ErrorSeverity.ERROR, ErrorTypes.QUERYERROR); - resultMap.put("Exception", "Unauthorized operation. Check AID and Namespace. "); - return resultMap; - } - if (!musicLockCache.get(nameSpace).toString().equals(aid)) { - resultMap.put("Exception Message", - "Unauthorized operation. Invalid AID for the Namespace"); - return resultMap; - } - } else if (musicLockCache.get(nameSpace) != null - && !musicLockCache.get(nameSpace).toString().equals(aid)) { - resultMap.put("Exception Message", - "Unauthorized operation. Invalid AID for the Namespace"); - return resultMap; - } - return resultMap; - } - - - public static void updateMusicCache(String aid, String keyspace) { logger.info(EELFLoggerDelegate.applicationLogger,"Updating musicCache for keyspace " + keyspace + " with aid " + aid); -- cgit 1.2.3-korg