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.15 by tdb, Wed Feb 5 14:27:59 2003 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines