Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ public class ObjectDefinitionReader {

private static final Logger logger = LogManager.getLogger(ObjectDefinitionReader.class);
private static final HashMap<File, ObjectDefinitionReader> instances = new HashMap<File, ObjectDefinitionReader>();

public static final String objectPropertyName = "LuceneObjectDefinition.xml";
public static final String pluginPath = "Customizing/global/plugins";
public static final String pluginPath = "public/Customizing/global/plugins";
public static final String componentPath = "components";

private final Vector<File> objectPropertyFiles = new Vector<File>();


File absolutePath;
ClientSettings clientSettings;

private ObjectDefinitionReader(ClientSettings settings) throws ConfigurationException {
this.clientSettings = settings;
this.absolutePath = settings.getAbsolutePath();
Expand Down Expand Up @@ -77,11 +77,11 @@ public Vector<File> getObjectPropertyFiles() {
}

/**
*
*
* @throws ConfigurationException
*/
private void read() throws ConfigurationException {

logger.debug("Start reading search index definitions...");
if(!absolutePath.isDirectory()) {
throw new ConfigurationException("Absolute path required. Path: " + absolutePath.getAbsolutePath());
Expand Down Expand Up @@ -116,14 +116,19 @@ private void traverseByVersion8() {
}

private void traverseByVersion10() {
// Traverse through Plugins
File plugin = new File(absolutePath.getAbsoluteFile() + System.getProperty("file.separator") + ObjectDefinitionReader.componentPath);
logger.debug("Start path is : " + plugin.getAbsoluteFile());
traverse(plugin);
// Traverse through Components
File component = new File(absolutePath.getAbsoluteFile() + System.getProperty("file.separator") + ObjectDefinitionReader.componentPath);
logger.debug("Start path is : " + component.getAbsoluteFile());
traverse(component);

// Traverse through Plugins
File plugin = new File(absolutePath.getAbsoluteFile() + System.getProperty("file.separator") + ObjectDefinitionReader.pluginPath);
logger.debug("Start path is : " + plugin.getAbsoluteFile());
traverse(plugin);
}

private void traverse(File dir) {

if(dir == null) {
return;
}
Expand All @@ -133,7 +138,7 @@ private void traverse(File dir) {
new FileFilter()
{
public boolean accept(File path) {

if(path.isDirectory()) {
//logger.debug("Found new directory: " + path.getAbsolutePath());
return !path.getName().equals(".svn");
Expand Down
Loading