Class PolicyResponse
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.policy.PolicyResponse
-
public class PolicyResponse extends Object
The result of the validation.- VALID - the validation succeeded
- NOT_VISIBLE - the validation failed because a resource requested as part of the context or
method params was deemed not visible to one or more other context params, or the current
Authentication
- NOT_MUTABLE - the validation failed because a resource requested as part of the context or
method params was deemed not mutable based on one or more other context params, or the current
Authentication
- NOT_PERMITTED - the validation failed because an operation requested with a particular
associated permission was deemed out-of-scope for allowed granted authorities on the current
Authentication
- Author:
- Jeff Fischer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
PolicyResponse.StackInfomation
-
Field Summary
Fields Modifier and Type Field Description static PolicyResponse
NOT_MUTABLE
static int
NOT_MUTABLE_STATE
static PolicyResponse
NOT_PERMITTED
static int
NOT_PERMITTED_STATE
static PolicyResponse
NOT_VISIBLE
static int
NOT_VISIBLE_STATE
static PolicyResponse
VALID
static int
VALID_STATE
-
Constructor Summary
Constructors Constructor Description PolicyResponse(int state, String stateString)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
String
getReason()
int
getState()
String
getStateString()
StackTraceElement[]
getTrace()
int
hashCode()
PolicyResponse
log()
void
setReason(String reason)
void
setTrace(StackTraceElement[] trace)
String
toString()
PolicyResponse
trace()
PolicyResponse
with(String reason, Map<String,Object> authenticationDetails, ContextInfo contextInfo)
PolicyResponse
with(String reason, Map<String,Object> authenticationDetails, org.apache.commons.lang3.tuple.Pair<String,String>... keyValue)
-
-
-
Field Detail
-
VALID_STATE
public static final int VALID_STATE
- See Also:
- Constant Field Values
-
NOT_VISIBLE_STATE
public static final int NOT_VISIBLE_STATE
- See Also:
- Constant Field Values
-
NOT_MUTABLE_STATE
public static final int NOT_MUTABLE_STATE
- See Also:
- Constant Field Values
-
NOT_PERMITTED_STATE
public static final int NOT_PERMITTED_STATE
- See Also:
- Constant Field Values
-
VALID
public static final PolicyResponse VALID
-
NOT_VISIBLE
public static final PolicyResponse NOT_VISIBLE
-
NOT_MUTABLE
public static final PolicyResponse NOT_MUTABLE
-
NOT_PERMITTED
public static final PolicyResponse NOT_PERMITTED
-
-
Constructor Detail
-
PolicyResponse
public PolicyResponse(int state, String stateString)
-
-
Method Detail
-
with
public PolicyResponse with(String reason, Map<String,Object> authenticationDetails, ContextInfo contextInfo)
-
with
public PolicyResponse with(String reason, Map<String,Object> authenticationDetails, org.apache.commons.lang3.tuple.Pair<String,String>... keyValue)
-
trace
public PolicyResponse trace()
-
log
public PolicyResponse log()
-
canEqual
protected boolean canEqual(Object other)
-
getState
public int getState()
-
getStateString
public String getStateString()
-
getReason
public String getReason()
-
getTrace
public StackTraceElement[] getTrace()
-
setReason
public void setReason(String reason)
-
setTrace
public void setTrace(StackTraceElement[] trace)
-
-