09-11-2008 05:26 AM
function getNodeByPath($Store, $path, $node = null)
{
$bits = split('/', $path);
if ($node == null) {
$node = $Store->getCompanyHome();
}
/* @var $node Node */
foreach ($bits as $bit) {
// Skip up until we have the parts after the company home
if (empty($bit) || $bit == 'Company Home') {
continue;
}
// Get the node for the current bit. If the current
// "bit" doesn't exist, then
$children = $node->getChildren();
foreach ($children as $child) {
$childNode = $child->getChild();
if ($childNode->cm_name == $bit) {
$node = $childNode;
// Cheat and skip to the next 'bit' to scan
continue 2;
}
}
$node = null;
break;
}
return $node;
}
Me he dado cuenta que sólo me devuelve en la lista los primeros 1000 nodos de una carpeta (en la que tenemos unos 2500). 09-11-2008 09:25 AM
09-12-2008 02:03 AM
Fetched next set of results:
Total results count: 1212
Batch size: 1000
New Position: 1000
09-12-2008 03:01 AM
String sQuery = "TYPE:\"" + Constants.TYPE_CONTENT + "\"";
// Establece el tamaño del batch en la cabecera de la query…
int batchSize = 10;
QueryConfiguration queryCfg = new QueryConfiguration();
queryCfg.setFetchSize(batchSize);
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
repositoryService.setHeader(new RepositoryServiceLocator().getServiceName().getNamespaceURI(), "QueryHeader", queryCfg);
// Obtenemos los primeros resultados
QueryResult result = repositoryService.query(STORE, getQuery(sQuery), true);
//Procesamos el primer lote de resultados de la query
String querySession = result.getQuerySession();
while (querySession != null) {
// Accedemos al siguiente lote de resultados
result = repositoryService.fetchMore(querySession);
// Procesamos los siguientes resultados de la query
querySession = result.getQuerySession();
}
09-12-2008 03:19 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.