ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/util/uk/org/iscream/cms/util/XMLPacket.java
(Generate patch)

Comparing projects/cms/source/util/uk/org/iscream/cms/util/XMLPacket.java (file contents):
Revision 1.9 by ajm, Tue Dec 12 20:44:30 2000 UTC vs.
Revision 1.13 by tdb, Sat May 18 18:16:04 2002 UTC

# Line 1 | Line 1
1 + /*
2 + * i-scream central monitoring system
3 + * Copyright (C) 2000-2002 i-scream
4 + *
5 + * This program is free software; you can redistribute it and/or
6 + * modify it under the terms of the GNU General Public License
7 + * as published by the Free Software Foundation; either version 2
8 + * of the License, or (at your option) any later version.
9 + *
10 + * This program is distributed in the hope that it will be useful,
11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 + * GNU General Public License for more details.
14 + *
15 + * You should have received a copy of the GNU General Public License
16 + * along with this program; if not, write to the Free Software
17 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 + */
19 +
20   //---PACKAGE DECLARATION---
21 < package uk.ac.ukc.iscream.util;
21 > package uk.org.iscream.cms.server.util;
22  
23   //---IMPORTS---
24   import java.util.*;
25  
26   /**
27 < * Object in which to store incoming XML data
28 < * to be passed around the CORBA system.
27 > * Object in which to store incoming XML data for processing
28 > * by a component of the system.
29   *
30   * @author  $Author$
31   * @version $Id$
# Line 28 | Line 47 | public class XMLPacket {
47  
48      /**
49       * Add a key and value pair to the HashMap.
50 +     *
51 +     * @param key The key value
52 +     * @param value The value associated with the key
53       */
54      public synchronized void addParam (String key, String value) {
55          _params.put(key, value);
# Line 38 | Line 60 | public class XMLPacket {
60       * Returns null if the key does not exist, although
61       * this should not necessarily indicate that the key
62       * does not exist.
63 +     *
64 +     * @param key The key to retrieve
65 +     * @return The value associated with the key, if one exists, otherwise null.
66       */
67      public synchronized String getParam (String key) {
68          return (String) _params.get(key);
# Line 45 | Line 70 | public class XMLPacket {
70      
71      /**
72       * Return a Set of the keys in the HashMap.
73 +     *
74 +     * @return a Set of the values in this Packet.
75       */
76      public synchronized Set getSet () {
77          return _params.keySet();
# Line 52 | Line 79 | public class XMLPacket {
79      
80      /**
81       * Find if a particular key exists in the HashMap.
82 +     *
83 +     * @param key The key to check for
84 +     * @return whether the key exists
85       */
86      public synchronized boolean containsKey(String key){
87          return _params.containsKey(key);
# Line 60 | Line 90 | public class XMLPacket {
90      /**
91       * Print out the entire HashMap.
92       * (Mainly for assisting debugging.)
93 +     *
94 +     * @return A String representation of the data in this Packet
95       */
96      public synchronized String printAll () {
97          return _params.toString();
# Line 69 | Line 101 | public class XMLPacket {
101       * Overrides the {@link java.lang.Object#toString() Object.toString()}
102       * method to provide clean logging (every class should have this).
103       *
104 <     * This uses the uk.ac.ukc.iscream.util.NameFormat class
104 >     * This uses the uk.org.iscream.cms.server.util.NameFormat class
105       * to format the toString()
106       *
107       * @return the name of this class and its CVS revision
# Line 87 | Line 119 | public class XMLPacket {
119  
120   //---ATTRIBUTES---
121  
122 +    /**
123 +     * A HashMap of parameters
124 +     */
125      private HashMap _params = new HashMap();
126  
127      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines