Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_data / src / org / gvsig / fmap / data / exceptions / ResourceConsumerNotFoundException.java @ 23772

History | View | Annotate | Download (863 Bytes)

1
package org.gvsig.fmap.data.exceptions;
2

    
3
import org.gvsig.fmap.data.Resource;
4

    
5
public class ResourceConsumerNotFoundException extends DataException {
6

    
7
        /**
8
         *
9
         */
10
        private static final long serialVersionUID = -3762206616316749438L;
11
        private final static String MESSAGE_FORMAT = "Consumer '%(consumer)s' not found for resource '%(resource)s'.";
12
        private final static String MESSAGE_KEY = "_AlreadyEditingException";
13
        private Resource resouce;
14
        private Object consumer;
15

    
16
        public ResourceConsumerNotFoundException(Resource resource, Object consumer) {
17
                super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
18
                this.resouce = resource;
19
                this.consumer = consumer;
20
                setValue("resource", resource.getKey());
21
                setValue("consumer", consumer.toString());
22
        }
23

    
24
        public Resource getResouce() {
25
                return resouce;
26
        }
27

    
28
        public Object getConsumer() {
29
                return consumer;
30
        }
31
}