public class HTTPParameter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Logger |
log
Used for logging.
|
static java.lang.String |
TYPE_COOKIE |
static java.lang.String |
TYPE_FILE |
static java.lang.String |
TYPE_GET
The possible parameter types.
|
static java.lang.String |
TYPE_HEADER |
static java.lang.String |
TYPE_POST |
Constructor and Description |
---|
HTTPParameter()
Required by castor.
|
HTTPParameter(HTTPParameter httpParameter)
Generates a new HTTP parameter as a clone of the given parameter.
|
HTTPParameter(int scrapeableFileID,
java.lang.String key,
java.lang.String value,
int sequence,
java.lang.String type)
Generates a new HTTP parameter with all of its information.
|
HTTPParameter(java.lang.String key,
java.lang.String value,
int sequence)
Generates a new HTTP parameter.
|
HTTPParameter(java.lang.String key,
java.lang.String value,
int sequence,
java.lang.String type)
Generates a new HTTP parameter with most of its information.
|
Modifier and Type | Method and Description |
---|---|
void |
dumpToLog()
Dumps the parameter to the log.
|
boolean |
equals(java.lang.Object obj)
Override equals.
|
int |
getID()
Gets the ID of the HTTP parameter.
|
java.lang.String |
getKey()
Gets the key portion of the parameter.
|
int |
getScrapeableFileID()
Gets the ID of the HTTP parameter.
|
int |
getSequence()
Gets the sequence with which the parameter should be sent.
|
java.lang.String |
getType()
Gets the type of the parameter, as defined by one of the constants in this class.
|
java.lang.String |
getValue()
Gets the value portion of the parameter.
|
java.lang.String |
getValueShort()
Gets the value, potentially truncating it if
it's too long.
|
void |
save()
Saves the HTTP parameter to the database.
|
void |
setID(int httpParameterID)
Sets the ID of the HTTP parameter.
|
void |
setKey(java.lang.String key)
Sets the key portion of the parameter.
|
void |
setScrapeableFileID(int scrapeableFileID)
Sets the scrapeable file ID of the scrapeable file
associated with thi HTTP parameter.
|
void |
setSequence(int sequence)
Sets the sequence with which the parameter should be sent.
|
void |
setType(java.lang.String type)
Sets the type of the parameter, as defined by one of the constants in this class.
|
void |
setValue(java.lang.String value)
Sets the value portion of the parameter.
|
public static org.apache.log4j.Logger log
public static final java.lang.String TYPE_GET
public static final java.lang.String TYPE_POST
public static final java.lang.String TYPE_FILE
public static final java.lang.String TYPE_COOKIE
public static final java.lang.String TYPE_HEADER
public HTTPParameter()
public HTTPParameter(@NotNull HTTPParameter httpParameter)
httpParameter
- The HTTP parameter to clone.public HTTPParameter(java.lang.String key, java.lang.String value, int sequence)
key
- The key portion of the parameter.value
- The value portion of the parameter.sequence
- The sequence with which the parameter should be sent.public HTTPParameter(java.lang.String key, java.lang.String value, int sequence, java.lang.String type)
key
- The key portion of the parameter.value
- The value portion of the parameter.sequence
- The sequence with which the parameter should be sent.type
- The type of the parameter.public HTTPParameter(int scrapeableFileID, java.lang.String key, java.lang.String value, int sequence, java.lang.String type)
scrapeableFileID
- The ID of the scrapeable file associated with this parameter.key
- The key portion of the parameter.value
- The value portion of the parameter.sequence
- The sequence with which the parameter should be sent.type
- The type of the parameter.public void setID(int httpParameterID)
public int getID()
public void setScrapeableFileID(int scrapeableFileID)
public int getScrapeableFileID()
@Nullable public java.lang.String getKey()
public void setKey(java.lang.String key)
key
- The key.@Nullable public java.lang.String getValue()
@Nullable public java.lang.String getValueShort()
public void setValue(java.lang.String value)
value
- The value.public int getSequence()
public void setSequence(int sequence)
sequence
- The sequence.public java.lang.String getType()
public void setType(java.lang.String type)
type
- The type.public void save()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void dumpToLog()