Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libTools / src / org / gvsig / tools / visitor / NotSupportedOperationException.java @ 23170

History | View | Annotate | Download (2.09 KB)

1
package org.gvsig.tools.visitor;
2

    
3
import java.util.HashMap;
4
import java.util.Map;
5

    
6
import org.gvsig.tools.exception.BaseException;
7

    
8
/* gvSIG. Geographic Information System of the Valencian Government
9
 *
10
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
11
 * of the Valencian Government (CIT)
12
 *
13
 * This program is free software; you can redistribute it and/or
14
 * modify it under the terms of the GNU General Public License
15
 * as published by the Free Software Foundation; either version 2
16
 * of the License, or (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this program; if not, write to the Free Software
25
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26
 * MA  02110-1301, USA.
27
 *
28
 */
29

    
30
/*
31
 * AUTHORS (In addition to CIT):
32
 * 2008 IVER T.I. S.A.   {{Task}}
33
 */
34
/**
35
 * @author Jorge Piera Llodr? (jorge.piera@iver.es)
36
 */
37
public class NotSupportedOperationException extends BaseException{
38
        private static final long serialVersionUID = 1L;
39
        private String visitorClassName = null;
40
        private String objectClassName = null;
41

    
42
        public NotSupportedOperationException(Visitor visitor, Object object){
43
                this.visitorClassName = visitor.getClass().getName();
44
                this.objectClassName = object.getClass().getName();
45
        }
46

    
47
        /**
48
         * Initializes some values
49
         */
50
        public void init() {
51
                messageKey="geometries_reader_not_exists";
52
                formatString="The visitor %(visitorClassName) doesn't implements any " +
53
                        "operation for the object %(objectClassName)";
54
                code = serialVersionUID;
55
        }
56

    
57
        /*
58
         * (non-Javadoc)
59
         * @see org.gvsig.exceptions.BaseException#values()
60
         */
61
        protected Map values() {
62
                HashMap map = new HashMap();
63
                map.put("visitorClassName", visitorClassName);
64
                map.put("objectClassName", objectClassName);
65
                return map;
66
        }
67

    
68
}