Predicate predicate = new Predicate();
predicate.setStore(SearchUtils.STORE);
predicate.setNodes(new Reference[]{reference});
Node node = null;
try {
node = NodeUtils.get(endpoint, username, password, socketTimeout, session, predicate);
} catch (IOException e) {
Logging.connectors.warn(
"Alfresco: IOException closing file input stream: "
+ e.getMessage(), e);
handleIOException(e);
}
if(node.getProperties()!=null){
NamedValue[] properties = node.getProperties();
boolean isDocument = ContentModelUtils.isDocument(properties);
if(isDocument){
boolean isVersioned = NodeUtils.isVersioned(node.getAspects());
if(isVersioned){
rval[i] = NodeUtils.getVersionLabel(properties);
} else {
//a document that doesn't contain versioning information will always be processed
rval[i] = StringUtils.EMPTY;