Package com.skava.marketplace.util
Class CommonUtils
java.lang.Object
com.skava.marketplace.util.CommonUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static List<com.skava.core.auth.AuthGrantedAuthority>
getAuthGrandCommon
(org.springframework.security.core.Authentication authentication) getCommonAuthorityRoles
(List<com.skava.core.auth.AuthGrantedAuthority> authorities) static boolean
isRoleSuperAdmin
(Map<String, com.skava.core.auth.model.AuthGrandedRoles> authGrantedRolesMap) Get Role method is used for checking wether the logged in user is super admin or bussiness admin if not super admin throws errorboolean
This method is to validate Status for Admin Approval.static <T> T
sanitizedRequest
(Object requestBody, Class<T> requestClass) static <T> T
sanitizedRequest
(Object requestBody, Class<T> requestClass, boolean forJS) static <T> T
sanitizedRequestForJS
(Object requestBody, Class<T> requestClass) com.skava.core.qdsl.sort.EcomSorts
-
Field Details
-
LOGGER
public static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
CommonUtils
public CommonUtils()
-
-
Method Details
-
isSuperAdminAccess
public boolean isSuperAdminAccess()This method is to validate Status for Admin Approval.- Returns:
- boolean true or false.
-
isRoleSuperAdmin
public static boolean isRoleSuperAdmin(Map<String, com.skava.core.auth.model.AuthGrandedRoles> authGrantedRolesMap) Get Role method is used for checking wether the logged in user is super admin or bussiness admin if not super admin throws error- Parameters:
authGrantedRolesMap
- holds the authGrantedRolesMap Map authGrantedRolesMap.- Returns:
- boolean value.
-
getCommonAuthorityRoles
protected static Map<String,com.skava.core.auth.model.AuthGrandedRoles> getCommonAuthorityRoles(List<com.skava.core.auth.AuthGrantedAuthority> authorities) - Parameters:
authorities
- holds the list of AuthGrantedAuthority object- Returns:
- the list of Map object
-
getAuthGrandCommon
protected static List<com.skava.core.auth.AuthGrantedAuthority> getAuthGrandCommon(org.springframework.security.core.Authentication authentication) - Parameters:
authentication
- holds the valid Authentication object- Returns:
- List of AuthGrantedAuthority
-
sanitizedRequest
-
sanitizedRequestForJS
-
sanitizedRequest
-
sortCheck
-