As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
public List getAlfrescoDocuments() { List documents = new ArrayList(); String myType = "cmis:document"; Session session = getAlfrecoSession(); // get the query name of cmis:objectId ObjectType type = session.getTypeDefinition(myType); PropertyDefinition<?> objectIdPropDef = type.getPropertyDefinitions().get(PropertyIds.OBJECT_ID); String objectIdQueryName = objectIdPropDef.getQueryName(); String queryString ="select d.cmis:objectId from cmis:document as d join p:custom:DocumentSigesa as o on d.cmis:objectId = o.cmis:objectId"; System.out.println(queryString); // execute query ItemIterable<QueryResult> results = session.query(queryString, false); for (QueryResult qResult : results) { String objectId = qResult.getPropertyValueByQueryName(objectIdQueryName); Document doc = (Document) session.getObject(session.createObjectId(objectId)); documents.add(doc); System.out.println("Entra"); } return documents; }