private NodeRef getDocNoderef(){
Store store = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
String queryString = "PATH:\"" + dir + "/*\"";
queryString = queryString + " AND @cm\\:name:\"" + name + "\"";
Query query = new Query(Constants.QUERY_LANG_LUCENE,queryString);
RepositoryServiceSoapBindingStub repositoryService =WebServiceFactory.getRepositoryService();
NodeRef nodeRef = null;
QueryResult queryResult;
try {
queryResult = repositoryService.query(store, query, false);
ResultSet resultSet = queryResult.getResultSet();
ResultSetRow[] rows = resultSet.getRows();
if (rows != null) {
nodeRef = new NodeRef("workspace://SpacesStore/" + rows[0].getNode().getId());
} //end if
} catch (RepositoryFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static <T> void setNodeAspect(NodeRef node, NodeService nodeService,T t) {
AlfrescoAspectProperty
aspectProperty=t.getClass().getAnnotation(AlfrescoAspectProperty.class);
String nodeURI=aspectProperty.url();
String aspectName=aspectProperty.aspect();
nodeService.addAspect( node, QName.createQName(nodeURI,aspectName), convertToAlfrescoMap(getMap(t), nodeURI));
}
org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/cb4f075f-f574-4a30-9308-21bcc7a44610
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.