11-09-2009 04:52 AM
………….
………….
Query query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/cm:my_folder//*\" + @cm\\:name:plantilla*");
// Execute the query
final Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
QueryResult queryResult = repositoryService.query(STORE, query, false);
// Display the results
ResultSet results = queryResult.getResultSet();
ResultSetRow[] rows = results.getRows();
System.out.println("La busqueda da algo asi:");
if(rows != null){
for(ResultSetRow row : rows){
for (NamedValue namedValue : row.getColumns()){
if (namedValue.getName().endsWith("path") == true)
System.out.println(namedValue.getValue());
if (namedValue.getName().endsWith(Constants.PROP_CREATED) == true)
System.out.println(namedValue.getValue());
else if (namedValue.getName().endsWith(Constants.PROP_NAME) == true){
System.out.println(namedValue.getValue());
else if (namedValue.getName().endsWith(Constants.PROP_DESCRIPTION) == true){
System.out.println(namedValue.getValue());
………….
………….
………….
}
11-18-2009 10:24 AM
11-19-2009 06:10 AM
12-18-2009 06:55 PM
02-04-2010 05:31 AM
02-11-2010 11:40 AM
public static void renameGroup2(String groupName, String newName) {
String query = "+PATH:\"/sys:system/sys:authorities//*\" + @usr\\:authorityName:\""
+ groupName + "\"";
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory
.getRepositoryService();
try {
Node[] nodes = repositoryService.get(new Predicate(null, new Store(
"user", "alfrescoUserStore"), new Query(
Constants.QUERY_LANG_LUCENE, query)));
// but nodes is null!!!
CMLUpdate update = new CMLUpdate(new NamedValue[] {Utils.createNamedValue("{http://www.alfresco.org/model/user/1.0}authorityName", newName)},
new Predicate(new Reference[] { nodes[0].getReference() },
null, null), null);
but nodes is null.user://alfrescoUserStorefor
lucene searchwhat's the search text to search a rootgroup with name test?
02-12-2010 05:47 AM
02-22-2010 02:31 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.