mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Initial cut of IMAP support (disabled by default, to enable move imap sample files into extension folder)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14279 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -48,6 +48,8 @@ import org.dom4j.io.SAXReader;
|
||||
import org.mozilla.javascript.Context;
|
||||
import org.mozilla.javascript.Scriptable;
|
||||
|
||||
import com.werken.saxpath.XPathReader;
|
||||
|
||||
/**
|
||||
* Search component for use by the ScriptService.
|
||||
* <p>
|
||||
@@ -215,6 +217,26 @@ public final class Search extends BaseScopableProcessorExtension
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validation Xpath query
|
||||
*
|
||||
* @param query xpath query
|
||||
* @return true if xpath query valid
|
||||
*/
|
||||
public boolean isValidXpathQuery(String query)
|
||||
{
|
||||
try
|
||||
{
|
||||
XPathReader reader = new XPathReader();
|
||||
reader.parse(query);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute a Lucene search
|
||||
*
|
||||
|
Reference in New Issue
Block a user