|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.data.Conditions
public final class Conditions
Set of conditions applying to a request. This is equivalent to the HTTP conditional headers.
Constructor Summary | |
---|---|
Conditions()
Constructor. |
Method Summary | |
---|---|
List<Tag> |
getMatch()
Returns the modifiable list of tags that must be matched. |
Date |
getModifiedSince()
Returns the condition based on the modification date of the requested variant. Note that when used with HTTP connectors, this property maps to the "If-Modified-Since" header. |
List<Tag> |
getNoneMatch()
Returns the modifiable list of tags that mustn't match. |
Date |
getRangeDate()
Returns the range condition based on the modification date of the requested variant. Note that when used with HTTP connectors, this property maps to the "If-Range" header. |
Status |
getRangeStatus(RepresentationInfo representationInfo)
Returns the range conditional status of an entity. |
Status |
getRangeStatus(Tag tag,
Date modificationDate)
Returns the range conditional status of an entity. |
Tag |
getRangeTag()
Returns the range condition based on the entity tag of the requested variant. Note that when used with HTTP connectors, this property maps to the "If-Range" header. |
Status |
getStatus(Method method,
boolean entityExists,
Tag tag,
Date modificationDate)
Returns the conditional status of a variant using a given method. |
Status |
getStatus(Method method,
RepresentationInfo representationInfo)
Returns the conditional status of a variant using a given method. |
Date |
getUnmodifiedSince()
Returns the condition based on the modification date of the requested variant. Note that when used with HTTP connectors, this property maps to the "If-Unmodified-Since" header. |
boolean |
hasSome()
Indicates if there are some conditions set. |
boolean |
hasSomeRange()
Indicates if there are some range conditions set. |
void |
setMatch(List<Tag> tags)
Sets the modifiable list of tags that must be matched. Note that when used with HTTP connectors, this property maps to the "If-Match" header. |
void |
setModifiedSince(Date date)
Sets the condition based on the modification date of the requested variant. Note that when used with HTTP connectors, this property maps to the "If-Modified-Since" header. |
void |
setNoneMatch(List<Tag> tags)
Sets the modifiable list of tags that mustn't match. |
void |
setRangeDate(Date rangeDate)
Sets the range condition based on the modification date of the requested variant. Note that when used with HTTP connectors, this property maps to the "If-Range" header. |
void |
setRangeTag(Tag rangeTag)
Sets the range condition based on the entity tag of the requested variant. Note that when used with HTTP connectors, this property maps to the "If-Range" header. |
void |
setUnmodifiedSince(Date date)
Sets the condition based on the modification date of the requested variant. Note that when used with HTTP connectors, this property maps to the "If-Unmodified-Since" header. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Conditions()
Method Detail |
---|
public List<Tag> getMatch()
public Date getModifiedSince()
public List<Tag> getNoneMatch()
public Date getRangeDate()
public Status getRangeStatus(RepresentationInfo representationInfo)
representationInfo
- The representation information that will be tested.
public Status getRangeStatus(Tag tag, Date modificationDate)
tag
- The tag of the entity.modificationDate
- The modification date of the entity.
public Tag getRangeTag()
public Status getStatus(Method method, boolean entityExists, Tag tag, Date modificationDate)
method
- The request method.entityExists
- Indicates if the entity exists.tag
- The tag.modificationDate
- The modification date.
public Status getStatus(Method method, RepresentationInfo representationInfo)
method
- The request method.representationInfo
- The representation information that will be tested.
public Date getUnmodifiedSince()
public boolean hasSome()
public boolean hasSomeRange()
public void setMatch(List<Tag> tags)
tags
- The "if-match" condition.public void setModifiedSince(Date date)
date
- The modification date.public void setNoneMatch(List<Tag> tags)
tags
- The list of tags that mustn't match.public void setRangeDate(Date rangeDate)
rangeDate
- The date of the range condition.public void setRangeTag(Tag rangeTag)
rangeTag
- The entity tag of the range condition.public void setUnmodifiedSince(Date date)
date
- The condition date.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |