@Override public void setModificationDate(Date modificationDate) { getWrappedRepresentation().setModificationDate(modificationDate); }
@Override public Representation getRepresentation(MediaType defaultMediaType, int timeToLive) { Representation result = null; InputStream ris = getServletContext().getResourceAsStream(path); if (ris != null) { result = new InputRepresentation(ris, defaultMediaType); // Sets the modification date String realPath = getServletContext().getRealPath(path); if (realPath != null) { File file = new File(realPath); if (file != null) { result.setModificationDate(new Date(file.lastModified())); } } } return result; }
Representation result = serialize(context, req, variant, response); result.setModificationDate(new Date(coll.getModified()));
result.setModificationDate( new Date( coll.getModified() ) );