1 31 32 package org.opencms.file.types; 33 34 import org.opencms.configuration.CmsConfigurationException; 35 import org.opencms.main.OpenCms; 36 37 46 public class CmsResourceTypeFolder extends A_CmsResourceTypeFolderBase { 47 48 49 public static final int RESOURCE_TYPE_ID = 0; 50 51 52 public static final String RESOURCE_TYPE_NAME = "folder"; 53 54 55 private static boolean m_staticFrozen; 56 57 58 private static int m_staticTypeId; 59 60 63 public CmsResourceTypeFolder() { 64 65 super(); 66 m_typeId = RESOURCE_TYPE_ID; 67 m_typeName = RESOURCE_TYPE_NAME; 68 } 69 70 75 public static int getStaticTypeId() { 76 77 return m_staticTypeId; 78 } 79 80 85 public static String getStaticTypeName() { 86 87 return RESOURCE_TYPE_NAME; 88 } 89 90 93 public void initConfiguration(String name, String id, String className) throws CmsConfigurationException { 94 95 if ((OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) && m_staticFrozen) { 96 throw new CmsConfigurationException(Messages.get().container( 98 Messages.ERR_CONFIG_FROZEN_3, 99 this.getClass().getName(), 100 getStaticTypeName(), 101 new Integer (getStaticTypeId()))); 102 } 103 104 if (!RESOURCE_TYPE_NAME.equals(name)) { 105 throw new CmsConfigurationException(Messages.get().container( 107 Messages.ERR_INVALID_RESTYPE_CONFIG_NAME_3, 108 this.getClass().getName(), 109 RESOURCE_TYPE_NAME, 110 name)); 111 } 112 113 m_staticFrozen = true; 115 116 super.initConfiguration(RESOURCE_TYPE_NAME, id, className); 117 m_staticTypeId = m_typeId; 119 } 120 } | Popular Tags |