Class PatchUpdateAppValidator
java.lang.Object
com.skava.marketplace.validator.service.PatchUpdateAppValidator
- All Implemented Interfaces:
com.skava.core.EcommComponent
,com.skava.core.validation.ValidatorComponent
@Component
public class PatchUpdateAppValidator
extends Object
implements com.skava.core.validation.ValidatorComponent
This class used to validate before patch update the created APP.
- Author:
- InfosysEquinox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static List<com.skava.core.auth.AuthGrantedAuthority>
getAuthGrand
(org.springframework.security.core.Authentication authentication) getAuthorityRoles
(List<com.skava.core.auth.AuthGrantedAuthority> authorities) static void
Get Role method is used for checking whether the logged in user is super admin or marketplace admin if not super admin or marketplace admin throws errorvoid
preProcess
(com.skava.core.validation.InputModel model) This method is used to pre process the request before making patch updatevoid
validateAdminApprovalStatus
(String status) This method is to validate Status for Admin Approval.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.skava.core.EcommComponent
destroy, init, onEvent
Methods inherited from interface com.skava.core.validation.ValidatorComponent
postProcess, preProcess
-
Constructor Details
-
PatchUpdateAppValidator
public PatchUpdateAppValidator()
-
-
Method Details
-
preProcess
public void preProcess(com.skava.core.validation.InputModel model) This method is used to pre process the request before making patch update- Specified by:
preProcess
in interfacecom.skava.core.validation.ValidatorComponent
- Parameters:
model
- holds the Input Model
-
validateAdminApprovalStatus
This method is to validate Status for Admin Approval.- Parameters:
status
- holds the valid status
-
getRole
public static void getRole(Map<String, com.skava.core.auth.model.AuthGrandedRoles> authGrantedRolesMap, String status) Get Role method is used for checking whether the logged in user is super admin or marketplace admin if not super admin or marketplace admin throws error- Parameters:
authGrantedRolesMap
- holds the authGrantedRolesMap Map authGrantedRolesMap.status
- holds the valid status
-
getAuthorityRoles
protected static Map<String,com.skava.core.auth.model.AuthGrandedRoles> getAuthorityRoles(List<com.skava.core.auth.AuthGrantedAuthority> authorities) - Parameters:
authorities
- holds the list of AuthGrantedAuthority object- Returns:
- the list of Map object
-
getAuthGrand
protected static List<com.skava.core.auth.AuthGrantedAuthority> getAuthGrand(org.springframework.security.core.Authentication authentication) - Parameters:
authentication
- holds the valid Authentication object- Returns:
- List of AuthGrantedAuthority
-