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 @ 40435
History | View | Annotate | Download (2.8 KB)
1 | 40435 | jjdelcerro | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007-2008 Infrastructures and Transports Department
|
||
4 | * of the Valencian Government (CIT)
|
||
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 2
|
||
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 | */
|
||
22 | |||
23 | /*
|
||
24 | * AUTHORS (In addition to CIT):
|
||
25 | * 2008 IVER T.I {{Task}}
|
||
26 | */
|
||
27 | |||
28 | /**
|
||
29 | *
|
||
30 | */
|
||
31 | package org.gvsig.fmap.dal.resource; |
||
32 | |||
33 | |||
34 | /**
|
||
35 | * A resource notification is related to a change in the state of a resource.
|
||
36 | * It is sent to all resource observers when appropriate. The notification contains
|
||
37 | * the type of change and access to the resource information.
|
||
38 | *
|
||
39 | * This includes:
|
||
40 | *
|
||
41 | * <ul>
|
||
42 | * <li>A resource has been opened</li>
|
||
43 | * <li>A resource has been closed</li>
|
||
44 | * <li>A resource has been prepared</li>
|
||
45 | * <li>A resource property has been changed</li>
|
||
46 | * <li>A resource is being disposed</li>
|
||
47 | * <li>A resource is being opened</li>
|
||
48 | * <li>A resource is being closed</li>
|
||
49 | * </ul>
|
||
50 | *
|
||
51 | * @author jmvivo
|
||
52 | */
|
||
53 | public interface ResourceNotification { |
||
54 | |||
55 | /** A resource has been opened */
|
||
56 | public static final String OPENED = "Opened_Resource"; |
||
57 | /** A resource has been closed */
|
||
58 | public static final String CLOSED = "Closed_Resource"; |
||
59 | /** A resource has been prepared */
|
||
60 | public static final String PREPARE = "Prepare_Resource"; |
||
61 | /** A resource property has been changed */
|
||
62 | public static final String CHANGED = "Changed_Resource"; |
||
63 | /** A resource is being disposed */
|
||
64 | public static final String DISPOSE = "Begin_Dispose_Resource"; |
||
65 | /** A resource is being opened */
|
||
66 | public static final String OPEN = "Begin_Open_Resource"; |
||
67 | /** A resource is being closed */
|
||
68 | public static final String CLOSE = "Begin_Close_Resource"; |
||
69 | |||
70 | /**
|
||
71 | * Returns the parameters of the resource that caused
|
||
72 | * this notification.
|
||
73 | *
|
||
74 | * @return
|
||
75 | * the parameters of this notification's source
|
||
76 | */
|
||
77 | public ResourceParameters getParameters();
|
||
78 | |||
79 | /**
|
||
80 | * Returns the resource that caused this notification.
|
||
81 | *
|
||
82 | * @return
|
||
83 | * this notification's source
|
||
84 | */
|
||
85 | public Resource getResource();
|
||
86 | |||
87 | /**
|
||
88 | * Returns the type of this notification.
|
||
89 | *
|
||
90 | * @return
|
||
91 | * this notification's type. For the allowed values see the
|
||
92 | * constants defined in this interface.
|
||
93 | */
|
||
94 | public String getType(); |
||
95 | |||
96 | } |