@Generated(value="OracleSDKGenerator", comments="API Version: 20181116") public final class AccessRule extends Object
A content access rule. An access rule specifies an action to take if a set of criteria is matched by a request.
Note: Objects should always be created or deserialized using the AccessRule.Builder
. This model distinguishes fields that are null
because they are unset from fields that are explicitly set to null
. This is done in the setter methods of the AccessRule.Builder
, which maintain a set of all explicitly set fields called __explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take __explicitlySet__
into account. The constructor, on the other hand, does not set __explicitlySet__
(since the constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
AccessRule.Action
The action to take when the access criteria are met for a rule.
|
static class |
AccessRule.BlockAction
The method used to block requests if
action is set to BLOCK and the access criteria are met. |
static class |
AccessRule.Builder |
Constructor and Description |
---|
AccessRule(String name,
List<AccessRuleCriteria> criteria,
AccessRule.Action action,
AccessRule.BlockAction blockAction,
Integer blockResponseCode,
String blockErrorPageMessage,
String blockErrorPageCode,
String blockErrorPageDescription)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static AccessRule.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
Set<String> |
get__explicitlySet__() |
AccessRule.Action |
getAction()
The action to take when the access criteria are met for a rule.
|
AccessRule.BlockAction |
getBlockAction()
The method used to block requests if
action is set to BLOCK and the access criteria are met. |
String |
getBlockErrorPageCode()
The error code to show on the error page when
action is set to BLOCK , blockAction is set to SHOW_ERROR_PAGE , and the access criteria are met. |
String |
getBlockErrorPageDescription()
The description text to show on the error page when
action is set to BLOCK , blockAction is set to SHOW_ERROR_PAGE , and the access criteria are met. |
String |
getBlockErrorPageMessage()
The message to show on the error page when
action is set to BLOCK , blockAction is set to SHOW_ERROR_PAGE , and the access criteria are met. |
Integer |
getBlockResponseCode()
The response status code to return when
action is set to BLOCK , blockAction is set to SET_RESPONSE_CODE , and the access criteria are met. |
List<AccessRuleCriteria> |
getCriteria()
The list of access rule criteria.
|
String |
getName()
The unique name of the access rule.
|
int |
hashCode() |
String |
toString() |
@ConstructorProperties(value={"name","criteria","action","blockAction","blockResponseCode","blockErrorPageMessage","blockErrorPageCode","blockErrorPageDescription"}) @Deprecated public AccessRule(String name, List<AccessRuleCriteria> criteria, AccessRule.Action action, AccessRule.BlockAction blockAction, Integer blockResponseCode, String blockErrorPageMessage, String blockErrorPageCode, String blockErrorPageDescription)
public static AccessRule.Builder builder()
Create a new builder.
public String getName()
The unique name of the access rule.
public List<AccessRuleCriteria> getCriteria()
The list of access rule criteria.
public AccessRule.Action getAction()
The action to take when the access criteria are met for a rule. If unspecified, defaults to ALLOW
.
public AccessRule.BlockAction getBlockAction()
The method used to block requests if action
is set to BLOCK
and the access criteria are met. If unspecified, defaults to SET_RESPONSE_CODE
.
public Integer getBlockResponseCode()
The response status code to return when action
is set to BLOCK
, blockAction
is set to SET_RESPONSE_CODE
, and the access criteria are met. If unspecified, defaults to 403
.
public String getBlockErrorPageMessage()
The message to show on the error page when action
is set to BLOCK
, blockAction
is set to SHOW_ERROR_PAGE
, and the access criteria are met. If unspecified, defaults to ‘Access to the website is blocked.’
public String getBlockErrorPageCode()
The error code to show on the error page when action
is set to BLOCK
, blockAction
is set to SHOW_ERROR_PAGE
, and the access criteria are met. If unspecified, defaults to ‘Access rules’.
public String getBlockErrorPageDescription()
The description text to show on the error page when action
is set to BLOCK
, blockAction
is set to SHOW_ERROR_PAGE
, and the access criteria are met. If unspecified, defaults to ‘Access blocked by website owner. Please contact support.’
Copyright © 2016–2019. All rights reserved.