001/*
002 * (C) Copyright 2006-2008 Nuxeo SAS (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Nuxeo - initial API and implementation
016 *
017 * $Id$
018 *
019 */
020package org.nuxeo.ecm.platform.pictures.tiles.restlets;
021
022import java.util.Calendar;
023
024import org.nuxeo.ecm.platform.pictures.tiles.api.adapter.PictureTilesAdapter;
025
026/**
027 * Wraps a cache entry for the Restlets.
028 *
029 * @author tiry
030 */
031public class PictureTilesCachedEntry {
032
033    protected Calendar modified;
034
035    protected PictureTilesAdapter adapter;
036
037    protected long timeStamp;
038
039    protected String xpath;
040
041    public PictureTilesCachedEntry(Calendar modified, PictureTilesAdapter adapter, String xpath) {
042        this.modified = modified;
043        this.adapter = adapter;
044        this.xpath = xpath;
045        if (xpath == null)
046            this.xpath = "";
047        timeStamp = System.currentTimeMillis();
048    }
049
050    public Calendar getModified() {
051        return modified;
052    }
053
054    public void setModified(Calendar modified) {
055        this.modified = modified;
056    }
057
058    public PictureTilesAdapter getAdapter() {
059        return adapter;
060    }
061
062    public void setAdapter(PictureTilesAdapter adapter) {
063        this.adapter = adapter;
064    }
065
066    public long getTimeStamp() {
067        return timeStamp;
068    }
069
070    public void setTimeStamp(long timeStamp) {
071        this.timeStamp = timeStamp;
072    }
073
074    public String getXpath() {
075        return xpath;
076    }
077
078    public void setXpath(String xpath) {
079        this.xpath = xpath;
080    }
081
082}