KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > server > engine > Sync4jOperationStatusOK


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 package sync4j.server.engine;
19
20 import sync4j.framework.core.ModificationCommand;
21 import sync4j.framework.core.StatusCode;
22 import sync4j.framework.engine.SyncOperation;
23 import sync4j.framework.engine.source.SyncSource;
24 import sync4j.server.engine.Sync4jOperationStatus;
25
26 /**
27  * This class represents a SyncOperation excecuted without problems.
28  *
29  * @author Stefano Fornari @ Funambol
30  * @version $Id: Sync4jOperationStatusOK.java,v 1.5 2005/03/02 20:57:39 harrie Exp $
31  */

32 public class Sync4jOperationStatusOK extends Sync4jOperationStatus {
33     
34     /**
35      * The code identifying this condition
36      */

37     private int statusCode;
38     
39     /** Creates a new instance of Sync4jOperationStatus */
40     public Sync4jOperationStatusOK(SyncOperation operation ,
41                                    SyncSource syncSource,
42                                    ModificationCommand cmd ) {
43         super(operation, syncSource);
44         this.cmd = cmd;
45         this.statusCode = StatusCode.OK;
46     }
47     
48     public Sync4jOperationStatusOK(SyncOperation operation ,
49                                    SyncSource syncSource,
50                                    ModificationCommand cmd ,
51                                    int statusCode) {
52         super(operation, syncSource);
53         this.cmd = cmd;
54         this.statusCode = statusCode;
55     }
56     
57
58     /** Which SyncML status code this condition corresponds to?
59      *
60      */

61     public int getStatusCode() {
62         return statusCode;
63     }
64 }
Popular Tags