Interface ValidationPolicyConfig
- All Superinterfaces:
- Config
- All Known Subinterfaces:
- ConnectionValidationPolicyConfig
This is extended by the connection validation policy configuration.
- Since:
- 4.4
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaddAddress(String address) Add an address.booleanaddHostName(String hostName) Add a host name.Adds a Locale to the policy.booleanaddResolvedName(String resolvedName) Add a resolved name.Get list of configured addresses.Get list of configured host namesReturns a list of the configured locales.getName()Gets the policy name.Get list of resolved names.getType()Gets the policy type.booleanbooleanIndicates whether any locales have been defined.booleanReturns true if any resolved names have been defined.voidRemove all addresses.voidRemove all host names.voidRemove all locales from the configuration.voidRemove all resolved names.voidSets the policy type.booleanCheck to see if the supplied details are valid for this policy.
- 
Method Details- 
getNameString getName()Gets the policy name.- Returns:
- policy name
 
- 
setTypeSets the policy type.The default is ValidationPolicyConfig.Type.BLACKLISTbut this may be used to change it.- Parameters:
- type- the policy type
 
- 
getTypeValidationPolicyConfig.Type getType()Gets the policy type.- Returns:
- policy type
 
- 
getAddressesGet list of configured addresses.Each address is an IP address (or regex) to match against a client. - Returns:
- addresses
 
- 
addAddressAdd an address.- Parameters:
- address- the address
- Returns:
- true if added or false if already present
 
- 
removeAddressesvoid removeAddresses()Remove all addresses.
- 
getHostNamesGet list of configured host namesEach name is a hostname (or regex) of a client. - Returns:
- host names
 
- 
addHostNameAdd a host name.- Parameters:
- hostName- the host name
- Returns:
- true if added or false if already present
 
- 
hasHostNamesboolean hasHostNames()- Returns:
- true if host names declared
 
- 
removeHostNamesvoid removeHostNames()Remove all host names.
- 
getResolvedNamesGet list of resolved names.Each name is the resolved hostname (or regex) of a client. - Returns:
- list of resolved names
 
- 
addResolvedNameAdd a resolved name.- Parameters:
- resolvedName- the resolved name
- Returns:
- true if added or false if already present
 
- 
hasResolvedNamesboolean hasResolvedNames()Returns true if any resolved names have been defined.- Returns:
- true if there are one or more resolved names
 
- 
removeResolvedNamesvoid removeResolvedNames()Remove all resolved names.
- 
addLocaleAdds a Locale to the policy.Either a country or a language , or both must be specified. - Parameters:
- country- the country code or null if not to be checked
- language- the language code or null if not to be checked
- Returns:
- the Locale object
- Throws:
- ConfigException- if unable to add locale
 
- 
getLocalesList<ValidationPolicyLocaleConfig> getLocales()Returns a list of the configured locales.- Returns:
- list of locales
 
- 
hasLocalesboolean hasLocales()Indicates whether any locales have been defined.- Returns:
- true if there are one or more locales
 
- 
removeLocalesvoid removeLocales()Remove all locales from the configuration.
- 
validateCheck to see if the supplied details are valid for this policy.Each parameter supplied is checked against the corresponding details of the policy. In the case of a blacklist, false would be returned if any supplied information matches any policy information and true if there were no matches. In the case of a whitelist, true would be returned if any supplied information matches any policy information or false if there were no matches. - Parameters:
- address- the address to check against the policy addresses - if null, the address will not be checked.
- hostName- the host name to check against the policy host names - if null, the host name will not be checked
- resolvedName- the resolved name to check against the policy resolved names - if null, the resolved name will no be checked
- locale- The locale to check against the policy locale, if null, locale check is not performed.
- Returns:
- true if the details pass the policy validation or false if they do not.
 
 
-