
nl.tweeenveertig.openstack.headers.object.conditional.IfNoneMatch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of joss Show documentation
Show all versions of joss Show documentation
Java Client library for OpenStack Storage (Swift)
package nl.tweeenveertig.openstack.headers.object.conditional;
import nl.tweeenveertig.openstack.exception.HttpStatusExceptionUtil;
import org.apache.http.HttpStatus;
public class IfNoneMatch extends AbstractIfMatch {
public static final String IF_NONE_MATCH = "If-None-Match";
public IfNoneMatch(String value) {
super(value);
}
@Override
public void matchAgainst(String matchValue) {
if (getHeaderValue().equals(matchValue)) {
HttpStatusExceptionUtil.throwException(HttpStatus.SC_NOT_MODIFIED);
}
}
@Override
public String getHeaderName() {
return IF_NONE_MATCH;
}
}