01: /*
02: * Copyright 2001-2006 C:1 Financial Services GmbH
03: *
04: * This software is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License Version 2.1, as published by the Free Software Foundation.
07: *
08: * This software is distributed in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11: * Lesser General Public License for more details.
12: *
13: * You should have received a copy of the GNU Lesser General Public
14: * License along with this library; if not, write to the Free Software
15: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
16: */
17:
18: package de.finix.contelligent.client.base.resource;
19:
20: import java.io.Serializable;
21: import java.util.Map;
22:
23: public abstract class ContelligentResource implements Serializable {
24:
25: protected boolean modified;
26:
27: protected Map<String, String> categoryMap;
28:
29: protected String constraints;
30:
31: public ContelligentResource(Map<String, String> categoryMap) {
32: this (categoryMap, false, null);
33: }
34:
35: public ContelligentResource(Map<String, String> categoryMap,
36: boolean modified) {
37: this (categoryMap, modified, null);
38: }
39:
40: public ContelligentResource(Map<String, String> categoryMap,
41: String contraints) {
42: this (categoryMap, false, contraints);
43: }
44:
45: public ContelligentResource(Map<String, String> categoryMap,
46: boolean modified, String contraints) {
47: this .categoryMap = categoryMap;
48: this .modified = modified;
49: this .constraints = contraints;
50: }
51:
52: public boolean isModified() {
53: return modified;
54: }
55:
56: public void setModified(boolean modified) {
57: this .modified = modified;
58: }
59:
60: public void setCategoryMap(Map<String, String> categoryMap) {
61: this .categoryMap = categoryMap;
62: }
63:
64: public Map<String, String> getCategoryMap() {
65: return categoryMap;
66: }
67:
68: public void setConstraints(String contraints) {
69: if (this .constraints == null
70: || !this .constraints.equals(contraints)) {
71: this .constraints = contraints;
72: setModified(true);
73: }
74: }
75:
76: public String getConstraints() {
77: return constraints;
78: }
79:
80: }
|