svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / resource / ResourceNotification.java @ 40596
History | View | Annotate | Download (2.79 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 3
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.fmap.dal.resource; |
25 |
|
26 |
|
27 |
/**
|
28 |
* A resource notification is related to a change in the state of a resource.
|
29 |
* It is sent to all resource observers when appropriate. The notification contains
|
30 |
* the type of change and access to the resource information.
|
31 |
*
|
32 |
* This includes:
|
33 |
*
|
34 |
* <ul>
|
35 |
* <li>A resource has been opened</li>
|
36 |
* <li>A resource has been closed</li>
|
37 |
* <li>A resource has been prepared</li>
|
38 |
* <li>A resource property has been changed</li>
|
39 |
* <li>A resource is being disposed</li>
|
40 |
* <li>A resource is being opened</li>
|
41 |
* <li>A resource is being closed</li>
|
42 |
* </ul>
|
43 |
*
|
44 |
* @author jmvivo
|
45 |
*/
|
46 |
public interface ResourceNotification { |
47 |
|
48 |
/** A resource has been opened */
|
49 |
public static final String OPENED = "Opened_Resource"; |
50 |
/** A resource has been closed */
|
51 |
public static final String CLOSED = "Closed_Resource"; |
52 |
/** A resource has been prepared */
|
53 |
public static final String PREPARE = "Prepare_Resource"; |
54 |
/** A resource property has been changed */
|
55 |
public static final String CHANGED = "Changed_Resource"; |
56 |
/** A resource is being disposed */
|
57 |
public static final String DISPOSE = "Begin_Dispose_Resource"; |
58 |
/** A resource is being opened */
|
59 |
public static final String OPEN = "Begin_Open_Resource"; |
60 |
/** A resource is being closed */
|
61 |
public static final String CLOSE = "Begin_Close_Resource"; |
62 |
|
63 |
/**
|
64 |
* Returns the parameters of the resource that caused
|
65 |
* this notification.
|
66 |
*
|
67 |
* @return
|
68 |
* the parameters of this notification's source
|
69 |
*/
|
70 |
public ResourceParameters getParameters();
|
71 |
|
72 |
/**
|
73 |
* Returns the resource that caused this notification.
|
74 |
*
|
75 |
* @return
|
76 |
* this notification's source
|
77 |
*/
|
78 |
public Resource getResource();
|
79 |
|
80 |
/**
|
81 |
* Returns the type of this notification.
|
82 |
*
|
83 |
* @return
|
84 |
* this notification's type. For the allowed values see the
|
85 |
* constants defined in this interface.
|
86 |
*/
|
87 |
public String getType(); |
88 |
|
89 |
} |
90 |
|