@Override public ResponseBuilder evaluatePreconditions() { Set<MatchingEntityTag> matchingTags = HttpHelper.getIfMatch(this); if (matchingTags == null) { return null; } // Since the resource does not exist the method must not be // perform and 412 Precondition Failed is returned return Responses.preconditionFailed(); }
private ResponseBuilder evaluateIfMatch(EntityTag eTag) { Set<MatchingEntityTag> matchingTags = HttpHelper.getIfMatch(this); if (matchingTags == null) { return null; } // The strong comparison function must be used to compare the entity // tags. Thus if the entity tag of the entity is weak then matching // of entity tags in the If-Match header should fail. if (eTag.isWeak()) { return Responses.preconditionFailed(); } if (matchingTags != MatchingEntityTag.ANY_MATCH && !matchingTags.contains(eTag)) { // 412 Precondition Failed return Responses.preconditionFailed(); } return null; }
@Override public ResponseBuilder evaluatePreconditions() { Set<MatchingEntityTag> matchingTags = HttpHelper.getIfMatch(this); if (matchingTags == null) { return null; } // Since the resource does not exist the method must not be // perform and 412 Precondition Failed is returned return Responses.preconditionFailed(); }
@Override public ResponseBuilder evaluatePreconditions() { Set<MatchingEntityTag> matchingTags = HttpHelper.getIfMatch(this); if (matchingTags == null) { return null; } // Since the resource does not exist the method must not be // perform and 412 Precondition Failed is returned return Responses.preconditionFailed(); }
private ResponseBuilder evaluateIfMatch(EntityTag eTag) { Set<MatchingEntityTag> matchingTags = HttpHelper.getIfMatch(this); if (matchingTags == null) { return null; } // The strong comparison function must be used to compare the entity // tags. Thus if the entity tag of the entity is weak then matching // of entity tags in the If-Match header should fail. if (eTag.isWeak()) { return Responses.preconditionFailed(); } if (matchingTags != MatchingEntityTag.ANY_MATCH && !matchingTags.contains(eTag)) { // 412 Precondition Failed return Responses.preconditionFailed(); } return null; }
private ResponseBuilder evaluateIfMatch(EntityTag eTag) { Set<MatchingEntityTag> matchingTags = HttpHelper.getIfMatch(this); if (matchingTags == null) { return null; } // The strong comparison function must be used to compare the entity // tags. Thus if the entity tag of the entity is weak then matching // of entity tags in the If-Match header should fail. if (eTag.isWeak()) { return Responses.preconditionFailed(); } if (matchingTags != MatchingEntityTag.ANY_MATCH && !matchingTags.contains(eTag)) { // 412 Precondition Failed return Responses.preconditionFailed(); } return null; }