001: /*
002: * Copyright 2001-2006 C:1 Financial Services GmbH
003: *
004: * This software is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License Version 2.1, as published by the Free Software Foundation.
007: *
008: * This software is distributed in the hope that it will be useful,
009: * but WITHOUT ANY WARRANTY; without even the implied warranty of
010: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
011: * Lesser General Public License for more details.
012: *
013: * You should have received a copy of the GNU Lesser General Public
014: * License along with this library; if not, write to the Free Software
015: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
016: */
017:
018: package de.finix.contelligent.xml.elements;
019:
020: import java.util.Collections;
021: import java.util.HashMap;
022: import java.util.Map;
023:
024: /**
025: * This is the element for the client-module tag in a project.xml file.
026: */
027: public class ClientModuleElement {
028: private String jar;
029:
030: private Map guis = new HashMap();
031:
032: private Map componentGuis = new HashMap();
033:
034: private Map templateGuis = new HashMap();
035:
036: private Map viewGuis = new HashMap();
037:
038: private Map views = new HashMap();
039:
040: private Map modules = new HashMap();
041:
042: private String jarFile;
043:
044: private String allPermissions = "false";
045:
046: private String j2eeClientPermissions = "false";
047:
048: public String getJarFile() {
049: return jarFile;
050: }
051:
052: public void setJarFile(String jarFile) {
053: this .jarFile = jarFile;
054: }
055:
056: public void setJar(final String jar) {
057: this .jar = jar;
058: }
059:
060: public String getJar() {
061: return jar;
062: }
063:
064: public void addGui(String name, String className) {
065: guis.put(name, className);
066: }
067:
068: public void addComponentGui(String name, String className) {
069: componentGuis.put(name, className);
070: }
071:
072: public void addTemplateGui(String name, String className) {
073: templateGuis.put(name, className);
074: }
075:
076: public void addViewGui(String name, String className) {
077: viewGuis.put(name, className);
078: }
079:
080: public Map getGuis() {
081: return Collections.unmodifiableMap(guis);
082: }
083:
084: public Map getComponentGuis() {
085: return Collections.unmodifiableMap(componentGuis);
086: }
087:
088: public Map getTemplateGuis() {
089: return Collections.unmodifiableMap(templateGuis);
090: }
091:
092: public Map getViewGuis() {
093: return Collections.unmodifiableMap(viewGuis);
094: }
095:
096: public void addView(String name, String className) {
097: views.put(name, className);
098: }
099:
100: public Map getViews() {
101: return Collections.unmodifiableMap(views);
102: }
103:
104: public void addModule(String name, String className) {
105: modules.put(name, className);
106: }
107:
108: public Map getModules() {
109: return Collections.unmodifiableMap(modules);
110: }
111:
112: public String getAllPermissions() {
113: return allPermissions;
114: }
115:
116: public void setAllPermissions(final String allPermissions) {
117: this .allPermissions = allPermissions;
118: }
119:
120: public void setAllPermissions(final boolean allPermissions) {
121: this .allPermissions = String.valueOf(allPermissions);
122: }
123:
124: public boolean isAllPermissions() {
125: return Boolean.valueOf(allPermissions.trim()).booleanValue();
126: }
127:
128: public String getJ2eeClientPermissions() {
129: return j2eeClientPermissions;
130: }
131:
132: public void setJ2eeClientPermissions(
133: final String j2eeClientPermissions) {
134: this .j2eeClientPermissions = j2eeClientPermissions;
135: }
136:
137: public void setJ2eeClientPermissions(
138: final boolean j2eeClientPermissions) {
139: this .j2eeClientPermissions = String
140: .valueOf(j2eeClientPermissions);
141: }
142:
143: public boolean isJ2eeClientPermissions() {
144: return Boolean.valueOf(j2eeClientPermissions.trim())
145: .booleanValue();
146: }
147: }
|