}
i++;
}
try{
QueryResult queryResult = null;
if (StringUtils.isEmpty(luceneQuery)) {
// get documents from the root of the Alfresco Repository
queryResult = SearchUtils.getChildrenFromCompanyHome(endpoint, username, password, socketTimeout, session);
} else {
// execute a Lucene query against the repository
queryResult = SearchUtils.luceneSearch(endpoint, username, password, socketTimeout, session, luceneQuery);
}
if(queryResult!=null){
ResultSet resultSet = queryResult.getResultSet();
ResultSetRow[] resultSetRows = resultSet.getRows();
for (ResultSetRow resultSetRow : resultSetRows) {
NamedValue[] properties = resultSetRow.getColumns();
String nodeReference = PropertiesUtils.getNodeReference(properties);
activities.addSeedDocument(nodeReference);