05-28-2009 04:40 AM
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
05-28-2009 04:45 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.