02-14-2012 10:11 AM
@Override
public List<Project> getProjects() {
RetryingTransactionCallback<List<NodeRef>> searchCallback = new RetryingTransactionCallback<List<NodeRef>>() {
public List<NodeRef> execute() throws Throwable {
List<NodeRef> nodeRefs = serviceRegistry
.getSearchService()
.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE,
SearchService.LANGUAGE_LUCENE,
"TYPE:\"" + ProjectManagementModel.TYPE_PROJECT.toString() + "\"")
.getNodeRefs();
return nodeRefs;
}
};
List<Project> projects = new LinkedList<Project>();
List<NodeRef> nodeRefs = serviceRegistry.getTransactionService()
.getRetryingTransactionHelper().doInTransaction(searchCallback, true);
for (NodeRef nodeRef : nodeRefs) {
projects.add(getProject(nodeRef));
}
return projects;
}
02-14-2012 10:18 AM
12-26-2014 03:51 AM
02-14-2012 11:24 AM
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.