Class BrowseAppValidator

java.lang.Object
com.skava.marketplace.validator.service.BrowseAppValidator
All Implemented Interfaces:
com.skava.core.EcommComponent, com.skava.core.validation.ValidatorComponent

@Component public class BrowseAppValidator extends Object implements com.skava.core.validation.ValidatorComponent
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static List<com.skava.core.auth.AuthGrantedAuthority>
    getAuthGrandForBrowseApp(org.springframework.security.core.Authentication authentication)
     
    protected static Map<String,com.skava.core.auth.model.AuthGrandedRoles>
    getAuthorityRolesForBrowseApp(List<com.skava.core.auth.AuthGrantedAuthority> authorities)
     
    static void
    getRoleForBrowseApp(Map<String,com.skava.core.auth.model.AuthGrandedRoles> authGrantedRolesMap, String businessId)
    Get Role method is used for checking wether the logged in user is super admin or bussiness admin if not super admin throws error
    void
    preProcess(com.skava.core.validation.InputModel model)
     
    static void
    validateBusinessId(Map<String,com.skava.core.auth.model.AuthGrandedRoles> authGrantedRolesMap, Integer businessId)
     

    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

    • BrowseAppValidator

      public BrowseAppValidator()
  • Method Details

    • preProcess

      public void preProcess(com.skava.core.validation.InputModel model)
      Specified by:
      preProcess in interface com.skava.core.validation.ValidatorComponent
    • getRoleForBrowseApp

      public static void getRoleForBrowseApp(Map<String,com.skava.core.auth.model.AuthGrandedRoles> authGrantedRolesMap, String businessId)
      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.
      businessId - holds the valid status
    • validateBusinessId

      public static void validateBusinessId(Map<String,com.skava.core.auth.model.AuthGrandedRoles> authGrantedRolesMap, Integer businessId)
      Parameters:
      authGrantedRolesMap - holds the map of AuthGrandedRoles
      businessId - holds the valid business Id
    • getAuthorityRolesForBrowseApp

      protected static Map<String,com.skava.core.auth.model.AuthGrandedRoles> getAuthorityRolesForBrowseApp(List<com.skava.core.auth.AuthGrantedAuthority> authorities)
      Parameters:
      authorities - holds the list of AuthGrantedAuthority object
      Returns:
      the list of Map object
    • getAuthGrandForBrowseApp

      protected static List<com.skava.core.auth.AuthGrantedAuthority> getAuthGrandForBrowseApp(org.springframework.security.core.Authentication authentication)
      Parameters:
      authentication - holds the valid Authentication object
      Returns:
      List of AuthGrantedAuthority