4

Alfresco Javascript API has a search.findNode("workspace://SpacesStore/" + documentguid) method, that giving a guid of a document (node), one can get the noderef of the document.

How to get this "org.alfresco.service.cmr.repository.NodeRef" using java (backend java), having only the document/node guid?

İsmail Y.
  • 3,579
  • 5
  • 21
  • 29
user3643038
  • 143
  • 12

1 Answers1

5

You can use the NodeRef constructor :

Construct a Node Reference from a string representation of a Node Reference. NodeRef(String protocol, String identifier, String id)

Example :

NodeRef myNoderef = new NodeRef("workspace","SpacesStore",documentguid)

If you want to get more information of your document, or do some modification on it, you can use the NodeService of FileFolderService (it depends of your needs) :

fileFolderService.getFileInfo(myNoderef)
Akah
  • 1,890
  • 20
  • 28