Search in sources :

Example 1 with InternalActivity

use of org.apache.jackrabbit.core.version.InternalActivity in project jackrabbit by apache.

the class VersionManagerImpl method merge.

/**
     * {@inheritDoc}
     */
public NodeIterator merge(Node activityNode) throws RepositoryException {
    NodeImpl actNode = (NodeImpl) activityNode;
    if (!actNode.isNodeType(NameConstants.NT_ACTIVITY)) {
        String msg = "Given node is not an activity: " + actNode.safeGetJCRPath();
        log.error(msg);
        throw new UnsupportedRepositoryOperationException(msg);
    }
    InternalActivity activity = vMgr.getActivity(actNode.getNodeId());
    if (activity == null) {
        String msg = "Given activity not found in version storage.";
        log.error(msg);
        throw new UnsupportedRepositoryOperationException(msg);
    }
    List<ItemId> failedIds = new ArrayList<ItemId>();
    merge(activity, failedIds);
    return new LazyItemIterator(context, failedIds);
}
Also used : UnsupportedRepositoryOperationException(javax.jcr.UnsupportedRepositoryOperationException) InternalActivity(org.apache.jackrabbit.core.version.InternalActivity) ArrayList(java.util.ArrayList) ItemId(org.apache.jackrabbit.core.id.ItemId)

Aggregations

ArrayList (java.util.ArrayList)1 UnsupportedRepositoryOperationException (javax.jcr.UnsupportedRepositoryOperationException)1 ItemId (org.apache.jackrabbit.core.id.ItemId)1 InternalActivity (org.apache.jackrabbit.core.version.InternalActivity)1