use of org.apache.jackrabbit.jcr2spi.xml.WorkspaceContentHandler in project jackrabbit by apache.
the class WorkspaceImpl method getImportContentHandler.
/**
* @see javax.jcr.Workspace#getImportContentHandler(String, int)
*/
public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, RepositoryException {
session.checkSupportedOption(Repository.LEVEL_2_SUPPORTED);
session.checkIsAlive();
Path parentPath = session.getQPath(parentAbsPath);
NodeState parentState = getHierarchyManager().getNodeState(parentPath);
// make sure the given import target is accessible, not locked and checked out.
int options = ItemStateValidator.CHECK_ACCESS | ItemStateValidator.CHECK_LOCK | ItemStateValidator.CHECK_VERSIONING;
getValidator().checkIsWritable(parentState, options);
// build the content handler
return new WorkspaceContentHandler(this, parentAbsPath, uuidBehavior);
}
Aggregations