mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Added jscript helper method to 'search' root object to encode as ISO9075 strings - for Lucene query path building.
Example: var enc = search.ISO9075Encode("value"); git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9917 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,6 +40,7 @@ import org.alfresco.service.cmr.search.ResultSet;
|
|||||||
import org.alfresco.service.cmr.search.ResultSetRow;
|
import org.alfresco.service.cmr.search.ResultSetRow;
|
||||||
import org.alfresco.service.cmr.search.SearchParameters;
|
import org.alfresco.service.cmr.search.SearchParameters;
|
||||||
import org.alfresco.service.cmr.search.SearchService;
|
import org.alfresco.service.cmr.search.SearchService;
|
||||||
|
import org.alfresco.util.ISO9075;
|
||||||
import org.alfresco.util.ParameterCheck;
|
import org.alfresco.util.ParameterCheck;
|
||||||
import org.dom4j.Document;
|
import org.dom4j.Document;
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
@@ -385,6 +386,18 @@ public final class Search extends BaseScopableProcessorExtension
|
|||||||
}
|
}
|
||||||
return nodes;
|
return nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode a string to ISO907 - used to build valid paths for Lucene queries etc.
|
||||||
|
*
|
||||||
|
* @param s Value to encode
|
||||||
|
*
|
||||||
|
* @return encoded value
|
||||||
|
*/
|
||||||
|
public String ISO9075Encode(String s)
|
||||||
|
{
|
||||||
|
return ISO9075.encode(s);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the query
|
* Execute the query
|
||||||
|
Reference in New Issue
Block a user