KickJava   Java API By Example, From Geeks To Geeks.

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


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  *
25  * This class represents the <Replace> tag as defined by the SyncML
26  * representation specifications.
27  *
28  * @author Stefano Fornari @ Funambol
29  *
30  * @version $Id: Replace.java,v 1.3 2005/03/02 20:57:37 harrie Exp $
31  */

32 public final class Replace
33 extends ModificationCommand
34 implements java.io.Serializable JavaDoc {
35     
36     // --------------------------------------------------------------- Constants
37

38     public static String JavaDoc COMMAND_NAME = "Replace";
39     
40     // ------------------------------------------------------------ Constructors
41

42     /**
43      * For serialization purposes
44      */

45     protected Replace() {}
46     
47     /**
48      * Creates a new Replace object.
49      *
50      * @param cmdID the command identifier - NOT NULL
51      * @param noResp is <NoResponse> required?
52      * @param cred authentication credentials
53      * @param meta meta information
54      * @param items command items
55      *
56      * @throws IllegalArgumentException if any NOT NULL parameter is null
57      */

58     public Replace(
59                final CmdID cmdID ,
60                final boolean noResp,
61                final Cred cred ,
62                final Meta meta ,
63                final Item[] items ) {
64         super(cmdID, meta, items);
65         
66         this.noResp = (noResp) ? new Boolean JavaDoc(noResp) : null;
67         setCred(cred);
68     }
69     
70     
71     // ---------------------------------------------------------- Public methods
72

73     /**
74      * Returns the command name
75      *
76      * @return the command name
77      */

78     public String JavaDoc getName() {
79         return Replace.COMMAND_NAME;
80     }
81 }
82
Popular Tags