001/*
002 * (C) Copyright 2006-2008 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     Nuxeo - initial API and implementation
018 *
019 * $Id$
020 *
021 */
022package org.nuxeo.ecm.platform.pictures.tiles.restlets;
023
024import java.util.Calendar;
025
026import org.nuxeo.ecm.platform.pictures.tiles.api.adapter.PictureTilesAdapter;
027
028/**
029 * Wraps a cache entry for the Restlets.
030 *
031 * @author tiry
032 */
033public class PictureTilesCachedEntry {
034
035    protected Calendar modified;
036
037    protected PictureTilesAdapter adapter;
038
039    protected long timeStamp;
040
041    protected String xpath;
042
043    public PictureTilesCachedEntry(Calendar modified, PictureTilesAdapter adapter, String xpath) {
044        this.modified = modified;
045        this.adapter = adapter;
046        this.xpath = xpath;
047        if (xpath == null)
048            this.xpath = "";
049        timeStamp = System.currentTimeMillis();
050    }
051
052    public Calendar getModified() {
053        return modified;
054    }
055
056    public void setModified(Calendar modified) {
057        this.modified = modified;
058    }
059
060    public PictureTilesAdapter getAdapter() {
061        return adapter;
062    }
063
064    public void setAdapter(PictureTilesAdapter adapter) {
065        this.adapter = adapter;
066    }
067
068    public long getTimeStamp() {
069        return timeStamp;
070    }
071
072    public void setTimeStamp(long timeStamp) {
073        this.timeStamp = timeStamp;
074    }
075
076    public String getXpath() {
077        return xpath;
078    }
079
080    public void setXpath(String xpath) {
081        this.xpath = xpath;
082    }
083
084}