public final class Conditions
extends java.lang.Object
Constructor and Description |
---|
Conditions()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Tag> |
getMatch()
Returns the modifiable list of tags that must be matched.
|
java.util.Date |
getModifiedSince()
Returns the condition based on the modification date of the requested
variant.
|
java.util.List<Tag> |
getNoneMatch()
Returns the modifiable list of tags that mustn't match.
|
java.util.Date |
getRangeDate()
Returns the range condition based on the modification date of the
requested variant.
|
Status |
getRangeStatus(RepresentationInfo representationInfo)
Returns the range conditional status of an entity.
|
Status |
getRangeStatus(Tag tag,
java.util.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.
|
Status |
getStatus(Method method,
boolean entityExists,
Tag tag,
java.util.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.
|
java.util.Date |
getUnmodifiedSince()
Returns the condition based on the modification date of the requested
variant.
|
boolean |
hasSome()
Indicates if there are some conditions set.
|
boolean |
hasSomeRange()
Indicates if there are some range conditions set.
|
void |
setMatch(java.util.List<Tag> tags)
Sets the modifiable list of tags that must be matched.
|
void |
setModifiedSince(java.util.Date date)
Sets the condition based on the modification date of the requested
variant.
|
void |
setNoneMatch(java.util.List<Tag> tags)
Sets the modifiable list of tags that mustn't match.
|
void |
setRangeDate(java.util.Date rangeDate)
Sets the range condition based on the modification date of the requested
variant.
|
void |
setRangeTag(Tag rangeTag)
Sets the range condition based on the entity tag of the requested
variant.
|
void |
setUnmodifiedSince(java.util.Date date)
Sets the condition based on the modification date of the requested
variant.
|
public java.util.List<Tag> getMatch()
public java.util.Date getModifiedSince()
public java.util.List<Tag> getNoneMatch()
public java.util.Date getRangeDate()
public Status getRangeStatus(RepresentationInfo representationInfo)
representationInfo
- The representation information that will be tested.public Status getRangeStatus(Tag tag, java.util.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, java.util.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 java.util.Date getUnmodifiedSince()
public boolean hasSome()
public boolean hasSomeRange()
public void setMatch(java.util.List<Tag> tags)
tags
- The "if-match" condition.public void setModifiedSince(java.util.Date date)
date
- The modification date.public void setNoneMatch(java.util.List<Tag> tags)
tags
- The list of tags that mustn't match.public void setRangeDate(java.util.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(java.util.Date date)
date
- The condition date.Copyright © 2005-2024 Restlet.