View Javadoc

1   /* (c) Copyright 2003 Caleigo AB, All rights reserved. 
2    * 
3    * This library is free software; you can redistribute it and/or
4    * modify it under the terms of the GNU Lesser General Public
5    * License as published by the Free Software Foundation; either
6    * version 2.1 of the License, or (at your option) any later version.
7    * 
8    * This library is distributed in the hope that it will be useful,
9    * but WITHOUT ANY WARRANTY; without even the implied warranty of
10   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11   * Lesser General Public License for more details.
12   * 
13   * You should have received a copy of the GNU Lesser General Public
14   * License along with this library; if not, write to the Free Software
15   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16   *  
17   */
18  
19  package org.caleigo.core;
20  
21  import org.caleigo.core.event.*;
22  
23  /*** <Description for IProxySelection>
24   *
25   * @author  Dennis Zikovic
26   * @version 1.00
27   *
28   *//* 
29   *
30   * WHEN        WHO               WHY & WHAT
31   * -----------------------------------------------------------------------------
32   * 2001-11-22  Dennis Zikovic    Creation
33   */
34  public interface IProxySelection extends ISelection
35  {
36      // Methods -----------------------------------------------------------------
37      
38      /*** Boolean access method that returns true if the proxy has a remote
39       * entity if false then getRemoteEntity() will return null.
40       */
41      public boolean hasRemoteSelection();
42      
43      /*** Access method that returns the remote entity of the proxy.
44       * May return null if the proxy does not currently have a remote.
45       */
46      public ISelection getRemoteSelection();
47      
48      /*** Boolean access method that returns true if the proxy has a source
49       * entity if false then getSourceEntity() will return null.
50       */
51      public boolean hasSourceSelection();
52      
53      /*** Access method that returns the source entity of the proxy.
54       * May return null if the proxy does not currently have a source entity.
55       */
56      public ISelection getSourceSelection();
57      
58      /*** Optional mutation method that throws an UnsupportedOperationException 
59       * if the implementing class does not support the method.
60       */
61      public void setRemoteSelection(ISelection entity);
62      
63      /*** Adds IProxyListener to receive notifications of performed 
64       * data operations on the entity object.
65       */
66      public void addProxyListener(IProxyListener listener);
67      
68      /*** Removes the specified IProxyListener from the entity object.
69       */
70      public void removeProxyListener(IProxyListener listener);
71      
72      /*** Help method that returns true if the provided IEntity object exists in
73       * the selection otherwise false is returned.
74       */
75      public boolean contains(IEntity entity);
76      
77      /*** Creates a sub selection with all qualified entities in the called
78       * selection. The created selection that should be independant of changes
79       * in the source/called selection after the time of creation.
80       */
81      public ISelection createSubSelection(Qualifier qualifier);
82      
83      /*** Creates a sub selection with the indexed entities in the called
84       * selection. The created selection that should be independant of changes
85       * in the source/called selection after the time of creation.
86       */
87      public ISelection createSubSelection(int[] indexArray);
88      
89  }
90