10-21-2022 09:19 AM
Hello,
I think this should be a simple thing but I'm not finding any information to get a nodeRef from a nodeId.
Is there any way to do this through the Java api?
Best regards,
Francisco Duarte
10-24-2022 03:40 AM
The NodeRef includes information about the Store, that includes by default one protocol and one identifier.
Default stores are the Workspace(StoreRef STORE_REF_WORKSPACE_SPACESSTORE = new StoreRef(PROTOCOL_WORKSPACE, "SpacesStore")) and the Archive (StoreRef STORE_REF_ARCHIVE_SPACESSTORE = new StoreRef(PROTOCOL_ARCHIVE, "SpacesStore")).
The nodeId (by itself) doesn't include information about the Store, so you need to add this information to build a NodeRef.
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACES_STORE, nodeId);
10-24-2022 03:40 AM
The NodeRef includes information about the Store, that includes by default one protocol and one identifier.
Default stores are the Workspace(StoreRef STORE_REF_WORKSPACE_SPACESSTORE = new StoreRef(PROTOCOL_WORKSPACE, "SpacesStore")) and the Archive (StoreRef STORE_REF_ARCHIVE_SPACESSTORE = new StoreRef(PROTOCOL_ARCHIVE, "SpacesStore")).
The nodeId (by itself) doesn't include information about the Store, so you need to add this information to build a NodeRef.
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACES_STORE, nodeId);
Explore our Alfresco products with the links below. Use labels to filter content by product module.