KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > framework > core > Results


1 /**
2  * Copyright (C) 2003-2005 Funambol
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19
20 package sync4j.framework.core;
21
22
23 /**
24  * This class represents the <Results> tag as defined by the SyncML
25  * representation specifications.
26  *
27  * @author Stefano Fornari @ Funambol
28  *
29  * @version $Id: Results.java,v 1.3 2005/03/02 20:57:37 harrie Exp $
30  */

31 public final class Results
32 extends ResponseCommand
33 implements java.io.Serializable JavaDoc {
34     
35     // --------------------------------------------------------------- Constants
36

37     public static String JavaDoc COMMAND_NAME = "Results";
38     
39     // ------------------------------------------------------------ Constructors
40

41     /**
42      * For serialization purposes
43      */

44     protected Results() {}
45     
46     /**
47      * Creates a new Results object.
48      *
49      * @param cmdID command identifier - NOT NULL
50      * @param msgRef message reference
51      * @param cmdRef command reference - NOT NULL
52      * @param meta meta information
53      * @param targetRef target reference
54      * @param sourceRef source reference
55      * @param items command items
56      *
57      * @throws java.lang.IllegalArgumentException if any of the NOT NULL
58      * parameters is null.
59      *
60      */

61     public Results(
62         final CmdID cmdID,
63         final String JavaDoc msgRef,
64         final String JavaDoc cmdRef,
65         final Meta meta,
66         final TargetRef targetRef,
67         final SourceRef sourceRef,
68         final Item[] items) {
69             
70         super(
71             cmdID,
72             msgRef,
73             cmdRef,
74             (targetRef == null) ? null : new TargetRef[] { targetRef },
75             (sourceRef == null) ? null : new SourceRef[] { sourceRef },
76             items
77         );
78             
79         this.meta = meta;
80     }
81     
82     // ---------------------------------------------------------- Public methods
83

84     /**
85      * Returns the command name.
86      *
87      * @return the command name
88      */

89     public String JavaDoc getName() {
90         return Results.COMMAND_NAME;
91     }
92 }
93
Popular Tags