AnsweredAssumed Answered

Retrieve archived node

Question asked by qsdmv on Jul 6, 2016
Latest reply on Jul 6, 2016 by qsdmv
Alfresco node browser admin tool use DbNodeServiceImpl to find archived node. Here is the code fragment

if (queryLanguage.equals("noderef"))
                    // ensure node exists
                    NodeRef nodeRef = new NodeRef(query);
                    boolean exists = getNodeService().exists(nodeRef);
                    if (!exists)
                        throw new AlfrescoRuntimeException("Node " + nodeRef + " does not exist.");
                    return "node";

But node browser always return true and found

In my customized code, I passed exact nodeRef and use DbNodeServiceImpl  as well

NodeRef archivedNodeRef = new NodeRef(StoreRef.STORE_REF_ARCHIVE_SPACESSTORE, nodeRef.getId());
       boolean exists = this.dbNodeService.exists(archivedNodeRef);
        return exists;

My code always return false, not found

The same class, same method class and exact same parameter which is node reference. How could exists(nodeRef) returns different results. What is wrong or do I miss something?

Thank you in advance