KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > exchange > ActivationContent


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2006 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.cms.exchange;
14
15 import java.io.File JavaDoc;
16 import java.util.Hashtable JavaDoc;
17 import java.util.Map JavaDoc;
18
19
20 /**
21  * This class holds all content needed to be activated
22  * @author Sameer Charles $Id: ActivationContent.java 6341 2006-09-12 09:18:27Z philipp $
23  */

24 public class ActivationContent {
25
26     /**
27      * File list
28      */

29     private Map JavaDoc fileList = new Hashtable JavaDoc();
30
31     /**
32      * properties
33      */

34     private Map JavaDoc properties = new Hashtable JavaDoc();
35
36     /**
37      * add file
38      * @param resourceId
39      * @param file
40      */

41     public void addFile(String JavaDoc resourceId, File JavaDoc file) {
42         this.fileList.put(resourceId, file);
43     }
44
45     /**
46      * get file
47      * @param resourceId
48      * @return file
49      */

50     public File JavaDoc getFile(String JavaDoc resourceId) {
51         return (File JavaDoc) this.fileList.get(resourceId);
52     }
53
54     /**
55      * remove file
56      * @param resourceId
57      */

58     public void removeFile(String JavaDoc resourceId) {
59         this.fileList.remove(resourceId);
60     }
61
62     /**
63      * get all files
64      * @return file list
65      */

66     public Map JavaDoc getFiles() {
67         return this.fileList;
68     }
69
70     /**
71      * add property
72      * @param key
73      * @param value
74      */

75     public void addProperty(String JavaDoc key, String JavaDoc value) {
76         if (value == null) {
77             value = "";
78         }
79         this.properties.put(key, value);
80     }
81
82     /**
83      * get property
84      * @param key
85      * @return property value
86      */

87     public String JavaDoc getproperty(String JavaDoc key) {
88         return (String JavaDoc) this.properties.get(key);
89     }
90
91     /**
92      * remove property
93      * @param key
94      */

95     public void removeProperty(String JavaDoc key) {
96         this.properties.remove(key);
97     }
98
99     /**
100      * get property list
101      * @return all properties
102      */

103     public Map JavaDoc getProperties() {
104         return this.properties;
105     }
106 }
107
Popular Tags