KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > framework > engine > SyncConflict


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.framework.engine;
19
20 import sync4j.framework.engine.SyncItem;
21 import sync4j.framework.engine.SyncOperationImpl;
22
23 /**
24  * A synchronization conflict reflects a situation where one item has changed
25  * in both the sources involved in the synchronization. See SyncProcess for
26  * more details.
27  *
28  * @author Stefano Fornari @ Funambol
29  *
30  * @version $Id: SyncConflict.java,v 1.7 2005/03/02 20:57:37 harrie Exp $
31  */

32 public class SyncConflict extends SyncOperationImpl {
33     
34     // --------------------------------------------------------------- constants
35

36     public final static String JavaDoc STATE_DELETED_DELETED = "DD";
37     public final static String JavaDoc STATE_DELETED_UPDATED = "DU";
38     public final static String JavaDoc STATE_DELETED_NEW = "DN";
39     public final static String JavaDoc STATE_DELETED_NONE = "DX";
40     public final static String JavaDoc STATE_DELETED_CONFLICT = "DC";
41     public final static String JavaDoc STATE_UPDATED_DELETED = "UD";
42     public final static String JavaDoc STATE_UPDATED_UPDATED = "UU";
43     public final static String JavaDoc STATE_UPDATED_NEW = "UN";
44     public final static String JavaDoc STATE_UPDATED_NONE = "UX";
45     public final static String JavaDoc STATE_UPDATED_CONFLICT = "UC";
46     public final static String JavaDoc STATE_NEW_DELETED = "ND";
47     public final static String JavaDoc STATE_NEW_UPDATED = "NU";
48     public final static String JavaDoc STATE_NEW_NEW = "NN";
49     public final static String JavaDoc STATE_NEW_NONE = "NX";
50     public final static String JavaDoc STATE_NEW_CONFLICT = "NC";
51     public final static String JavaDoc STATE_NONE_DELETED = "XD";
52     public final static String JavaDoc STATE_NONE_UPDATED = "XU";
53     public final static String JavaDoc STATE_NONE_NEW = "XN";
54     public final static String JavaDoc STATE_NONE_CONFLICT = "XC";
55     public final static String JavaDoc STATE_CONFLICT_DELETED = "CD";
56     public final static String JavaDoc STATE_CONFLICT_UPDATED = "CU";
57     public final static String JavaDoc STATE_CONFLICT_NEW = "CN";
58     public final static String JavaDoc STATE_CONFLICT_NONE = "CX";
59     public final static String JavaDoc STATE_CONFLICT_CONFLICT = "CC";
60     
61
62     // -------------------------------------------------------------- Properties
63

64     /**
65      * The type of this operation
66      */

67     private String JavaDoc type;
68     public String JavaDoc getType() {
69         return this.type;
70     }
71         
72     // ------------------------------------------------------------ Constructors
73

74     public SyncConflict() {
75     }
76     
77     public SyncConflict(SyncItem SyncItemA, SyncItem SyncItemB, String JavaDoc type) {
78         super(SyncItemA, SyncItemB, CONFLICT);
79         
80         this.type = type;
81     }
82 }
83
Popular Tags