KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > ui > mapping > ITeamStateDescription


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.ui.mapping;
12
13 import org.eclipse.team.core.diff.IDiff;
14 import org.eclipse.team.core.diff.IThreeWayDiff;
15 import org.eclipse.team.core.mapping.IResourceDiff;
16 import org.eclipse.team.ui.synchronize.TeamStateDescription;
17 import org.eclipse.team.ui.synchronize.TeamStateProvider;
18
19 /**
20  * A description of the the state of a logical model element with respect to a
21  * team repository.
22  * <p>
23  * This interface is not intended to be implemented by clients. Clients that wish
24  * to create a description should use {@link TeamStateDescription}.
25  *
26  * @see TeamStateProvider
27  * @since 3.2
28  */

29 public interface ITeamStateDescription {
30
31     /**
32      * Return the synchronization state flags for the element for which this
33      * state description was generated. Only the portion of the synchronization
34      * state covered by <code>stateMask</code> used when obtaining this
35      * description is returned.
36      *
37      * @return the synchronization state of the given element
38      * @see IDiff
39      * @see IThreeWayDiff
40      * @see IResourceDiff
41      */

42     int getStateFlags();
43
44     /**
45      * Return the portion of the state flags that represent the kind associated
46      * with the element for which this description was generated. See
47      * {@link IDiff#getKind()} for a description of what this value represents.
48      *
49      * @return the kind associated with the element for which this description
50      * was generated
51      */

52     int getKind();
53
54     /**
55      * Return the portion of the state flags that represent the direction
56      * associated with the element for which this description was generated. See
57      * {@link IThreeWayDiff#getDirection()} for a description of what this value
58      * represents.
59      *
60      * @return the direction associated with the element for which this
61      * description was generated
62      */

63     int getDirection();
64
65     /**
66      * Return the properties names for all decorated properties associated with
67      * the element for which this description was generated.
68      *
69      * @return the properties names for all decorated properties
70      */

71     public abstract String JavaDoc[] getPropertyNames();
72
73     /**
74      * Return the value associated with the given property. A <code>null</code>
75      * is returned if the property has no value.
76      * @param property the property
77      * @return the value associated with the given property or <code>null</code>
78      */

79     public abstract Object JavaDoc getProperty(String JavaDoc property);
80     
81     /**
82      * Return whether this state description is equal the to given object.
83      * Clients should use this method to test whether two state
84      * descriptions are equal.
85      * @param object the object
86      * @return whether this state description is equal the to given object
87      */

88     public boolean equals(Object JavaDoc object);
89
90 }
91
Popular Tags