/** * Returns the range conditional status of an entity. * * @param representationInfo * The representation information that will be tested. * @return the status of the response. */ public Status getRangeStatus(RepresentationInfo representationInfo) { return getRangeStatus( (representationInfo == null) ? null : representationInfo.getTag(), (representationInfo == null) ? null : representationInfo .getModificationDate()); }
/** * Constructor from a variant. * * @param variant * The variant to copy. * @param modificationDate * The modification date. * @param tag * The tag. */ public RepresentationInfo(Variant variant, Date modificationDate, Tag tag) { setCharacterSet(variant.getCharacterSet()); setEncodings(variant.getEncodings()); setLocationRef(variant.getLocationRef()); setLanguages(variant.getLanguages()); setMediaType(variant.getMediaType()); setModificationDate(modificationDate); setTag(tag); }
/** * Constructor from a variant. * * @param variant * The variant to copy. * @param modificationDate * The modification date. * @param tag * The tag. */ public RepresentationInfo(Variant variant, Date modificationDate, Tag tag) { setCharacterSet(variant.getCharacterSet()); setLocationRef(variant.getLocationRef()); setLanguages(variant.getLanguages()); setMediaType(variant.getMediaType()); setModificationDate(modificationDate); setTag(tag); }
/** * Returns the conditional status of a variant using a given method. * * @param method * The request method. * @param representationInfo * The representation information that will be tested. * @return Null if the requested method can be performed, the status of the * response otherwise. */ public Status getStatus(Method method, RepresentationInfo representationInfo) { return getStatus( method, representationInfo != null, (representationInfo == null) ? null : representationInfo .getTag(), (representationInfo == null) ? null : representationInfo.getModificationDate()); }