1 /*
2 * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/taglib/cewolf/DbFormsDatasetProducer.java,v 1.1 2006/03/16 14:23:02 hkollmann Exp $
3 * $Revision: 1.1 $
4 * $Date: 2006/03/16 14:23:02 $
5 *
6 * DbForms - a Rapid Application Development Framework
7 * Copyright (C) 2001 Joachim Peer <joepeer@excite.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23 package org.dbforms.taglib.cewolf;
24 /***
25 * Tag <producer> which defines a special DatasetProducer used inside the framwork
26 *
27 * @see de.laures.cewolf.DatasetProducer
28 * @author Henner Kollmann
29 */
30
31 import java.util.Date;
32 import java.util.Map;
33
34 import de.laures.cewolf.DatasetProduceException;
35 import de.laures.cewolf.DatasetProducer;
36
37 public class DbFormsDatasetProducer implements DatasetProducer {
38 private Object dataset;
39
40
41 public DbFormsDatasetProducer(Object dataset) {
42 this.dataset = dataset;
43 }
44
45 /*
46 * (non-Javadoc)
47 *
48 * @see de.laures.cewolf.DatasetProducer#getProducerId()
49 */
50 public String getProducerId() {
51 return getClass().getName();
52 }
53
54 /*
55 * (non-Javadoc)
56 *
57 * @see de.laures.cewolf.DatasetProducer#hasExpired(java.util.Map,
58 * java.util.Date)
59 */
60 public boolean hasExpired(Map params, Date since) {
61 return true;
62 }
63
64 /*
65 * (non-Javadoc)
66 *
67 * @see de.laures.cewolf.DatasetProducer#produceDataset(java.util.Map)
68 */
69 public Object produceDataset(Map params) throws DatasetProduceException {
70 return dataset;
71 }
72 }