Revision 4632
Added by daigle over 15 years ago
SkinPropertyService.java | ||
---|---|---|
137 | 137 |
String metaDataFilePath = servletContext.getRealPath(SKIN_DIR) |
138 | 138 |
+ FileUtil.getFS() + skinName + FileUtil.getFS() + skinName |
139 | 139 |
+ ".properties.metadata.xml"; |
140 |
PropertiesMetaData skinMetaData = new PropertiesMetaData(metaDataFilePath); |
|
141 |
skinMetaDataMap.put(skinName, skinMetaData); |
|
140 |
if (FileUtil.getFileStatus(metaDataFilePath) == FileUtil.DOES_NOT_EXIST) { |
|
141 |
throw new GeneralPropertyException("Could not find skin property metadata file: " + metaDataFilePath); |
|
142 |
} else { |
|
143 |
PropertiesMetaData skinMetaData = |
|
144 |
new PropertiesMetaData(metaDataFilePath); |
|
145 |
skinMetaDataMap.put(skinName, skinMetaData); |
|
146 |
} |
|
142 | 147 |
|
143 | 148 |
String backupPropertyFilePath = |
144 | 149 |
BACKUP_DIR + FileUtil.getFS() + skinName + ".properties.backup"; |
145 |
SortedProperties skinBackupProperties = |
|
146 |
new SortedProperties(backupPropertyFilePath); |
|
147 |
skinBackupProperties.load(); |
|
148 |
skinBackupPropertiesMap.put(skinName, skinBackupProperties); |
|
150 |
if (FileUtil.getFileStatus(backupPropertyFilePath) > FileUtil.DOES_NOT_EXIST) { |
|
151 |
SortedProperties skinBackupProperties = |
|
152 |
new SortedProperties(backupPropertyFilePath); |
|
153 |
skinBackupProperties.load(); |
|
154 |
skinBackupPropertiesMap.put(skinName, skinBackupProperties); |
|
155 |
} else { |
|
156 |
logMetacat.info("Could not find backup properties for skin: " + skinName |
|
157 |
+ ". Backup file does not exist: " + backupPropertyFilePath); |
|
158 |
} |
|
149 | 159 |
} |
150 | 160 |
} catch (TransformerException te) { |
151 | 161 |
throw new GeneralPropertyException(te.getMessage()); |
Also available in: Unified diff
catch and report missing skins configuration files.