ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject [07/12] incubator-ranger git commit: RANGER-194: Rename classes under web-admin project
Date Tue, 16 Dec 2014 02:44:37 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/RangerDaoManagerBase.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/RangerDaoManagerBase.java b/security-admin/src/main/java/org/apache/ranger/db/RangerDaoManagerBase.java
new file mode 100644
index 0000000..61bcca5
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/db/RangerDaoManagerBase.java
@@ -0,0 +1,213 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.apache.ranger.db;
+
+/**
+ * 
+ */
+
+import javax.persistence.EntityManager;
+
+import org.apache.log4j.Logger;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.RESTErrorUtil;
+import org.apache.ranger.common.db.BaseDao;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+public abstract class RangerDaoManagerBase {
+	final static Logger logger = Logger.getLogger(RangerDaoManagerBase.class);
+
+	@Autowired
+	protected RESTErrorUtil restErrorUtil;
+	abstract public EntityManager getEntityManager();
+
+	public RangerDaoManagerBase() {
+	}
+
+	public BaseDao<?> getDaoForClassType(int classType) {
+		if (classType == AppConstants.CLASS_TYPE_AUTH_SESS) {
+			return getXXAuthSession();
+		}
+		if (classType == AppConstants.CLASS_TYPE_USER_PROFILE) {
+			return getXXPortalUser();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_ASSET) {
+			return getXXAsset();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_RESOURCE) {
+			return getXXResource();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_CRED_STORE) {
+			return getXXCredentialStore();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_GROUP) {
+			return getXXGroup();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_USER) {
+			return getXXUser();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_GROUP_USER) {
+			return getXXGroupUser();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_GROUP_GROUP) {
+			return getXXGroupGroup();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_PERM_MAP) {
+			return getXXPermMap();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_AUDIT_MAP) {
+			return getXXAuditMap();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_POLICY_EXPORT_AUDIT) {
+			return getXXPolicyExportAudit();
+		}
+		if (classType == AppConstants.CLASS_TYPE_TRX_LOG) {
+			return getXXTrxLog();
+		}
+		if (classType == AppConstants.CLASS_TYPE_XA_ACCESS_AUDIT) {
+			return getXXAccessAudit();
+		}
+
+		logger.error("No DaoManager found for classType=" + classType, new Throwable());
+		return null;
+	}
+
+	public BaseDao<?> getDaoForClassName(String className) {
+		if (className.equals("XXDBBase")) {
+			return getXXDBBase();
+		}
+		if (className.equals("XXAuthSession")) {
+			return getXXAuthSession();
+		}
+		if (className.equals("XXPortalUser")) {
+			return getXXPortalUser();
+		}
+		if (className.equals("XXPortalUserRole")) {
+			return getXXPortalUserRole();
+		}
+		if (className.equals("XXAsset")) {
+			return getXXAsset();
+		}
+		if (className.equals("XXResource")) {
+			return getXXResource();
+		}
+		if (className.equals("XXCredentialStore")) {
+			return getXXCredentialStore();
+		}
+		if (className.equals("XXGroup")) {
+			return getXXGroup();
+		}
+		if (className.equals("XXUser")) {
+			return getXXUser();
+		}
+		if (className.equals("XXGroupUser")) {
+			return getXXGroupUser();
+		}
+		if (className.equals("XXGroupGroup")) {
+			return getXXGroupGroup();
+		}
+		if (className.equals("XXPermMap")) {
+			return getXXPermMap();
+		}
+		if (className.equals("XXAuditMap")) {
+			return getXXAuditMap();
+		}
+		if (className.equals("XXPolicyExportAudit")) {
+			return getXXPolicyExportAudit();
+		}
+		if (className.equals("XXTrxLog")) {
+			return getXXTrxLog();
+		}
+		if (className.equals("XXAccessAudit")) {
+			return getXXAccessAudit();
+		}
+
+		logger.error("No DaoManager found for className=" + className, new Throwable());
+		return null;
+	}
+
+	public XXDBBaseDao getXXDBBase() {
+		return new XXDBBaseDao(this);
+	}
+
+	public XXAuthSessionDao getXXAuthSession() {
+		return new XXAuthSessionDao(this);
+	}
+
+	public XXPortalUserDao getXXPortalUser() {
+		return new XXPortalUserDao(this);
+	}
+
+	public XXPortalUserRoleDao getXXPortalUserRole() {
+		return new XXPortalUserRoleDao(this);
+	}
+
+	public XXAssetDao getXXAsset() {
+		return new XXAssetDao(this);
+	}
+
+	public XXResourceDao getXXResource() {
+		return new XXResourceDao(this);
+	}
+
+	public XXCredentialStoreDao getXXCredentialStore() {
+		return new XXCredentialStoreDao(this);
+	}
+
+	public XXGroupDao getXXGroup() {
+		return new XXGroupDao(this);
+	}
+
+	public XXUserDao getXXUser() {
+		return new XXUserDao(this);
+	}
+
+	public XXGroupUserDao getXXGroupUser() {
+		return new XXGroupUserDao(this);
+	}
+
+	public XXGroupGroupDao getXXGroupGroup() {
+		return new XXGroupGroupDao(this);
+	}
+
+	public XXPermMapDao getXXPermMap() {
+		return new XXPermMapDao(this);
+	}
+
+	public XXAuditMapDao getXXAuditMap() {
+		return new XXAuditMapDao(this);
+	}
+
+	public XXPolicyExportAuditDao getXXPolicyExportAudit() {
+		return new XXPolicyExportAuditDao(this);
+	}
+
+	public XXTrxLogDao getXXTrxLog() {
+		return new XXTrxLogDao(this);
+	}
+
+	public XXAccessAuditDao getXXAccessAudit() {
+		return new XXAccessAuditDao(this);
+	}
+
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XADaoManager.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XADaoManager.java b/security-admin/src/main/java/org/apache/ranger/db/XADaoManager.java
deleted file mode 100644
index 64f2148..0000000
--- a/security-admin/src/main/java/org/apache/ranger/db/XADaoManager.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- package org.apache.ranger.db;
-
-
-
-import javax.persistence.*;
-
-import org.apache.log4j.Logger;
-import org.apache.ranger.common.*;
-import org.apache.ranger.common.db.BaseDao;
-import org.springframework.stereotype.Component;
-import org.springframework.beans.factory.annotation.Autowired;
-
-@Component
-public class XADaoManager extends XADaoManagerBase {
-	final static Logger logger = Logger.getLogger(XADaoManager.class);
-
-	@PersistenceContext(unitName = "defaultPU")
-	private EntityManager em;
-
-	@PersistenceContext(unitName = "loggingPU")
-	private EntityManager loggingEM;
-
-	@Autowired
-	StringUtil stringUtil;
-
-	@Override
-	public EntityManager getEntityManager() {
-		return em;
-	}
-
-	public EntityManager getEntityManager(String persistenceContextUnit) {
-		logger.error("XADaoManager.getEntityManager(" + persistenceContextUnit + ")");
-		if (persistenceContextUnit.equalsIgnoreCase("loggingPU")) {
-			return loggingEM;
-		}
-		return getEntityManager();
-	}
-
-	
-	/**
-	 * @return the stringUtil
-	 */
-	public StringUtil getStringUtil() {
-		return stringUtil;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 */
-	@Override
-	public BaseDao<?> getDaoForClassType(int classType) {
-		if (classType == XAConstants.CLASS_TYPE_NONE) {
-			return null;
-		}
-		return super.getDaoForClassType(classType);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XADaoManagerBase.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XADaoManagerBase.java b/security-admin/src/main/java/org/apache/ranger/db/XADaoManagerBase.java
deleted file mode 100644
index e908447..0000000
--- a/security-admin/src/main/java/org/apache/ranger/db/XADaoManagerBase.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- package org.apache.ranger.db;
-
-/**
- * 
- */
-
-import javax.persistence.*;
-
-import java.util.*;
-
-import org.apache.log4j.Logger;
-import org.apache.ranger.common.*;
-import org.apache.ranger.common.db.*;
-import org.apache.ranger.entity.*;
-import org.springframework.stereotype.Component;
-import org.springframework.beans.factory.annotation.Autowired;
-
-
-public abstract class XADaoManagerBase {
-	final static Logger logger = Logger.getLogger(XADaoManagerBase.class);
-
-	@Autowired
-	protected RESTErrorUtil restErrorUtil;
-	abstract public EntityManager getEntityManager();
-
-	public XADaoManagerBase() {
-	}
-
-	public BaseDao<?> getDaoForClassType(int classType) {
-		if (classType == AppConstants.CLASS_TYPE_AUTH_SESS) {
-			return getXXAuthSession();
-		}
-		if (classType == AppConstants.CLASS_TYPE_USER_PROFILE) {
-			return getXXPortalUser();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_ASSET) {
-			return getXXAsset();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_RESOURCE) {
-			return getXXResource();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_CRED_STORE) {
-			return getXXCredentialStore();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_GROUP) {
-			return getXXGroup();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_USER) {
-			return getXXUser();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_GROUP_USER) {
-			return getXXGroupUser();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_GROUP_GROUP) {
-			return getXXGroupGroup();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_PERM_MAP) {
-			return getXXPermMap();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_AUDIT_MAP) {
-			return getXXAuditMap();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_POLICY_EXPORT_AUDIT) {
-			return getXXPolicyExportAudit();
-		}
-		if (classType == AppConstants.CLASS_TYPE_TRX_LOG) {
-			return getXXTrxLog();
-		}
-		if (classType == AppConstants.CLASS_TYPE_XA_ACCESS_AUDIT) {
-			return getXXAccessAudit();
-		}
-
-		logger.error("No DaoManager found for classType=" + classType, new Throwable());
-		return null;
-	}
-
-	public BaseDao<?> getDaoForClassName(String className) {
-		if (className.equals("XXDBBase")) {
-			return getXXDBBase();
-		}
-		if (className.equals("XXAuthSession")) {
-			return getXXAuthSession();
-		}
-		if (className.equals("XXPortalUser")) {
-			return getXXPortalUser();
-		}
-		if (className.equals("XXPortalUserRole")) {
-			return getXXPortalUserRole();
-		}
-		if (className.equals("XXAsset")) {
-			return getXXAsset();
-		}
-		if (className.equals("XXResource")) {
-			return getXXResource();
-		}
-		if (className.equals("XXCredentialStore")) {
-			return getXXCredentialStore();
-		}
-		if (className.equals("XXGroup")) {
-			return getXXGroup();
-		}
-		if (className.equals("XXUser")) {
-			return getXXUser();
-		}
-		if (className.equals("XXGroupUser")) {
-			return getXXGroupUser();
-		}
-		if (className.equals("XXGroupGroup")) {
-			return getXXGroupGroup();
-		}
-		if (className.equals("XXPermMap")) {
-			return getXXPermMap();
-		}
-		if (className.equals("XXAuditMap")) {
-			return getXXAuditMap();
-		}
-		if (className.equals("XXPolicyExportAudit")) {
-			return getXXPolicyExportAudit();
-		}
-		if (className.equals("XXTrxLog")) {
-			return getXXTrxLog();
-		}
-		if (className.equals("XXAccessAudit")) {
-			return getXXAccessAudit();
-		}
-
-		logger.error("No DaoManager found for className=" + className, new Throwable());
-		return null;
-	}
-
-	public XXDBBaseDao getXXDBBase() {
-		return new XXDBBaseDao(this);
-	}
-
-	public XXAuthSessionDao getXXAuthSession() {
-		return new XXAuthSessionDao(this);
-	}
-
-	public XXPortalUserDao getXXPortalUser() {
-		return new XXPortalUserDao(this);
-	}
-
-	public XXPortalUserRoleDao getXXPortalUserRole() {
-		return new XXPortalUserRoleDao(this);
-	}
-
-	public XXAssetDao getXXAsset() {
-		return new XXAssetDao(this);
-	}
-
-	public XXResourceDao getXXResource() {
-		return new XXResourceDao(this);
-	}
-
-	public XXCredentialStoreDao getXXCredentialStore() {
-		return new XXCredentialStoreDao(this);
-	}
-
-	public XXGroupDao getXXGroup() {
-		return new XXGroupDao(this);
-	}
-
-	public XXUserDao getXXUser() {
-		return new XXUserDao(this);
-	}
-
-	public XXGroupUserDao getXXGroupUser() {
-		return new XXGroupUserDao(this);
-	}
-
-	public XXGroupGroupDao getXXGroupGroup() {
-		return new XXGroupGroupDao(this);
-	}
-
-	public XXPermMapDao getXXPermMap() {
-		return new XXPermMapDao(this);
-	}
-
-	public XXAuditMapDao getXXAuditMap() {
-		return new XXAuditMapDao(this);
-	}
-
-	public XXPolicyExportAuditDao getXXPolicyExportAudit() {
-		return new XXPolicyExportAuditDao(this);
-	}
-
-	public XXTrxLogDao getXXTrxLog() {
-		return new XXTrxLogDao(this);
-	}
-
-	public XXAccessAuditDao getXXAccessAudit() {
-		return new XXAccessAuditDao(this);
-	}
-
-
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXAccessAuditDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXAccessAuditDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXAccessAuditDao.java
index 614cea9..cd1add6 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXAccessAuditDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXAccessAuditDao.java
@@ -19,13 +19,12 @@
 
  package org.apache.ranger.db;
 
-import org.apache.ranger.common.*;
-import org.apache.ranger.common.db.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.db.BaseDao;
+import org.apache.ranger.entity.XXAccessAudit;
 
 public class XXAccessAuditDao extends BaseDao<XXAccessAudit> {
 
-    public XXAccessAuditDao( XADaoManagerBase daoManager ) {
+    public XXAccessAuditDao( RangerDaoManagerBase daoManager ) {
 		super(daoManager, "loggingPU");
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXAssetDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXAssetDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXAssetDao.java
index 08a1d2a..7aea48c 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXAssetDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXAssetDao.java
@@ -22,14 +22,14 @@
 import javax.persistence.NoResultException;
 
 import org.apache.log4j.Logger;
-import org.apache.ranger.common.XACommonEnums;
-import org.apache.ranger.common.db.*;
+import org.apache.ranger.common.RangerCommonEnums;
+import org.apache.ranger.common.db.BaseDao;
 import org.apache.ranger.entity.XXAsset;
 
 public class XXAssetDao extends BaseDao<XXAsset> {
 	static final Logger logger = Logger.getLogger(XXAssetDao.class);
 
-    public XXAssetDao( XADaoManagerBase  daoManager ) {
+    public XXAssetDao( RangerDaoManagerBase  daoManager ) {
 		super(daoManager);
     }
     
@@ -42,7 +42,7 @@ public class XXAssetDao extends BaseDao<XXAsset> {
 			return getEntityManager()
 					.createNamedQuery("XXAsset.findByAssetName", XXAsset.class)
 					.setParameter("name", name.trim())
-					.setParameter("status",XACommonEnums.STATUS_DELETED)
+					.setParameter("status",RangerCommonEnums.STATUS_DELETED)
 					.getSingleResult();
 		} catch (NoResultException e) {
 			// ignore

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXAuditMapDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXAuditMapDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXAuditMapDao.java
index 2b1a95f..481e486 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXAuditMapDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXAuditMapDao.java
@@ -25,14 +25,13 @@ import java.util.List;
 import javax.persistence.NoResultException;
 
 import org.apache.log4j.Logger;
-import org.apache.ranger.common.*;
-import org.apache.ranger.common.db.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.db.BaseDao;
+import org.apache.ranger.entity.XXAuditMap;
 
 public class XXAuditMapDao extends BaseDao<XXAuditMap> {
 	static final Logger logger = Logger.getLogger(XXAssetDao.class);
 
-    public XXAuditMapDao( XADaoManagerBase daoManager ) {
+    public XXAuditMapDao( RangerDaoManagerBase daoManager ) {
 		super(daoManager);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXAuthSessionDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXAuthSessionDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXAuthSessionDao.java
index 4e592f4..4c9bdc5 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXAuthSessionDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXAuthSessionDao.java
@@ -28,7 +28,7 @@ import org.apache.ranger.entity.XXAuthSession;
 
 public class XXAuthSessionDao extends BaseDao<XXAuthSession> {
 
-    public XXAuthSessionDao( XADaoManagerBase daoManager ) {
+    public XXAuthSessionDao( RangerDaoManagerBase daoManager ) {
 		super(daoManager);
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXCredentialStoreDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXCredentialStoreDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXCredentialStoreDao.java
index 1ed278e..d95bfb4 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXCredentialStoreDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXCredentialStoreDao.java
@@ -19,13 +19,12 @@
 
  package org.apache.ranger.db;
 
-import org.apache.ranger.common.*;
-import org.apache.ranger.common.db.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.db.BaseDao;
+import org.apache.ranger.entity.XXCredentialStore;
 
 public class XXCredentialStoreDao extends BaseDao<XXCredentialStore> {
 
-    public XXCredentialStoreDao( XADaoManagerBase daoManager ) {
+    public XXCredentialStoreDao( RangerDaoManagerBase daoManager ) {
 		super(daoManager);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXDBBaseDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXDBBaseDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXDBBaseDao.java
index 3913f3d..d20fbff 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXDBBaseDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXDBBaseDao.java
@@ -20,11 +20,11 @@
  package org.apache.ranger.db;
 
 import org.apache.ranger.common.db.BaseDao;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.entity.XXDBBase;
 
 public class XXDBBaseDao extends BaseDao<XXDBBase> {
 
-    public XXDBBaseDao( XADaoManagerBase daoManager ) {
+    public XXDBBaseDao( RangerDaoManagerBase daoManager ) {
 		super(daoManager);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXGroupDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXGroupDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXGroupDao.java
index e0b7735..4736305 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXGroupDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXGroupDao.java
@@ -23,16 +23,12 @@
 import java.util.ArrayList;
 import java.util.List;
 
-
-
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.common.db.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.db.BaseDao;
+import org.apache.ranger.entity.XXGroup;
 
 public class XXGroupDao extends BaseDao<XXGroup> {
 
-	public XXGroupDao(XADaoManagerBase daoManager) {
+	public XXGroupDao(RangerDaoManagerBase daoManager) {
 		super(daoManager);
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXGroupGroupDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXGroupGroupDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXGroupGroupDao.java
index 5b831a2..df2796c 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXGroupGroupDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXGroupGroupDao.java
@@ -19,13 +19,12 @@
 
  package org.apache.ranger.db;
 
-import org.apache.ranger.common.*;
-import org.apache.ranger.common.db.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.db.BaseDao;
+import org.apache.ranger.entity.XXGroupGroup;
 
 public class XXGroupGroupDao extends BaseDao<XXGroupGroup> {
 
-    public XXGroupGroupDao( XADaoManagerBase daoManager ) {
+    public XXGroupGroupDao( RangerDaoManagerBase daoManager ) {
 		super(daoManager);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXGroupUserDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXGroupUserDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXGroupUserDao.java
index 8b27c7f..9f5abfb 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXGroupUserDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXGroupUserDao.java
@@ -26,14 +26,13 @@ import java.util.List;
 import javax.persistence.NoResultException;
 
 import org.apache.log4j.Logger;
-import org.apache.ranger.common.*;
-import org.apache.ranger.common.db.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.db.BaseDao;
+import org.apache.ranger.entity.XXGroupUser;
 
 public class XXGroupUserDao extends BaseDao<XXGroupUser> {
 	static final Logger logger = Logger.getLogger(XXGroupUserDao.class);
 
-	public XXGroupUserDao(XADaoManagerBase daoManager) {
+	public XXGroupUserDao(RangerDaoManagerBase daoManager) {
 		super(daoManager);
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXPermMapDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXPermMapDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXPermMapDao.java
index 659b9be..23c5c48 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXPermMapDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXPermMapDao.java
@@ -25,14 +25,13 @@ import java.util.List;
 import javax.persistence.NoResultException;
 
 import org.apache.log4j.Logger;
-import org.apache.ranger.common.*;
-import org.apache.ranger.common.db.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.db.BaseDao;
+import org.apache.ranger.entity.XXPermMap;
 
 public class XXPermMapDao extends BaseDao<XXPermMap> {
 	static final Logger logger = Logger.getLogger(XXResourceDao.class);
 
-    public XXPermMapDao( XADaoManagerBase daoManager ) {
+    public XXPermMapDao( RangerDaoManagerBase daoManager ) {
 		super(daoManager);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXPolicyExportAuditDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXPolicyExportAuditDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXPolicyExportAuditDao.java
index 9ac89b7..5f917cc 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXPolicyExportAuditDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXPolicyExportAuditDao.java
@@ -19,13 +19,12 @@
 
  package org.apache.ranger.db;
 
-import org.apache.ranger.common.*;
-import org.apache.ranger.common.db.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.db.BaseDao;
+import org.apache.ranger.entity.XXPolicyExportAudit;
 
 public class XXPolicyExportAuditDao extends BaseDao<XXPolicyExportAudit> {
 
-    public XXPolicyExportAuditDao( XADaoManagerBase daoManager ) {
+    public XXPolicyExportAuditDao( RangerDaoManagerBase daoManager ) {
 		super(daoManager);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXPortalUserDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXPortalUserDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXPortalUserDao.java
index ac11431..9069f29 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXPortalUserDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXPortalUserDao.java
@@ -22,12 +22,12 @@
 
 import java.util.List;
 
-import org.apache.ranger.common.db.*;
+import org.apache.ranger.common.db.BaseDao;
 import org.apache.ranger.entity.XXPortalUser;
 
 public class XXPortalUserDao extends BaseDao<XXPortalUser> {
 
-	public XXPortalUserDao(XADaoManagerBase daoManager) {
+	public XXPortalUserDao(RangerDaoManagerBase daoManager) {
 		super(daoManager);
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXPortalUserRoleDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXPortalUserRoleDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXPortalUserRoleDao.java
index cf41d59..99d0fe2 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXPortalUserRoleDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXPortalUserRoleDao.java
@@ -25,12 +25,12 @@ import java.util.List;
 
 import javax.persistence.NoResultException;
 
-import org.apache.ranger.common.db.*;
+import org.apache.ranger.common.db.BaseDao;
 import org.apache.ranger.entity.XXPortalUserRole;
 
 public class XXPortalUserRoleDao extends BaseDao<XXPortalUserRole> {
 
-	public XXPortalUserRoleDao(XADaoManagerBase daoManager) {
+	public XXPortalUserRoleDao(RangerDaoManagerBase daoManager) {
 		super(daoManager);
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXResourceDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXResourceDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXResourceDao.java
index 0aa3f75..020a76c 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXResourceDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXResourceDao.java
@@ -20,21 +20,21 @@
  package org.apache.ranger.db;
 
 
-import java.util.Date;
 import java.sql.Timestamp;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 import javax.persistence.NoResultException;
 
 import org.apache.log4j.Logger;
-import org.apache.ranger.common.db.*;
+import org.apache.ranger.common.db.BaseDao;
 import org.apache.ranger.entity.XXResource;
 
 public class XXResourceDao extends BaseDao<XXResource> {
 	static final Logger logger = Logger.getLogger(XXResourceDao.class);
 
-	public XXResourceDao(XADaoManagerBase daoManager) {
+	public XXResourceDao(RangerDaoManagerBase daoManager) {
 		super(daoManager);
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXTrxLogDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXTrxLogDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXTrxLogDao.java
index e5729fa..df73d72 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXTrxLogDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXTrxLogDao.java
@@ -25,13 +25,13 @@ import java.util.List;
 import javax.persistence.NoResultException;
 
 import org.apache.log4j.Logger;
-import org.apache.ranger.common.db.*;
+import org.apache.ranger.common.db.BaseDao;
 import org.apache.ranger.entity.XXTrxLog;
 
 public class XXTrxLogDao extends BaseDao<XXTrxLog> {
 	private static Logger logger = Logger.getLogger(XXTrxLogDao.class);
 	
-    public XXTrxLogDao( XADaoManagerBase daoManager ) {
+    public XXTrxLogDao( RangerDaoManagerBase daoManager ) {
 		super(daoManager);
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/db/XXUserDao.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/db/XXUserDao.java b/security-admin/src/main/java/org/apache/ranger/db/XXUserDao.java
index 4d2cec4..fb5af98 100644
--- a/security-admin/src/main/java/org/apache/ranger/db/XXUserDao.java
+++ b/security-admin/src/main/java/org/apache/ranger/db/XXUserDao.java
@@ -23,13 +23,13 @@
 import javax.persistence.NoResultException;
 
 import org.apache.log4j.Logger;
-import org.apache.ranger.common.db.*;
+import org.apache.ranger.common.db.BaseDao;
 import org.apache.ranger.entity.XXUser;
 
 public class XXUserDao extends BaseDao<XXUser> {
 	static final Logger logger = Logger.getLogger(XXResourceDao.class);
 
-	public XXUserDao(XADaoManagerBase daoManager) {
+	public XXUserDao(RangerDaoManagerBase daoManager) {
 		super(daoManager);
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXAccessAudit.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXAccessAudit.java b/security-admin/src/main/java/org/apache/ranger/entity/XXAccessAudit.java
index 1e8f6e7..5696080 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXAccessAudit.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXAccessAudit.java
@@ -24,13 +24,22 @@
  * 
  */
 
-import java.util.*;
+import java.util.Date;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.DateUtil;
+import org.apache.ranger.common.RangerConstants;
 
 
 @Entity
@@ -71,7 +80,7 @@ public class XXAccessAudit extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="ACCESS_RESULT"   )
-	protected int accessResult = XAConstants.ACCESS_RESULT_DENIED;
+	protected int accessResult = RangerConstants.ACCESS_RESULT_DENIED;
 
 	/**
 	 * Access Type
@@ -236,7 +245,7 @@ public class XXAccessAudit extends XXDBBase implements java.io.Serializable {
 	 */
 	public XXAccessAudit ( ) {
 		auditType = AppConstants.ASSET_UNKNOWN;
-		accessResult = XAConstants.ACCESS_RESULT_DENIED;
+		accessResult = RangerConstants.ACCESS_RESULT_DENIED;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXAsset.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXAsset.java b/security-admin/src/main/java/org/apache/ranger/entity/XXAsset.java
index f203cf6..3a40f01 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXAsset.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXAsset.java
@@ -24,13 +24,17 @@
  * 
  */
 
-import java.util.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.RangerConstants;
 
 
 @Entity
@@ -81,7 +85,7 @@ public class XXAsset extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="ACT_STATUS"  , nullable=false )
-	protected int activeStatus = XAConstants.STATUS_DISABLED;
+	protected int activeStatus = RangerConstants.STATUS_DISABLED;
 
 	/**
 	 * Type of asset
@@ -116,7 +120,7 @@ public class XXAsset extends XXDBBase implements java.io.Serializable {
 	 * Default constructor. This will set all the attributes to default value.
 	 */
 	public XXAsset ( ) {
-		activeStatus = XAConstants.STATUS_DISABLED;
+		activeStatus = RangerConstants.STATUS_DISABLED;
 		assetType = AppConstants.ASSET_UNKNOWN;
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXAuditMap.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXAuditMap.java b/security-admin/src/main/java/org/apache/ranger/entity/XXAuditMap.java
index dd14898..719d472 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXAuditMap.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXAuditMap.java
@@ -24,13 +24,16 @@
  * 
  */
 
-import java.util.*;
-
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.ranger.common.AppConstants;
 
 
 @Entity

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXAuthSession.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXAuthSession.java b/security-admin/src/main/java/org/apache/ranger/entity/XXAuthSession.java
index d54ce72..f5c44ad 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXAuthSession.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXAuthSession.java
@@ -24,13 +24,22 @@
  * 
  */
 
-import java.util.*;
+import java.util.Date;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.DateUtil;
+import org.apache.ranger.common.RangerConstants;
 
 
 @Entity
@@ -187,7 +196,7 @@ public class XXAuthSession extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="DEVICE_TYPE"  , nullable=false )
-	protected int deviceType = XAConstants.DEVICE_UNKNOWN;
+	protected int deviceType = RangerConstants.DEVICE_UNKNOWN;
 
 	/**
 	 * IP where the request came from
@@ -216,7 +225,7 @@ public class XXAuthSession extends XXDBBase implements java.io.Serializable {
 		authStatus = AUTH_STATUS_UNKNOWN;
 		authType = AUTH_TYPE_UNKNOWN;
 		authProvider = AUTH_TYPE_UNKNOWN;
-		deviceType = XAConstants.DEVICE_UNKNOWN;
+		deviceType = RangerConstants.DEVICE_UNKNOWN;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXCredentialStore.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXCredentialStore.java b/security-admin/src/main/java/org/apache/ranger/entity/XXCredentialStore.java
index b300071..1b06d6e 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXCredentialStore.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXCredentialStore.java
@@ -24,13 +24,16 @@
  * 
  */
 
-import java.util.*;
-
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.ranger.common.AppConstants;
 
 
 @Entity

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXDBBase.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXDBBase.java b/security-admin/src/main/java/org/apache/ranger/entity/XXDBBase.java
index 666f0f5..c5e7c9c 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXDBBase.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXDBBase.java
@@ -24,13 +24,17 @@
  * 
  */
 
-import java.util.*;
+import java.util.Date;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
+import javax.persistence.Column;
+import javax.persistence.EntityListeners;
+import javax.persistence.MappedSuperclass;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.DateUtil;
 
 
 @MappedSuperclass @EntityListeners( org.apache.ranger.common.db.JPABeanCallbacks.class)

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXGroup.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXGroup.java b/security-admin/src/main/java/org/apache/ranger/entity/XXGroup.java
index 1e25eb6..4224cc4 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXGroup.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXGroup.java
@@ -24,13 +24,18 @@
  * 
  */
 
-import java.util.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.RangerCommonEnums;
+import org.apache.ranger.common.RangerConstants;
 
 
 @Entity
@@ -80,7 +85,7 @@ public class XXGroup extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="STATUS"  , nullable=false )
-	protected int status = XAConstants.STATUS_DISABLED;
+	protected int status = RangerConstants.STATUS_DISABLED;
 
 	/**
 	 * Type of group
@@ -93,7 +98,7 @@ public class XXGroup extends XXDBBase implements java.io.Serializable {
 	protected int groupType = AppConstants.XA_GROUP_UNKNOWN;
 	
 	@Column(name="GROUP_SRC"  , nullable=false )
-	protected int groupSource = XACommonEnums.GROUP_INTERNAL;
+	protected int groupSource = RangerCommonEnums.GROUP_INTERNAL;
 
 	/**
 	 * Id of the credential store
@@ -109,9 +114,9 @@ public class XXGroup extends XXDBBase implements java.io.Serializable {
 	 * Default constructor. This will set all the attributes to default value.
 	 */
 	public XXGroup ( ) {
-		status = XAConstants.STATUS_DISABLED;
+		status = RangerConstants.STATUS_DISABLED;
 		groupType = AppConstants.XA_GROUP_UNKNOWN;
-		groupSource = XACommonEnums.GROUP_INTERNAL;
+		groupSource = RangerCommonEnums.GROUP_INTERNAL;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXGroupGroup.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXGroupGroup.java b/security-admin/src/main/java/org/apache/ranger/entity/XXGroupGroup.java
index d7997cb..f4e501b 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXGroupGroup.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXGroupGroup.java
@@ -24,13 +24,16 @@
  * 
  */
 
-import java.util.*;
-
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.ranger.common.AppConstants;
 
 
 @Entity

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXGroupUser.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXGroupUser.java b/security-admin/src/main/java/org/apache/ranger/entity/XXGroupUser.java
index 0c05f15..fef7caa 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXGroupUser.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXGroupUser.java
@@ -24,13 +24,16 @@
  * 
  */
 
-import java.util.*;
-
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.ranger.common.AppConstants;
 
 
 @Entity

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXPermMap.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXPermMap.java b/security-admin/src/main/java/org/apache/ranger/entity/XXPermMap.java
index ecf22f7..d229f8c 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXPermMap.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXPermMap.java
@@ -24,13 +24,17 @@
  * 
  */
 
-import java.util.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.RangerConstants;
 
 
 @Entity
@@ -123,7 +127,7 @@ public class XXPermMap extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="IS_RECURSIVE"  , nullable=false )
-	protected int isRecursive = XAConstants.BOOL_NONE;
+	protected int isRecursive = RangerConstants.BOOL_NONE;
 
 	/**
 	 * Is wild card
@@ -158,7 +162,7 @@ public class XXPermMap extends XXDBBase implements java.io.Serializable {
 	public XXPermMap ( ) {
 		permFor = AppConstants.XA_PERM_FOR_UNKNOWN;
 		permType = AppConstants.XA_PERM_TYPE_UNKNOWN;
-		isRecursive = XAConstants.BOOL_NONE;
+		isRecursive = RangerConstants.BOOL_NONE;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXPolicyExportAudit.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXPolicyExportAudit.java b/security-admin/src/main/java/org/apache/ranger/entity/XXPolicyExportAudit.java
index fe0e542..6743b6a 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXPolicyExportAudit.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXPolicyExportAudit.java
@@ -24,13 +24,20 @@
  *
  */
 
-import java.util.*;
-
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.ranger.common.AppConstants;
 
 
 @Entity

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXPortalUser.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXPortalUser.java b/security-admin/src/main/java/org/apache/ranger/entity/XXPortalUser.java
index 2a2b938..71458d8 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXPortalUser.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXPortalUser.java
@@ -24,13 +24,17 @@
  * 
  */
 
-import java.util.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.RangerConstants;
 
 
 @Entity
@@ -121,7 +125,7 @@ public class XXPortalUser extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="STATUS"  , nullable=false )
-	protected int status = XAConstants.ACT_STATUS_DISABLED;
+	protected int status = RangerConstants.ACT_STATUS_DISABLED;
 
 	/**
 	 * Source of the user
@@ -131,7 +135,7 @@ public class XXPortalUser extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="USER_SRC"  , nullable=false )
-	protected int userSource = XAConstants.USER_APP;
+	protected int userSource = RangerConstants.USER_APP;
 
 	/**
 	 * Note
@@ -147,8 +151,8 @@ public class XXPortalUser extends XXDBBase implements java.io.Serializable {
 	 * Default constructor. This will set all the attributes to default value.
 	 */
 	public XXPortalUser ( ) {
-		status = XAConstants.ACT_STATUS_DISABLED;
-		userSource = XAConstants.USER_APP;
+		status = RangerConstants.ACT_STATUS_DISABLED;
+		userSource = RangerConstants.USER_APP;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXPortalUserRole.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXPortalUserRole.java b/security-admin/src/main/java/org/apache/ranger/entity/XXPortalUserRole.java
index b2e4d67..d0fb38d 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXPortalUserRole.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXPortalUserRole.java
@@ -24,13 +24,16 @@
  * 
  */
 
-import java.util.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.RangerConstants;
 
 
 @Entity
@@ -81,13 +84,13 @@ public class XXPortalUserRole extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="STATUS"  , nullable=false )
-	protected int status = XAConstants.STATUS_DISABLED;
+	protected int status = RangerConstants.STATUS_DISABLED;
 
 	/**
 	 * Default constructor. This will set all the attributes to default value.
 	 */
 	public XXPortalUserRole ( ) {
-		status = XAConstants.STATUS_DISABLED;
+		status = RangerConstants.STATUS_DISABLED;
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXResource.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXResource.java b/security-admin/src/main/java/org/apache/ranger/entity/XXResource.java
index 0247ee7..c19f4df 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXResource.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXResource.java
@@ -24,13 +24,17 @@
  * 
  */
 
-import java.util.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.RangerConstants;
 
 
 @Entity
@@ -123,7 +127,7 @@ public class XXResource extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="IS_ENCRYPT"  , nullable=false )
-	protected int isEncrypt = XAConstants.BOOL_FALSE;
+	protected int isEncrypt = RangerConstants.BOOL_FALSE;
 
 	/**
 	 * Is recursive
@@ -133,7 +137,7 @@ public class XXResource extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="IS_RECURSIVE"  , nullable=false )
-	protected int isRecursive = XAConstants.BOOL_NONE;
+	protected int isRecursive = RangerConstants.BOOL_NONE;
 
 	/**
 	 * Group to which this resource belongs to
@@ -203,7 +207,7 @@ public class XXResource extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="RES_STATUS"  , nullable=false )
-	protected int resourceStatus = XAConstants.STATUS_ENABLED;
+	protected int resourceStatus = RangerConstants.STATUS_ENABLED;
 
 	/**
 	 * Table Type
@@ -248,9 +252,9 @@ public class XXResource extends XXDBBase implements java.io.Serializable {
 	 */
 	public XXResource ( ) {
 		resourceType = AppConstants.RESOURCE_PATH;
-		isEncrypt = XAConstants.BOOL_FALSE;
-		isRecursive = XAConstants.BOOL_NONE;
-		resourceStatus = XAConstants.STATUS_ENABLED;
+		isEncrypt = RangerConstants.BOOL_FALSE;
+		isRecursive = RangerConstants.BOOL_NONE;
+		resourceStatus = RangerConstants.STATUS_ENABLED;
 		tableType = AppConstants.POLICY_INCLUSION;
 		columnType = AppConstants.POLICY_INCLUSION;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXTrxLog.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXTrxLog.java b/security-admin/src/main/java/org/apache/ranger/entity/XXTrxLog.java
index 731cf6a..117ab54 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXTrxLog.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXTrxLog.java
@@ -24,13 +24,17 @@
  * 
  */
 
-import java.util.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.RangerConstants;
 
 
 @Entity
@@ -60,7 +64,7 @@ public class XXTrxLog extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="CLASS_TYPE"  , nullable=false )
-	protected int objectClassType = XAConstants.CLASS_TYPE_NONE;
+	protected int objectClassType = RangerConstants.CLASS_TYPE_NONE;
 
 	/**
 	 * Id of the object to which this notes refers to
@@ -191,7 +195,7 @@ public class XXTrxLog extends XXDBBase implements java.io.Serializable {
 	 * Default constructor. This will set all the attributes to default value.
 	 */
 	public XXTrxLog ( ) {
-		objectClassType = XAConstants.CLASS_TYPE_NONE;
+		objectClassType = RangerConstants.CLASS_TYPE_NONE;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/XXUser.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/XXUser.java b/security-admin/src/main/java/org/apache/ranger/entity/XXUser.java
index 91bad2e..af339d2 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/XXUser.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/XXUser.java
@@ -24,13 +24,17 @@
  * 
  */
 
-import java.util.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlRootElement;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
-
-import org.apache.ranger.common.*;
-import org.apache.ranger.entity.*;
+import org.apache.ranger.common.AppConstants;
+import org.apache.ranger.common.RangerConstants;
 
 
 @Entity
@@ -81,7 +85,7 @@ public class XXUser extends XXDBBase implements java.io.Serializable {
 	 *
 	 */
 	@Column(name="STATUS"  , nullable=false )
-	protected int status = XAConstants.STATUS_DISABLED;
+	protected int status = RangerConstants.STATUS_DISABLED;
 
 	/**
 	 * Id of the credential store
@@ -97,7 +101,7 @@ public class XXUser extends XXDBBase implements java.io.Serializable {
 	 * Default constructor. This will set all the attributes to default value.
 	 */
 	public XXUser ( ) {
-		status = XAConstants.STATUS_DISABLED;
+		status = RangerConstants.STATUS_DISABLED;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/entity/view/VXXTrxLog.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/entity/view/VXXTrxLog.java b/security-admin/src/main/java/org/apache/ranger/entity/view/VXXTrxLog.java
index 37cc62d..c38efad 100644
--- a/security-admin/src/main/java/org/apache/ranger/entity/view/VXXTrxLog.java
+++ b/security-admin/src/main/java/org/apache/ranger/entity/view/VXXTrxLog.java
@@ -22,11 +22,19 @@
 
 import java.util.Date;
 
-import javax.persistence.*;
-import javax.xml.bind.annotation.*;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.xml.bind.annotation.XmlRootElement;
 
 import org.apache.ranger.common.DateUtil;
-import org.apache.ranger.common.XAConstants;
+import org.apache.ranger.common.RangerConstants;
 
 @Entity
 @Table(name="vx_trx_log")
@@ -58,7 +66,7 @@ public class VXXTrxLog implements java.io.Serializable {
 	protected Long updatedByUserId;
 
 	@Column(name="CLASS_TYPE"  , nullable=false )
-	protected int objectClassType = XAConstants.CLASS_TYPE_NONE;
+	protected int objectClassType = RangerConstants.CLASS_TYPE_NONE;
 
 	@Column(name="OBJECT_ID"   )
 	protected Long objectId;

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/patch/BaseLoader.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/patch/BaseLoader.java b/security-admin/src/main/java/org/apache/ranger/patch/BaseLoader.java
index f18cff9..61b46af 100644
--- a/security-admin/src/main/java/org/apache/ranger/patch/BaseLoader.java
+++ b/security-admin/src/main/java/org/apache/ranger/patch/BaseLoader.java
@@ -23,7 +23,6 @@
 package org.apache.ranger.patch;
 
 import java.text.DecimalFormat;
-import java.util.Date;
 
 import org.apache.log4j.Logger;
 import org.apache.ranger.common.DateUtil;

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/patch/PatchPasswordEncryption_J10001.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/patch/PatchPasswordEncryption_J10001.java b/security-admin/src/main/java/org/apache/ranger/patch/PatchPasswordEncryption_J10001.java
index 08ace6c..832e963 100644
--- a/security-admin/src/main/java/org/apache/ranger/patch/PatchPasswordEncryption_J10001.java
+++ b/security-admin/src/main/java/org/apache/ranger/patch/PatchPasswordEncryption_J10001.java
@@ -20,7 +20,7 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 import org.apache.ranger.common.StringUtil;
-import org.apache.ranger.db.XADaoManager;
+import org.apache.ranger.db.RangerDaoManager;
 import org.apache.ranger.entity.XXAsset;
 import org.apache.ranger.service.XAssetService;
 import org.apache.ranger.util.CLIUtil;
@@ -33,7 +33,7 @@ public class PatchPasswordEncryption_J10001 extends BaseLoader {
 	int lineCount = 0;
 	
 	@Autowired
-	XADaoManager xaDaoManager;
+	RangerDaoManager xaDaoManager;
 	
 	@Autowired
 	StringUtil stringUtil;

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/rest/AssetREST.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/rest/AssetREST.java b/security-admin/src/main/java/org/apache/ranger/rest/AssetREST.java
index ca373e6..27c3119 100644
--- a/security-admin/src/main/java/org/apache/ranger/rest/AssetREST.java
+++ b/security-admin/src/main/java/org/apache/ranger/rest/AssetREST.java
@@ -23,7 +23,6 @@ import java.io.File;
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.DELETE;
@@ -40,15 +39,15 @@ import javax.ws.rs.core.Response;
 
 import org.apache.log4j.Logger;
 import org.apache.ranger.biz.AssetMgr;
-import org.apache.ranger.biz.XABizUtil;
+import org.apache.ranger.biz.RangerBizUtil;
 import org.apache.ranger.common.PropertiesUtil;
 import org.apache.ranger.common.RESTErrorUtil;
+import org.apache.ranger.common.RangerCommonEnums;
+import org.apache.ranger.common.RangerSearchUtil;
 import org.apache.ranger.common.SearchCriteria;
 import org.apache.ranger.common.StringUtil;
-import org.apache.ranger.common.XACommonEnums;
-import org.apache.ranger.common.XASearchUtil;
-import org.apache.ranger.common.annotation.XAAnnotationClassName;
-import org.apache.ranger.common.annotation.XAAnnotationJSMgrName;
+import org.apache.ranger.common.annotation.RangerAnnotationClassName;
+import org.apache.ranger.common.annotation.RangerAnnotationJSMgrName;
 import org.apache.ranger.service.AbstractBaseResourceService;
 import org.apache.ranger.service.XAccessAuditService;
 import org.apache.ranger.service.XAgentService;
@@ -64,13 +63,11 @@ import org.apache.ranger.view.VXAssetList;
 import org.apache.ranger.view.VXCredentialStore;
 import org.apache.ranger.view.VXCredentialStoreList;
 import org.apache.ranger.view.VXLong;
-import org.apache.ranger.view.VXPermMap;
 import org.apache.ranger.view.VXPolicy;
 import org.apache.ranger.view.VXPolicyExportAuditList;
 import org.apache.ranger.view.VXResource;
 import org.apache.ranger.view.VXResourceList;
 import org.apache.ranger.view.VXResponse;
-import org.apache.ranger.view.VXString;
 import org.apache.ranger.view.VXStringList;
 import org.apache.ranger.view.VXTrxLogList;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -83,13 +80,13 @@ import org.springframework.transaction.annotation.Transactional;
 @Path("assets")
 @Component
 @Scope("request")
-@XAAnnotationJSMgrName("AssetMgr")
+@RangerAnnotationJSMgrName("AssetMgr")
 @Transactional(propagation = Propagation.REQUIRES_NEW)
 public class AssetREST {
 	static Logger logger = Logger.getLogger(AssetREST.class);
 
 	@Autowired
-	XASearchUtil searchUtil;
+	RangerSearchUtil searchUtil;
 
 	@Autowired
 	AssetMgr assetMgr;
@@ -119,7 +116,7 @@ public class AssetREST {
 	XTrxLogService xTrxLogService;
 	
 	@Autowired
-	XABizUtil msBizUtil;
+	RangerBizUtil msBizUtil;
 
 	@Autowired
 	XAccessAuditService xAccessAuditService;
@@ -148,7 +145,7 @@ public class AssetREST {
 	@DELETE
 	@Path("/assets/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXAsset.class)
+	@RangerAnnotationClassName(class_name = VXAsset.class)
 	public void deleteXAsset(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		boolean force = true;
@@ -177,8 +174,8 @@ public class AssetREST {
 		Object status = searchCriteria.getParamValue("status");
 		if (status == null || ((Collection) status).size() == 0) {
 			ArrayList<Integer> valueList = new ArrayList<Integer>();
-			valueList.add(XACommonEnums.STATUS_DISABLED);
-			valueList.add(XACommonEnums.STATUS_ENABLED);
+			valueList.add(RangerCommonEnums.STATUS_DISABLED);
+			valueList.add(RangerCommonEnums.STATUS_ENABLED);
 			searchCriteria.addParam("status", valueList);
 		}
 		return assetMgr.searchXAssets(searchCriteria);
@@ -196,8 +193,8 @@ public class AssetREST {
 		Object status = searchCriteria.getParamValue("status");
 		if (status == null || ((Collection) status).size() == 0) {
 			ArrayList<Integer> valueList = new ArrayList<Integer>();
-			valueList.add(XACommonEnums.STATUS_DISABLED);
-			valueList.add(XACommonEnums.STATUS_ENABLED);
+			valueList.add(RangerCommonEnums.STATUS_DISABLED);
+			valueList.add(RangerCommonEnums.STATUS_ENABLED);
 			searchCriteria.addParam("status", valueList);
 		}
 		return assetMgr.getXAssetSearchCount(searchCriteria);
@@ -229,7 +226,7 @@ public class AssetREST {
 	@DELETE
 	@Path("/resources/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXResource.class)
+	@RangerAnnotationClassName(class_name = VXResource.class)
 	public void deleteXResource(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		boolean force = false;
@@ -425,7 +422,7 @@ public class AssetREST {
 	@DELETE
 	@Path("/credstores/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXCredentialStore.class)
+	@RangerAnnotationClassName(class_name = VXCredentialStore.class)
 	public void deleteXCredentialStore(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		boolean force = false;

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIs.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIs.java b/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIs.java
index e5d9254..0a62f8e 100644
--- a/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIs.java
+++ b/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIs.java
@@ -37,14 +37,14 @@ import org.apache.ranger.biz.AssetMgr;
 import org.apache.ranger.common.AppConstants;
 import org.apache.ranger.common.MessageEnums;
 import org.apache.ranger.common.RESTErrorUtil;
+import org.apache.ranger.common.RangerCommonEnums;
+import org.apache.ranger.common.RangerConstants;
+import org.apache.ranger.common.RangerSearchUtil;
 import org.apache.ranger.common.SearchCriteria;
 import org.apache.ranger.common.StringUtil;
-import org.apache.ranger.common.XACommonEnums;
-import org.apache.ranger.common.XAConstants;
-import org.apache.ranger.common.XASearchUtil;
-import org.apache.ranger.common.annotation.XAAnnotationClassName;
-import org.apache.ranger.common.annotation.XAAnnotationJSMgrName;
-import org.apache.ranger.db.XADaoManager;
+import org.apache.ranger.common.annotation.RangerAnnotationClassName;
+import org.apache.ranger.common.annotation.RangerAnnotationJSMgrName;
+import org.apache.ranger.db.RangerDaoManager;
 import org.apache.ranger.service.AbstractBaseResourceService;
 import org.apache.ranger.service.XAssetService;
 import org.apache.ranger.service.XPolicyService;
@@ -70,13 +70,13 @@ import org.springframework.transaction.annotation.Transactional;
 @Path("public")
 @Component
 @Scope("request")
-@XAAnnotationJSMgrName("PublicMgr")
+@RangerAnnotationJSMgrName("PublicMgr")
 @Transactional(propagation = Propagation.REQUIRES_NEW)
 public class PublicAPIs {
 	static Logger logger = Logger.getLogger(PublicAPIs.class);
 
 	@Autowired
-	XASearchUtil searchUtil;
+	RangerSearchUtil searchUtil;
 
 	@Autowired
 	AssetMgr assetMgr;
@@ -100,7 +100,7 @@ public class PublicAPIs {
 	StringUtil stringUtil;
 
 	@Autowired
-	XADaoManager xaDaoMgr;
+	RangerDaoManager xaDaoMgr;
 
 	@GET
 	@Path("/api/repository/{id}")
@@ -133,7 +133,7 @@ public class PublicAPIs {
 	@DELETE
 	@Path("/api/repository/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXAsset.class)
+	@RangerAnnotationClassName(class_name = VXAsset.class)
 	public void deleteRepository(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 
@@ -182,8 +182,8 @@ public class PublicAPIs {
 				request, xAssetService.sortFields);
 
         ArrayList<Integer> valueList = new ArrayList<Integer>();
-        valueList.add(XAConstants.STATUS_DISABLED);
-        valueList.add(XAConstants.STATUS_ENABLED);
+        valueList.add(RangerConstants.STATUS_DISABLED);
+        valueList.add(RangerConstants.STATUS_ENABLED);
         searchCriteria.addParam("status", valueList);
 
 		return assetMgr.getXAssetSearchCount(searchCriteria);
@@ -224,7 +224,7 @@ public class PublicAPIs {
 	@DELETE
 	@Path("/api/policy/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXResource.class)
+	@RangerAnnotationClassName(class_name = VXResource.class)
 	public void deletePolicy(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		String forceStr = request.getParameter("force");
@@ -272,8 +272,8 @@ public class PublicAPIs {
 			boolean isRecursiveBool = restErrorUtil.parseBoolean(isRec,
 					"Invalid value for " + "isRecursive",
 					MessageEnums.INVALID_INPUT_DATA, null, "isRecursive");
-			int isRecursive = (isRecursiveBool == true) ? XAConstants.BOOL_TRUE
-					: XAConstants.BOOL_FALSE;
+			int isRecursive = (isRecursiveBool == true) ? RangerConstants.BOOL_TRUE
+					: RangerConstants.BOOL_FALSE;
 			searchCriteria.getParamList().put("isRecursive", isRecursive);
 		}
 			
@@ -285,14 +285,14 @@ public class PublicAPIs {
 		String resStatus = request.getParameter("isEnabled");
 		List<Integer> resList = new ArrayList<Integer>();
 		if (stringUtil.isEmpty(resStatus)) {
-			resList.add(XACommonEnums.STATUS_ENABLED);
-			resList.add(XACommonEnums.STATUS_DISABLED);
+			resList.add(RangerCommonEnums.STATUS_ENABLED);
+			resList.add(RangerCommonEnums.STATUS_DISABLED);
 		} else {
 			boolean policyStatus = restErrorUtil.parseBoolean(resStatus,
 					"Invalid value for " + "isEnabled",
 					MessageEnums.INVALID_INPUT_DATA, null, "isEnabled");
-			int policyStat = (policyStatus) ? XACommonEnums.STATUS_ENABLED
-					: XACommonEnums.STATUS_DISABLED;
+			int policyStat = (policyStatus) ? RangerCommonEnums.STATUS_ENABLED
+					: RangerCommonEnums.STATUS_DISABLED;
 			resList.add(policyStat);
 		}
 		searchCriteria.getParamList().put("resourceStatus", resList);

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/rest/UserREST.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/rest/UserREST.java b/security-admin/src/main/java/org/apache/ranger/rest/UserREST.java
index 16c401f..0bcba7d 100644
--- a/security-admin/src/main/java/org/apache/ranger/rest/UserREST.java
+++ b/security-admin/src/main/java/org/apache/ranger/rest/UserREST.java
@@ -34,17 +34,17 @@ import org.apache.log4j.Logger;
 import org.apache.ranger.biz.UserMgr;
 import org.apache.ranger.common.MessageEnums;
 import org.apache.ranger.common.RESTErrorUtil;
+import org.apache.ranger.common.RangerConfigUtil;
+import org.apache.ranger.common.RangerConstants;
 import org.apache.ranger.common.SearchCriteria;
 import org.apache.ranger.common.SearchUtil;
 import org.apache.ranger.common.StringUtil;
-import org.apache.ranger.common.XAConfigUtil;
-import org.apache.ranger.common.XAConstants;
-import org.apache.ranger.common.annotation.XAAnnotationClassName;
-import org.apache.ranger.common.annotation.XAAnnotationJSMgrName;
-import org.apache.ranger.common.annotation.XAAnnotationRestAPI;
-import org.apache.ranger.db.XADaoManager;
+import org.apache.ranger.common.annotation.RangerAnnotationClassName;
+import org.apache.ranger.common.annotation.RangerAnnotationJSMgrName;
+import org.apache.ranger.common.annotation.RangerAnnotationRestAPI;
+import org.apache.ranger.db.RangerDaoManager;
 import org.apache.ranger.entity.XXPortalUser;
-import org.apache.ranger.util.XARestUtil;
+import org.apache.ranger.util.RangerRestUtil;
 import org.apache.ranger.view.VXPasswordChange;
 import org.apache.ranger.view.VXPortalUser;
 import org.apache.ranger.view.VXPortalUserList;
@@ -61,7 +61,7 @@ import org.springframework.transaction.annotation.Transactional;
 @Path("users")
 @Component
 @Scope("request")
-@XAAnnotationJSMgrName("UserMgr")
+@RangerAnnotationJSMgrName("UserMgr")
 @Transactional(propagation = Propagation.REQUIRES_NEW)
 public class UserREST {
 	static Logger logger = Logger.getLogger(UserREST.class);
@@ -70,10 +70,10 @@ public class UserREST {
 	StringUtil stringUtil;
 
 	@Autowired
-	XADaoManager daoManager;
+	RangerDaoManager daoManager;
 
 	@Autowired
-	XAConfigUtil configUtil;
+	RangerConfigUtil configUtil;
 
 	@Autowired
 	RESTErrorUtil restErrorUtil;
@@ -85,7 +85,7 @@ public class UserREST {
 	UserMgr userManager;
 
 	@Autowired
-	XARestUtil msRestUtil;
+	RangerRestUtil msRestUtil;
 
 	/**
 	 * Implements the traditional search functionalities for UserProfile
@@ -125,7 +125,7 @@ public class UserREST {
 
 		// status
 		searchUtil.extractEnum(request, searchCriteria, "status", "Status",
-				"statusList", XAConstants.ActivationStatus_MAX);
+				"statusList", RangerConstants.ActivationStatus_MAX);
 
 		// publicScreenName
 		searchUtil.extractString(request, searchCriteria, "publicScreenName",
@@ -191,7 +191,7 @@ public class UserREST {
 	@PUT
 	@Consumes({ "application/json", "application/xml" })
 	@Produces({ "application/xml", "application/json" })
-	@XAAnnotationRestAPI(updates_classes = "VUserProfile")
+	@RangerAnnotationRestAPI(updates_classes = "VUserProfile")
 	public VXPortalUser update(VXPortalUser userProfile,
 			@Context HttpServletRequest servletRequest) {
 		logger.info("update:" + userProfile.getEmailAddress());
@@ -232,7 +232,7 @@ public class UserREST {
 	@Path("{userId}/deactivate")
 	@Produces({ "application/xml", "application/json" })
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXPortalUser.class)
+	@RangerAnnotationClassName(class_name = VXPortalUser.class)
 	public VXPortalUser deactivateUser(@PathParam("userId") Long userId) {
 		XXPortalUser gjUser = daoManager.getXXPortalUser().getById(userId);
 		if (gjUser == null) {

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/rest/XAuditREST.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/rest/XAuditREST.java b/security-admin/src/main/java/org/apache/ranger/rest/XAuditREST.java
index 124bc43..531f395 100644
--- a/security-admin/src/main/java/org/apache/ranger/rest/XAuditREST.java
+++ b/security-admin/src/main/java/org/apache/ranger/rest/XAuditREST.java
@@ -20,18 +20,27 @@
  package org.apache.ranger.rest;
 
 import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.*;
-import javax.ws.rs.core.*;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
 
 import org.apache.log4j.Logger;
-import org.apache.ranger.biz.*;
+import org.apache.ranger.biz.XAuditMgr;
 import org.apache.ranger.common.SearchCriteria;
 import org.apache.ranger.common.SearchUtil;
-import org.apache.ranger.common.annotation.XAAnnotationClassName;
-import org.apache.ranger.common.annotation.XAAnnotationJSMgrName;
-import org.apache.ranger.rest.*;
-import org.apache.ranger.service.*;
-import org.apache.ranger.view.*;
+import org.apache.ranger.common.annotation.RangerAnnotationClassName;
+import org.apache.ranger.common.annotation.RangerAnnotationJSMgrName;
+import org.apache.ranger.service.XAccessAuditService;
+import org.apache.ranger.service.XTrxLogService;
+import org.apache.ranger.view.VXAccessAuditList;
+import org.apache.ranger.view.VXLong;
+import org.apache.ranger.view.VXTrxLog;
+import org.apache.ranger.view.VXTrxLogList;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Scope;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -42,7 +51,7 @@ import org.springframework.transaction.annotation.Transactional;
 @Path("xaudit")
 @Component
 @Scope("request")
-@XAAnnotationJSMgrName("XAuditMgr")
+@RangerAnnotationJSMgrName("XAuditMgr")
 @Transactional(propagation = Propagation.REQUIRES_NEW)
 public class XAuditREST {
 	static Logger logger = Logger.getLogger(XAuditREST.class);
@@ -84,7 +93,7 @@ public class XAuditREST {
 	@DELETE
 	@Path("/trx_log/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXTrxLog.class)
+	@RangerAnnotationClassName(class_name = VXTrxLog.class)
 	public void deleteXTrxLog(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		 boolean force = false;

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java b/security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java
index 7d8b3a7..5e6243e 100644
--- a/security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java
+++ b/security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java
@@ -20,24 +20,47 @@
  package org.apache.ranger.rest;
 
 import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.*;
-import javax.ws.rs.core.*;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
 
 import org.apache.log4j.Logger;
-import org.apache.ranger.biz.*;
-import org.apache.ranger.common.DateUtil;
+import org.apache.ranger.biz.SessionMgr;
+import org.apache.ranger.biz.XUserMgr;
 import org.apache.ranger.common.RESTErrorUtil;
 import org.apache.ranger.common.SearchCriteria;
-import org.apache.ranger.common.SearchField;
 import org.apache.ranger.common.SearchUtil;
 import org.apache.ranger.common.StringUtil;
-import org.apache.ranger.common.XAConstants;
-import org.apache.ranger.common.annotation.XAAnnotationClassName;
-import org.apache.ranger.common.annotation.XAAnnotationJSMgrName;
-import org.apache.ranger.db.XADaoManager;
-import org.apache.ranger.entity.XXAuthSession;
-import org.apache.ranger.service.*;
-import org.apache.ranger.view.*;
+import org.apache.ranger.common.annotation.RangerAnnotationClassName;
+import org.apache.ranger.common.annotation.RangerAnnotationJSMgrName;
+import org.apache.ranger.db.RangerDaoManager;
+import org.apache.ranger.service.AuthSessionService;
+import org.apache.ranger.service.XAuditMapService;
+import org.apache.ranger.service.XGroupGroupService;
+import org.apache.ranger.service.XGroupService;
+import org.apache.ranger.service.XGroupUserService;
+import org.apache.ranger.service.XPermMapService;
+import org.apache.ranger.service.XUserService;
+import org.apache.ranger.view.VXAuditMap;
+import org.apache.ranger.view.VXAuditMapList;
+import org.apache.ranger.view.VXAuthSession;
+import org.apache.ranger.view.VXAuthSessionList;
+import org.apache.ranger.view.VXGroup;
+import org.apache.ranger.view.VXGroupGroup;
+import org.apache.ranger.view.VXGroupGroupList;
+import org.apache.ranger.view.VXGroupList;
+import org.apache.ranger.view.VXGroupUser;
+import org.apache.ranger.view.VXGroupUserList;
+import org.apache.ranger.view.VXLong;
+import org.apache.ranger.view.VXPermMap;
+import org.apache.ranger.view.VXPermMapList;
+import org.apache.ranger.view.VXUser;
+import org.apache.ranger.view.VXUserList;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Scope;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -48,7 +71,7 @@ import org.springframework.transaction.annotation.Transactional;
 @Path("xusers")
 @Component
 @Scope("request")
-@XAAnnotationJSMgrName("XUserMgr")
+@RangerAnnotationJSMgrName("XUserMgr")
 @Transactional(propagation = Propagation.REQUIRES_NEW)
 public class XUserREST {
 	static Logger logger = Logger.getLogger(XUserREST.class);
@@ -81,7 +104,7 @@ public class XUserREST {
 	RESTErrorUtil restErrorUtil;
 
 	@Autowired
-	XADaoManager xADaoManager;
+	RangerDaoManager rangerDaoManager;
 
 	@Autowired
 	SessionMgr sessionMgr;
@@ -136,7 +159,7 @@ public class XUserREST {
 	@DELETE
 	@Path("/groups/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXGroup.class)
+	@RangerAnnotationClassName(class_name = VXGroup.class)
 	public void deleteXGroup(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		boolean force = true;
@@ -218,7 +241,7 @@ public class XUserREST {
 	@DELETE
 	@Path("/users/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXUser.class)
+	@RangerAnnotationClassName(class_name = VXUser.class)
 	public void deleteXUser(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		boolean force = true;
@@ -283,7 +306,7 @@ public class XUserREST {
 	@DELETE
 	@Path("/groupusers/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXGroupUser.class)
+	@RangerAnnotationClassName(class_name = VXGroupUser.class)
 	public void deleteXGroupUser(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		boolean force = true;
@@ -340,7 +363,7 @@ public class XUserREST {
 	@DELETE
 	@Path("/groupgroups/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXGroupGroup.class)
+	@RangerAnnotationClassName(class_name = VXGroupGroup.class)
 	public void deleteXGroupGroup(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		boolean force = false;
@@ -398,7 +421,7 @@ public class XUserREST {
 	@DELETE
 	@Path("/permmaps/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXPermMap.class)
+	@RangerAnnotationClassName(class_name = VXPermMap.class)
 	public void deleteXPermMap(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		boolean force = false;
@@ -455,7 +478,7 @@ public class XUserREST {
 	@DELETE
 	@Path("/auditmaps/{id}")
 	@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
-	@XAAnnotationClassName(class_name = VXAuditMap.class)
+	@RangerAnnotationClassName(class_name = VXAuditMap.class)
 	public void deleteXAuditMap(@PathParam("id") Long id,
 			@Context HttpServletRequest request) {
 		boolean force = false;

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/security/context/RangerContextHolder.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/security/context/RangerContextHolder.java b/security-admin/src/main/java/org/apache/ranger/security/context/RangerContextHolder.java
new file mode 100644
index 0000000..a0969af
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/security/context/RangerContextHolder.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ /**
+ *
+ */
+package org.apache.ranger.security.context;
+
+public class RangerContextHolder {
+
+    private static final ThreadLocal<RangerSecurityContext> securityContextThreadLocal = new ThreadLocal<RangerSecurityContext>();
+
+    private RangerContextHolder() {
+
+    }
+
+    public static RangerSecurityContext getSecurityContext(){
+	return securityContextThreadLocal.get();
+    }
+
+    public static void setSecurityContext(RangerSecurityContext context){
+	securityContextThreadLocal.set(context);
+    }
+
+    public static void resetSecurityContext(){
+	securityContextThreadLocal.remove();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/06ca8538/security-admin/src/main/java/org/apache/ranger/security/context/RangerSecurityContext.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/security/context/RangerSecurityContext.java b/security-admin/src/main/java/org/apache/ranger/security/context/RangerSecurityContext.java
new file mode 100644
index 0000000..b654c32
--- /dev/null
+++ b/security-admin/src/main/java/org/apache/ranger/security/context/RangerSecurityContext.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ /**
+ *
+ */
+package org.apache.ranger.security.context;
+
+import java.io.Serializable;
+
+import org.apache.ranger.common.RequestContext;
+import org.apache.ranger.common.UserSessionBase;
+
+public class RangerSecurityContext implements Serializable{
+    private static final long serialVersionUID = 1L;
+    private UserSessionBase userSession;
+    private RequestContext requestContext;
+
+    public UserSessionBase getUserSession() {
+        return userSession;
+    }
+
+    public void setUserSession(UserSessionBase userSession) {
+        this.userSession = userSession;
+    }
+
+    /**
+     * @return the requestContext
+     */
+    public RequestContext getRequestContext() {
+        return requestContext;
+    }
+
+    /**
+     * @param requestContext the requestContext to set
+     */
+    public void setRequestContext(RequestContext requestContext) {
+        this.requestContext = requestContext;
+    }
+
+
+}


Mime
View raw message