Class CheckResourceSetResult


  • public class CheckResourceSetResult
    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 check result for the given resource.
      java.util.Map<java.lang.String,​CheckResult> getAll()
      Get all resources and their associated results.
      dev.cerbos.api.v1.response.Response.CheckResourceSetResponse getRaw()  
      boolean isAllowed​(java.lang.String resourceId, java.lang.String action)
      Returns whether the given action can be performed on the given resource.
      • Methods inherited from class java.lang.Object

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

      • isAllowed

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

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

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

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