public class CSApiKeyIpRule
extends java.lang.Object
implements java.io.Serializable
CSApiKeyIpRule
object.Constructor and Description |
---|
CSApiKeyIpRule()
Creates an empty
CSApiKeyIpRule object. |
CSApiKeyIpRule(int sequence,
java.net.InetAddress ipAddress,
java.lang.String ipMask,
boolean allow,
java.lang.String comments)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Makes a new copy of this object.
|
boolean |
equals(java.lang.Object obj)
Determines whether the data contained in this
CSApiKeyIPRule object is the same as that contained
within the one supplied. |
boolean |
getAllow()
Gets whether this is an allow rule (true) or a disallow rule (false).
|
int |
getApiKeyId()
Returns the Api Key Id
|
int |
getApiKeyIpId()
Gets the id of the Api Key Ip.
|
java.lang.String |
getComments()
Returns comments against the rule.
|
boolean |
getHttpsOnly()
Returns true if the rule is https only, false otherwise.
|
java.net.InetAddress |
getIpAddress()
Returns the IP address associated with the rule
|
java.lang.String |
getIpMask()
Returns the IP mask
|
int |
getSequence()
Returns the IP Rule sequence (0, 1, 2...)
|
void |
setAllow(boolean allow)
Sets whether this is an allow rule (true) or a disallow rule (false).
|
void |
setApiKeyId(int apiKeyId)
Sets the Api Key Id
|
void |
setApiKeyIpId(int nAPIKeyIPID)
Sets the id of the Api Key Ip
|
void |
setComments(java.lang.String comments)
Sets comments against the rule.
|
void |
setHttpsOnly(boolean httpsOnly)
Sets httpsOnly.
|
void |
setIpAddress(java.net.InetAddress ipAddress)
Sets the IP address as an InetAddress
|
void |
setIpAddress(java.lang.String strIpAddress)
Sets the IP address as a string
|
void |
setIpMask(java.lang.String ipMask)
Sets the IP mask
|
void |
setSequence(int seq)
Sets the IP Rule sequence
|
java.lang.String |
toString()
Provides debug information on the contents of the
CSApiKeyIPRestriction object. |
public CSApiKeyIpRule()
CSApiKeyIpRule
object.public CSApiKeyIpRule(int sequence, java.net.InetAddress ipAddress, java.lang.String ipMask, boolean allow, java.lang.String comments) throws CSParameterException
sequence
- Rule sequence (0, 1, 2...)ipAddress
- The ip addressipMask
- The ip maskallow
- Whether it's an allow rule (true) or disallow rule (false)comments
- Any rule commentsCSParameterException
public int getApiKeyIpId()
public void setApiKeyIpId(int nAPIKeyIPID)
nAPIKeyIPID
- The id of the Api Key Ippublic int getApiKeyId()
public void setApiKeyId(int apiKeyId)
apiKeyId
- The Api Key Idpublic int getSequence()
public void setSequence(int seq)
seq
- The IP Rule sequencepublic java.net.InetAddress getIpAddress()
public void setIpAddress(java.net.InetAddress ipAddress) throws CSParameterException
ipAddress
- The IP addressCSParameterException
public void setIpAddress(java.lang.String strIpAddress) throws CSParameterException
strIpAddress
- the IP address as a stringCSParameterException
- Upon an error parsing the IP Address string as an InetAddresspublic java.lang.String getIpMask()
public void setIpMask(java.lang.String ipMask) throws CSParameterException
ipMask
- The IP maskCSParameterException
public boolean getHttpsOnly()
public void setHttpsOnly(boolean httpsOnly)
httpsOnly
- True if the rule is https only, false otherwise.public boolean getAllow()
public void setAllow(boolean allow)
allow
- Whether this is an allow rule (true) or a disallow rule (false).public java.lang.String getComments()
public void setComments(java.lang.String comments)
comments
- Comments against the rule.public java.lang.String toString()
CSApiKeyIPRestriction
object.
toString
in class java.lang.Object
String
containing the user-friendly output.public boolean equals(java.lang.Object obj)
CSApiKeyIPRule
object is the same as that contained
within the one supplied. Note that the key data used for searching is not tested for equality.
equals
in class java.lang.Object
obj
- the CSApiKeyIPRule
to be tested for equality.true
if the data matches, false
otherwise.public java.lang.Object clone() throws java.lang.CloneNotSupportedException, java.lang.OutOfMemoryError
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if cloning is not supported/allowed.java.lang.OutOfMemoryError
- if there are any problems allocating memory.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.