Class CheckResourceBatchResult


  • public class CheckResourceBatchResult
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<CheckResult> get​(java.lang.String resourceId)
      Get the result for the given resource.
      java.util.Map<java.lang.String,​CheckResult> getAll()
      Get all resources and associated results.
      dev.cerbos.api.v1.response.Response.CheckResourceBatchResponse getRaw()  
      boolean isAllowed​(java.lang.String resourceId, java.lang.String action)
      Check whether the action is allowed on the given resource.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getAll

        public java.util.Map<java.lang.String,​CheckResult> getAll()
        Get all resources and associated results.
        Returns:
        Map of resource ID to actions
      • get

        public java.util.Optional<CheckResult> get​(java.lang.String resourceId)
        Get the result for the given resource.
        Parameters:
        resourceId - ID of the resource
        Returns:
        A non-empty CheckResult if the resource exists in this RPC result.
      • isAllowed

        public boolean isAllowed​(java.lang.String resourceId,
                                 java.lang.String action)
        Check whether the action is allowed on the given resource.
        Parameters:
        resourceId - ID of the resource
        action - Action to check
        Returns:
        True if the action is allowed on the resource
      • getRaw

        public dev.cerbos.api.v1.response.Response.CheckResourceBatchResponse getRaw()