Changeset 1509

Show
Ignore:
Timestamp:
2008-02-13 23:08:27 (6 months ago)
Author:
mosipov
Message:

rewrite of FileType to ResourceType and more

Location:
FCKeditor.Java/branches/2.4/src
Files:
1 removed
6 modified
2 moved

Legend:

Unmodified
Added
Removed
  • FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/ConnectorServlet.java

    r1478 r1509  
    4545import javax.xml.transform.stream.StreamResult; 
    4646 
    47 import net.fckeditor.FileType; 
     47import net.fckeditor.ResourceType; 
    4848import net.fckeditor.handlers.ConfigurationHandler; 
    4949import net.fckeditor.handlers.ExtensionsHandler; 
    50 import net.fckeditor.handlers.FileTypeHandler; 
    5150import net.fckeditor.tool.UploadResponse; 
    5251import net.fckeditor.tool.Utils; 
     
    9695                // read the optional parameters 
    9796                ConfigurationHandler.setForceSingleExtension(getInitParameter("ForceSingleExtension")); 
    98                 if (getInitParameter("baseDir") != null) // TODO should 'baseDir' contains '..' ?? 
    99                         ConfigurationHandler.setBaseDir(getInitParameter("baseDir")); 
    100  
    101                 setExtension(FileType.FILE, getInitParameter("AllowedExtensionsFile"), 
     97                if (getInitParameter("UserFilesPath") != null) // TODO should 'baseDir' contains '..' ?? 
     98                        ConfigurationHandler.setUserFilesPath(getInitParameter("UserFilesPath")); 
     99 
     100                setExtension(ResourceType.File, getInitParameter("AllowedExtensionsFile"), 
    102101                        getInitParameter("DeniedExtensionsFile")); 
    103                 setExtension(FileType.IMAGE, getInitParameter("AllowedExtensionsImage"), 
     102                setExtension(ResourceType.Image, getInitParameter("AllowedExtensionsImage"), 
    104103                        getInitParameter("DeniedExtensionsImage")); 
    105                 setExtension(FileType.FLASH, getInitParameter("AllowedExtensionsFlash"), 
     104                setExtension(ResourceType.Flash, getInitParameter("AllowedExtensionsFlash"), 
    106105                        getInitParameter("DeniedExtensionsFlash")); 
    107                 setExtension(FileType.MEDIA, getInitParameter("AllowedExtensionsMedia"), 
     106                setExtension(ResourceType.Media, getInitParameter("AllowedExtensionsMedia"), 
    108107                        getInitParameter("DeniedExtensionsMedia")); 
    109108 
    110109                // check, if 'baseDir' exists 
    111110                String realBaseDir = getServletContext().getRealPath( 
    112                         ConfigurationHandler.getDefaultBaseDir()); 
     111                        ConfigurationHandler.getDefaultUserFilesPath()); 
    113112                File baseFile = new File(realBaseDir); 
    114113                if (!baseFile.exists()) { 
     
    140139                String typeStr = request.getParameter("Type"); 
    141140                String currentFolderStr = request.getParameter("CurrentFolder"); 
    142                 FileType fileType = FileTypeHandler.getTypeDefault(typeStr); 
     141                ResourceType fileType = ResourceType.getDefaultResourceType(typeStr); 
    143142 
    144143                logger.debug("Parameter Command: {}", commandStr); 
     
    239238                String typeStr = request.getParameter("Type"); 
    240239                String currentFolderStr = request.getParameter("CurrentFolder"); 
    241                 if (!FileTypeHandler.isValid(typeStr)) 
     240                if (!ResourceType.isValid(typeStr)) 
    242241                        logger.warn("Unknown Type requested: {}", typeStr); 
    243242 
     
    251250                } 
    252251 
    253                 FileType fileType = FileTypeHandler.getTypeDefault(typeStr); 
     252                ResourceType fileType = ResourceType.getDefaultResourceType(typeStr); 
    254253 
    255254                UploadResponse ur = null; 
     
    283282                                        String extension = FilenameUtils.getExtension(filename); 
    284283 
    285                                         boolean validExtension = ExtensionsHandler.isAllowed(FileTypeHandler 
    286                                                 .getType(typeStr), extension); 
     284                                        boolean validExtension = ExtensionsHandler.isAllowed(fileType, extension); 
    287285 
    288286                                        if (!validExtension) 
     
    378376        } 
    379377 
    380         private String constructTypeBasedFolderString(final FileType fileType, 
     378        private String constructTypeBasedFolderString(final ResourceType fileType, 
    381379                final String currentFolderString, final HttpServletRequest request) { 
    382380                StringWriter retval = new StringWriter(); 
    383                 retval.append(ConfigurationHandler.getBaseDir(request)); 
    384                 retval.append(FileTypeHandler.getSubDirForType(fileType)); 
     381                retval.append(ConfigurationHandler.getUserFilesPath(request)); 
     382                retval.append(fileType.getPath()); 
    385383                retval.append(currentFolderString); 
    386384                return replaceAll(retval.toString(), "//", "/"); 
     
    397395         *             if allowed and denied extensions are set. 
    398396         */ 
    399         private void setExtension(final FileType type, final String allowedList, final String deniedList) { 
     397        private void setExtension(final ResourceType type, final String allowedList, final String deniedList) { 
    400398                // if both lists are set, we have to throw an error, because only one list should be set 
    401399                if (Utils.isNotEmpty(allowedList) && Utils.isNotEmpty(deniedList)) { 
  • FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/FCKeditor.java

    r1507 r1509  
    4141        private String instanceName; 
    4242        private String value; 
    43         private String basePath = ConfigurationHandler.getFckEditorDir(); 
     43        private String basePath = ConfigurationHandler.getBasePath(); 
    4444        private String toolbarSet = ConfigurationHandler.getFckEditorToolbarSet(); 
    4545        private String width = ConfigurationHandler.getFckEditorWidth(); 
     
    5151         * Initialize the object setting all basic configurations.<br> 
    5252         *  
    53          * The basePath is context root + {@link ConfigurationHandler#getFckEditorDir()}. 
     53         * The basePath is context root + {@link ConfigurationHandler#getBasePath()}. 
    5454         *  
    5555         * @param request 
     
    8282                else 
    8383                        this.basePath = request.getContextPath() 
    84                                         + ConfigurationHandler.getFckEditorDir(); 
     84                                        + ConfigurationHandler.getBasePath(); 
    8585 
    8686                config = new FCKeditorConfig(); 
  • FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/handlers/ConfigurationHandler.java

    r1492 r1509  
    4848 * Something special is {@link ISessionData}. The implemented class provides some session based data. 
    4949 * See {@link ISessionData} for additional informations. For example, to get a user based base dir, 
    50  * for each request {@link #getBaseDir(HttpServletRequest)} is calling. If 'sessionData' is set, 
     50 * for each request {@link #getUserFilesPath(HttpServletRequest)} is calling. If 'sessionData' is set, 
    5151 * {@link ISessionData#getBaseDir(HttpServletRequest)} will be returned, otherwise the default base 
    5252 * dir. 
     
    5858 
    5959        private static Properties defaultProperties = new Properties(); 
    60         private static String baseDir; 
     60        private static String userFilesPath; 
    6161        private static ISessionData sessionData = null; 
    62         private static String fckEditorDir; 
     62        private static String basePath; 
    6363        private static String fckEditorHeight; 
    6464        private static String fckEditorWidth; 
     
    8282                        throw new RuntimeException("Can't load default properties!", e); 
    8383                } 
    84                 baseDir = defaultProperties.getProperty("fckeditor.basedir"); 
    85                 fckEditorDir = defaultProperties.getProperty("fckeditor.dir"); 
     84                userFilesPath = defaultProperties.getProperty("connector.userFilesPath"); 
     85                basePath = defaultProperties.getProperty("fckeditor.basePath"); 
    8686                fckEditorWidth = defaultProperties.getProperty("fckeditor.width"); 
    8787                fckEditorHeight = defaultProperties.getProperty("fckeditor.height"); 
    88                 fckEditorToolbarSet = defaultProperties.getProperty("fckeditor.toolbarset"); 
     88                fckEditorToolbarSet = defaultProperties.getProperty("fckeditor.toolbarSet"); 
    8989                forceSingleExtension = Boolean.valueOf(defaultProperties 
    90                         .getProperty("fckeditor.forcesingleextension")); 
     90                        .getProperty("connector.forceSingleExtension")); 
    9191 
    9292                logger.info("Default properties loaded and initialized successfully."); 
     
    9999         *         {@link ISessionData}} isn't set. 
    100100         */ 
    101         public static String getBaseDir(final HttpServletRequest servletRequest) { 
     101        public static String getUserFilesPath(final HttpServletRequest servletRequest) { 
    102102                if (sessionData == null || sessionData.getBaseDir(servletRequest) == null) 
    103                         return getDefaultBaseDir(); 
     103                        return getDefaultUserFilesPath(); 
    104104                return sessionData.getBaseDir(servletRequest); 
    105105        } 
    106106 
    107107        /** 
    108          * Getter for the default baseDir. 
     108         * Getter for the default userFilesPath. 
    109109         *  
    110110         * @return 
    111111         */ 
    112         public static String getDefaultBaseDir() { 
    113                 return baseDir; 
    114         } 
    115  
    116         /** 
    117          * Setter for the base dir (using for user files). If param 'baseDir' is empty, the property 
     112        public static String getDefaultUserFilesPath() { 
     113                return userFilesPath; 
     114        } 
     115 
     116        /** 
     117         * Setter for the base dir (using for user files). If param 'userFilesPath' is empty, the property 
    118118         * leaves untouched. 
    119119         *  
    120          * @param baseDir 
     120         * @param userFilesPath 
    121121         *            relative to the context root (no leading or ending /). 
    122122         */ 
    123         public static void setBaseDir(final String baseDir) { 
    124                 if (Utils.isNotEmpty(baseDir)) 
    125                         ConfigurationHandler.baseDir = baseDir; 
     123        public static void setUserFilesPath(final String userFilesPath) { 
     124                if (Utils.isNotEmpty(userFilesPath)) 
     125                        ConfigurationHandler.userFilesPath = userFilesPath; 
    126126        } 
    127127 
     
    154154         * @return Dir of the fckeditor relative to the context root. 
    155155         */ 
    156         public static String getFckEditorDir() { 
    157                 return fckEditorDir; 
     156        public static String getBasePath() { 
     157                return basePath; 
    158158        } 
    159159 
     
    161161         * Setter for the dir of the fckeditor. 
    162162         *  
    163          * @param fckEditorDir 
     163         * @param basePath 
    164164         *            relative to the context root (no leading or ending /). 
    165165         */ 
    166166        public static void setFckEditorDir(final String fckEditorDir) { 
    167                 ConfigurationHandler.fckEditorDir = fckEditorDir; 
     167                ConfigurationHandler.basePath = fckEditorDir; 
    168168        } 
    169169 
  • FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/handlers/ExtensionsHandler.java

    r1455 r1509  
    2525import java.util.Set; 
    2626 
    27 import net.fckeditor.FileType; 
     27import net.fckeditor.ResourceType; 
    2828import net.fckeditor.tool.Utils; 
    2929 
     
    4040public class ExtensionsHandler { 
    4141 
    42         private static Map<FileType, Set<String>> extensionsAllowed = new HashMap<FileType, Set<String>>(); 
    43         private static Map<FileType, Set<String>> extensionsDenied = new HashMap<FileType, Set<String>>(); 
     42        private static Map<ResourceType, Set<String>> extensionsAllowed = new HashMap<ResourceType, Set<String>>(); 
     43        private static Map<ResourceType, Set<String>> extensionsDenied = new HashMap<ResourceType, Set<String>>(); 
    4444 
    4545        static { 
    4646                // load defaults 
    47                 extensionsAllowed.put(FileType.FILE, Utils.getSet(ConfigurationHandler 
    48                     .getDefaultProperty("fckeditor.file.extensions.allowed"))); 
    49                 extensionsDenied.put(FileType.FILE, Utils.getSet(ConfigurationHandler 
    50                     .getDefaultProperty("fckeditor.file.extensions.denied"))); 
    51                 extensionsAllowed.put(FileType.MEDIA, Utils.getSet(ConfigurationHandler 
    52                     .getDefaultProperty("fckeditor.media.extensions.allowed"))); 
    53                 extensionsDenied.put(FileType.MEDIA, Utils.getSet(ConfigurationHandler 
    54                     .getDefaultProperty("fckeditor.media.extensions.denied"))); 
    55                 extensionsAllowed.put(FileType.IMAGE, Utils.getSet(ConfigurationHandler 
    56                     .getDefaultProperty("fckeditor.image.extensions.allowed"))); 
    57                 extensionsDenied.put(FileType.IMAGE, Utils.getSet(ConfigurationHandler 
    58                     .getDefaultProperty("fckeditor.image.extensions.denied"))); 
    59                 extensionsAllowed.put(FileType.FLASH, Utils.getSet(ConfigurationHandler 
    60                     .getDefaultProperty("fckeditor.flash.extensions.allowed"))); 
    61                 extensionsDenied.put(FileType.FLASH, Utils.getSet(ConfigurationHandler 
    62                     .getDefaultProperty("fckeditor.flash.extensions.denied"))); 
     47                extensionsAllowed.put(ResourceType.File, Utils.getSet(ConfigurationHandler 
     48                    .getDefaultProperty("connector.extensions.file.allowed"))); 
     49                extensionsDenied.put(ResourceType.File, Utils.getSet(ConfigurationHandler 
     50                    .getDefaultProperty("connector.extensions.file.denied"))); 
     51                extensionsAllowed.put(ResourceType.Media, Utils.getSet(ConfigurationHandler 
     52                    .getDefaultProperty("connector.extensions.media.allowed"))); 
     53                extensionsDenied.put(ResourceType.Media, Utils.getSet(ConfigurationHandler 
     54                    .getDefaultProperty("connector.extensions.media.denied"))); 
     55                extensionsAllowed.put(ResourceType.Image, Utils.getSet(ConfigurationHandler 
     56                    .getDefaultProperty("connector.extensions.image.allowed"))); 
     57                extensionsDenied.put(ResourceType.Image, Utils.getSet(ConfigurationHandler 
     58                    .getDefaultProperty("connector.extensions.image.denied"))); 
     59                extensionsAllowed.put(ResourceType.Flash, Utils.getSet(ConfigurationHandler 
     60                    .getDefaultProperty("connector.extensions.flash.allowed"))); 
     61                extensionsDenied.put(ResourceType.Flash, Utils.getSet(ConfigurationHandler 
     62                    .getDefaultProperty("connector.extensions.flash.denied"))); 
    6363        } 
    6464 
     
    7070         * @return Set of allowed extensions or an empty set. 
    7171         */ 
    72         public static Set<String> getExtensionsAllowed(final FileType type) { 
     72        public static Set<String> getExtensionsAllowed(final ResourceType type) { 
    7373                return extensionsAllowed.get(type); 
    7474        } 
     
    8383         *          Required format: <code>ext1&#124;ext2&#124;ext3</code> 
    8484         */ 
    85         public static void setExtensionsAllowed(final FileType type, final String extensionsList) { 
     85        public static void setExtensionsAllowed(final ResourceType type, final String extensionsList) { 
    8686                if (extensionsList != null) { 
    8787                        extensionsAllowed.put(type, Utils.getSet(extensionsList)); 
     
    9797         * @return Set of denied extensions or an empty set. 
    9898         */ 
    99         public static Set<String> getExtensionsDenied(final FileType type) { 
     99        public static Set<String> getExtensionsDenied(final ResourceType type) { 
    100100                return extensionsDenied.get(type); 
    101101        } 
     
    110110         *          Required format: <code>ext1&#124;ext2&#124;ext3</code> 
    111111         */ 
    112         public static void setExtensionsDenied(final FileType type, final String extensionsList) { 
     112        public static void setExtensionsDenied(final ResourceType type, final String extensionsList) { 
    113113                if (extensionsList != null) { 
    114114                        extensionsDenied.put(type, Utils.getSet(extensionsList)); 
     
    124124         * @return True, false. False is returned too, if 'type' or 'extensions' is null. 
    125125         */ 
    126         public static boolean isAllowed(final FileType type, final String extension) { 
     126        public static boolean isAllowed(final ResourceType type, final String extension) { 
    127127                if (type == null || extension == null) 
    128128                        return false; 
  • FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/ResourceType.java

    r1455 r1509  
    2121package net.fckeditor; 
    2222 
    23  
    2423/** 
    2524 * The different types of files to work with. 
    26  * 
     25 *  
    2726 * @version $Id$ 
    2827 */ 
    29 public enum FileType { 
    30         FILE,           // the defaults 
    31         IMAGE, 
    32         FLASH, 
    33         MEDIA 
     28public enum ResourceType { 
     29 
     30        Image, File, Flash, Media; 
     31 
     32        public String getPath() { 
     33                return "/" + name().toLowerCase(); 
     34        } 
     35 
     36        public static ResourceType getDefaultResourceType(String name) { 
     37 
     38                ResourceType rt = getResourceType(name); 
     39 
     40                return rt == null ? File : rt; 
     41 
     42        } 
     43 
     44        public static ResourceType getResourceType(String name) { 
     45 
     46                try { 
     47                        return ResourceType.valueOf(name); 
     48                } catch (IllegalArgumentException e) { 
     49                        return null; 
     50                } catch (NullPointerException e) { 
     51                        return null; 
     52                } 
     53        } 
     54 
     55        public static boolean isValid(final String name) { 
     56                return getResourceType(name) == null ? false : true; 
     57        } 
     58 
    3459} 
  • FCKeditor.Java/branches/2.4/src/main/resources/net/fckeditor/handlers/default.properties

    r1500 r1509  
    44## @version $Id: default.properties 1184 2008-01-03 10:39:36Z th-schwarz $  
    55 
     6# default extensions settings 
     7connector.extensions.file.denied   = php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi 
     8connector.extensions.flash.allowed  = swf|fla 
     9connector.extensions.image.allowed = jpg|gif|jpeg|png|bmp 
     10connector.extensions.link.allowed = 7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip 
     11 
     12# Due to security issues with Apache modules, it is recommended to leave this setting enabled. 
     13connector.forceSingleExtension = true 
     14 
    615# base directory for the user files relative to the context root (starting / and no ending /) 
    7 fckeditor.basedir = /userfiles 
     16connector.userFilesPath = /userfiles 
    817 
    918# directory of the editor relative to the context root according to fckeditor.js (trailing slashes!) 
    10 fckeditor.dir = /fckeditor/ 
    11  
    12 # default extensions settings 
    13 fckeditor.file.extensions.denied = php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi 
    14 fckeditor.flash.extensions.denied = swf|fla 
    15 fckeditor.image.extensions.allowed = jpg|gif|jpeg|png|bmp 
    16  
    17 # Due to security issues with Apache modules, it is recommended to leave this setting enabled. 
    18 fckeditor.forcesingleextension = true 
     19fckeditor.basePath = /fckeditor/ 
    1920 
    2021# default height of the editor 
    2122fckeditor.height = 200 
    2223 
    23 # sub-directories for each file type 
    24 fckeditor.subdir.media.file  = /file 
    25 fckeditor.subdir.media.flash = /flash 
    26 fckeditor.subdir.media.image = /image 
    27 fckeditor.subdir.media.media = /media 
    28  
    2924# default toolbar set of the editor 
    30 fckeditor.toolbarset = Default 
     25fckeditor.toolbarSet = Default 
    3126 
    3227# default width of the editor 
  • FCKeditor.Java/branches/2.4/src/test/java/net/fckeditor/handlers/ExtensionsHandlerTest.java

    r1455 r1509  
    2323import static org.junit.Assert.assertFalse; 
    2424import static org.junit.Assert.assertTrue; 
    25 import net.fckeditor.FileType; 
     25import net.fckeditor.ResourceType; 
    2626 
    2727import org.junit.Test; 
     
    3636        @Test 
    3737        public void testIsAllowed01() { 
    38                 FileType type = FileType.FILE; 
     38                ResourceType type = ResourceType.File; 
    3939                ExtensionsHandler.setExtensionsAllowed(type, "a"); 
    4040                ExtensionsHandler.setExtensionsDenied(type, "b"); 
     
    4848        @Test 
    4949        public void testIsAllowed02() { 
    50                 FileType type = FileType.FILE; 
     50                ResourceType type = ResourceType.File; 
    5151                ExtensionsHandler.setExtensionsAllowed(type, "a|b|c"); 
    5252                assertTrue(ExtensionsHandler.isAllowed(type, "a")); 
  • FCKeditor.Java/branches/2.4/src/test/java/net/fckeditor/handlers/ResourceTypeTest.java

    r1455 r1509  
    2222 
    2323import static org.junit.Assert.*; 
    24  
    25 import net.fckeditor.FileType; 
     24import net.fckeditor.ResourceType; 
    2625 
    2726import org.junit.Test; 
     
    2928/** 
    3029 * Tests for {@link FileTypeHandler}. 
    31  * 
     30 *  
    3231 * @version $Id$ 
    3332 */ 
    34 public class FileTypeHandlerTest { 
    35  
    36          
    37         @Test 
    38     public void getType01() throws Exception { 
    39             assertTrue(FileTypeHandler.getType("xyz") == null); 
    40     } 
     33public class ResourceTypeTest { 
    4134 
    4235        @Test 
    43     public void getType02() throws Exception { 
    44             assertTrue(FileTypeHandler.getType("file") == FileType.FILE); 
    45     } 
     36        public void getType01() throws Exception { 
     37                assertNull(ResourceType.getResourceType("xyz")); 
     38        } 
    4639 
    4740        @Test 
    48     public void getType03() throws Exception { 
    49             assertTrue(FileTypeHandler.getType("FiLe") == FileType.FILE); 
    50     } 
    51          
    52         @Test 
    53     public void getType04() throws Exception { 
    54             assertTrue(FileTypeHandler.getType("IMAGE") == FileType.IMAGE); 
    55     } 
    56          
    57         @Test 
    58     public void isValid01() throws Exception { 
    59             assertFalse(FileTypeHandler.isValid("1234")); 
    60     } 
    61          
    62         @Test 
    63     public void isValid02() throws Exception { 
    64             assertTrue(FileTypeHandler.isValid("fLash")); 
    65     } 
     41        public void getType02() throws Exception { 
     42                assertEquals(ResourceType.File, ResourceType.getResourceType("File")); 
     43        } 
    6644 
    6745        @Test 
    68     public void isValid03() throws Exception { 
    69             assertTrue(FileTypeHandler.isValid("MeDiA")); 
    70     } 
    71          
    72         @Test 
    73     public void getTypeDefault01() throws Exception { 
    74             assertTrue(FileTypeHandler.getTypeDefault("wrong-type").equals(FileType.FILE)); 
    75     } 
     46        public void getType03() throws Exception { 
     47                assertEquals(ResourceType.Image, ResourceType.getResourceType("Image")); 
     48        } 
    7649 
    7750        @Test 
    78     public void getTypeDefault02() throws Exception { 
    79             assertTrue(FileTypeHandler.getTypeDefault("flAsh").equals(FileType.FLASH)); 
    80     } 
    81          
    82         @Test 
    83     public void getSubDirForType01() throws Exception { 
    84             assertTrue(FileTypeHandler.getSubDirForType(null).equals("/file")); 
    85     } 
     51        public void isValid01() throws Exception { 
     52                assertFalse(ResourceType.isValid("1234")); 
     53        } 
    8654 
    8755        @Test 
    88     public void getSubDirForType02() throws Exception { 
    89             assertTrue(FileTypeHandler.getSubDirForType(FileType.FILE).equals("/file")); 
    90     } 
     56        public void isValid02() throws Exception { 
     57                assertFalse(ResourceType.isValid("fLash")); 
     58        } 
     59 
     60        @Test 
     61        public void isValid03() throws Exception { 
     62                assertFalse(ResourceType.isValid("MeDiA")); 
     63        } 
     64 
     65        @Test 
     66        public void getTypeDefault01() throws Exception { 
     67