Package dev.cerbos.sdk
Class CheckResourceBatchResult
- java.lang.Object
-
- dev.cerbos.sdk.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.CheckResourceBatchResponsegetRaw()booleanisAllowed(java.lang.String resourceId, java.lang.String action)Check whether the action is allowed on the given resource.
-
-
-
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
CheckResultif 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 resourceaction- Action to check- Returns:
- True if the action is allowed on the resource
-
getRaw
public dev.cerbos.api.v1.response.Response.CheckResourceBatchResponse getRaw()
-
-