return FilenameUtils.getBaseName(file.getName());
}
}
private File findFile(String name, String type, String extension) {
ScriptManager scriptManager = (ScriptManager) GeoServerExtensions.bean("scriptMgr");
try {
if (name.contains(":")) {
name = name.replace(":",File.separator);
}
File f = scriptManager.findScriptFile(name, ScriptType.getByLabel(type), extension);
return f;
} catch (IOException ex) {
LOGGER.warning(String.format(
"Error finding file for name = %s, type = %s extension = %s because ", name,
type, extension, ex.getMessage()));