Class IfCondition
- java.lang.Object
-
- org.openstack4j.model.common.header.IfCondition
-
- All Implemented Interfaces:
HeaderOption
- Direct Known Subclasses:
IfCondition.IfMatch,IfCondition.IfModifiedSince,IfCondition.IfNoneMatch,IfCondition.IfUnModifiedSince
public class IfCondition extends Object implements HeaderOption
A delegate class which contains calls to create various conditional header options- Author:
- Jeremy Unruh
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIfCondition.IfMatchstatic classIfCondition.IfModifiedSincestatic classIfCondition.IfNoneMatchstatic classIfCondition.IfUnModifiedSince
-
Constructor Summary
Constructors Modifier Constructor Description protectedIfCondition(String name)protectedIfCondition(String name, Object value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IfCondition.IfMatchmatch(String matchValue)Compares the ETag as a condition to determine if the remote data matches the checksumstatic IfCondition.IfModifiedSincemodifiedSince(long milliseconds)Determines if the remote data has been modified since the specified datestatic IfCondition.IfModifiedSincemodifiedSince(Date date)Determines if the remote data has been modified since the specified datestatic IfCondition.IfNoneMatchnoneMatch(String matchCondition)Compares the ETag as a condition to determine if the remote data does not match the checksumHeaderNameValuetoHeader()Transform the option into a Headerstatic IfCondition.IfUnModifiedSinceunModifiedSince(long milliseconds)Determines if the remote data has been un-modified since the specified datestatic IfCondition.IfUnModifiedSinceunModifiedSince(Date date)Determines if the remote data has been un-modified since the specified date
-
-
-
Method Detail
-
modifiedSince
public static IfCondition.IfModifiedSince modifiedSince(long milliseconds)
Determines if the remote data has been modified since the specified date- Parameters:
milliseconds- the date in milliseconds- Returns:
- if modified since condition
-
unModifiedSince
public static IfCondition.IfUnModifiedSince unModifiedSince(long milliseconds)
Determines if the remote data has been un-modified since the specified date- Parameters:
milliseconds- the date in milliseconds- Returns:
- if un-modified since condition
-
unModifiedSince
public static IfCondition.IfUnModifiedSince unModifiedSince(Date date)
Determines if the remote data has been un-modified since the specified date- Parameters:
date- the date since un-modified- Returns:
- if un-modified since condition
-
modifiedSince
public static IfCondition.IfModifiedSince modifiedSince(Date date)
Determines if the remote data has been modified since the specified date- Parameters:
date- the date condition- Returns:
- if modified since condition
-
noneMatch
public static IfCondition.IfNoneMatch noneMatch(String matchCondition)
Compares the ETag as a condition to determine if the remote data does not match the checksum- Parameters:
matchCondition- the match condition (ETag)- Returns:
- the if none match condition
-
match
public static IfCondition.IfMatch match(String matchValue)
Compares the ETag as a condition to determine if the remote data matches the checksum- Parameters:
matchValue- the match value (ETag)- Returns:
- the if match condition
-
toHeader
public HeaderNameValue toHeader()
Description copied from interface:HeaderOptionTransform the option into a Header- Specified by:
toHeaderin interfaceHeaderOption- Returns:
- the header name value object
-
-