Search in sources :

Example 1 with WorkspaceContentHandler

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);
}
Also used : Path(org.apache.jackrabbit.spi.Path) NodeState(org.apache.jackrabbit.jcr2spi.state.NodeState) WorkspaceContentHandler(org.apache.jackrabbit.jcr2spi.xml.WorkspaceContentHandler)

Aggregations

NodeState (org.apache.jackrabbit.jcr2spi.state.NodeState)1 WorkspaceContentHandler (org.apache.jackrabbit.jcr2spi.xml.WorkspaceContentHandler)1 Path (org.apache.jackrabbit.spi.Path)1