Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
Suppose there's a hippo document in /content/documents/demosite/my/new/path/newdoc, which is a hippo:document handle.
Now, you are creating a new document via WorkflowPersistenceManager in the path, /content/documents/demosite/my/new/path/newdoc/subdoc, where 'newdoc' should be a hippo folder and subdoc should be a hippo:document handle. However, this fails due to the following codes:
public String createAndReturn(final String absPath, final String nodeTypeName, final String name, final boolean autoCreateFolders) throws ObjectBeanPersistenceException {
try {
final Node parentFolderNode;
if (!session.itemExists(absPath)) {
if (!autoCreateFolders)
else
{ parentFolderNode = createMissingFolders(absPath); }} else
{ parentFolderNode = session.getNode(absPath); } return createNodeByWorkflow(parentFolderNode, nodeTypeName, name);
} catch (ObjectBeanPersistenceException e)
catch (Exception e)
{ throw new ObjectBeanPersistenceException(e); }}
So, it tries to create a folder node only when there's no jcr item found by the path.
It should have checked the node type of the folder path(s) as well..