Package javax.jcr.retention

Examples of javax.jcr.retention.RetentionPolicy


    /**
     * Creates a node with a RetentionPolicy
     */
    private  void addRetentionTestData(Node node) throws RepositoryException {
        RetentionPolicy rp = RetentionPolicyImpl.createRetentionPolicy("testRetentionPolicy", node.getSession());
        node.getSession().getRetentionManager().setRetentionPolicy(node.getPath(), rp);
    }
View Full Code Here


        }
    }

    private void addRetentionPolicy(Path nodePath, PropertyImpl p) throws RepositoryException {
        synchronized (retentionMap) {
            RetentionPolicy rp = new RetentionPolicyImpl(p.getString(), ((PropertyId) p.getId()).getParentId(), session);
            retentionMap.put(nodePath, rp);
            retentionCnt++;
        }
    }
View Full Code Here

            throw new IllegalStateException("Not initialized.");
        }
        if (retentionCnt <= 0) {
            return false;
        }
        RetentionPolicy rp = null;
        PathMap.Element element = retentionMap.map(nodePath, true);
        if (element != null) {
            rp = (RetentionPolicy) element.get();
        }
        if (rp == null && checkParent) {
View Full Code Here

            for (NodeIterator children = testRootNode.getNodes(); children.hasNext();) {
                Node child = children.nextNode();

                // Remove retention policy if needed
                if (rm != null) {
                    RetentionPolicy pol = rm.getRetentionPolicy(child.getPath());
                    if (pol != null) {
                        rm.removeRetentionPolicy(child.getPath());
                        s.save();
                    }
                }
View Full Code Here

    /**
     * Creates a node with a RetentionPolicy
     */
    private void addRetentionTestData(Node node) throws RepositoryException {
        RetentionPolicy rp = RetentionPolicyImpl.createRetentionPolicy("testRetentionPolicy", node.getSession());
        node.getSession().getRetentionManager().setRetentionPolicy(node.getPath(), rp);
    }
View Full Code Here

            for (NodeIterator children = testRootNode.getNodes(); children.hasNext();) {
                Node child = children.nextNode();

                // Remove retention policy if needed
                if (rm != null) {
                    RetentionPolicy pol = rm.getRetentionPolicy(child.getPath());
                    if (pol != null) {
                        rm.removeRetentionPolicy(child.getPath());
                        s.save();
                    }
                }
View Full Code Here

            for (NodeIterator children = testRootNode.getNodes(); children.hasNext();) {
                Node child = children.nextNode();

                // Remove retention policy if needed
                if (rm != null) {
                    RetentionPolicy pol = rm.getRetentionPolicy(child.getPath());
                    if (pol != null) {
                        rm.removeRetentionPolicy(child.getPath());
                        s.save();
                    }
                }
View Full Code Here

        }
    }

    private void addRetentionPolicy(Path nodePath, PropertyImpl p) throws RepositoryException {
        synchronized (retentionMap) {
            RetentionPolicy rp = new RetentionPolicyImpl(p.getString(), ((PropertyId) p.getId()).getParentId(), session);
            retentionMap.put(nodePath, rp);
            retentionCnt++;
        }
    }
View Full Code Here

            throw new IllegalStateException("Not initialized.");
        }
        if (retentionCnt <= 0) {
            return false;
        }
        RetentionPolicy rp = null;
        PathMap.Element element = retentionMap.map(nodePath, true);
        if (element != null) {
            rp = (RetentionPolicy) element.get();
        }
        if (rp == null && checkParent ) {
View Full Code Here

            PathNotFoundException, AccessDeniedException, RepositoryException {

        NodeImpl n = (NodeImpl) session.getNode(absPath);
        session.getAccessManager().checkPermission(session.getQPath(absPath), Permission.RETENTION_MNGMT);

        RetentionPolicy rPolicy = null;
        if (n.isNodeType(REP_RETENTION_MANAGEABLE) && n.hasProperty(REP_RETENTION_POLICY)) {
            String jcrName = n.getProperty(REP_RETENTION_POLICY).getString();
            rPolicy = new RetentionPolicyImpl(jcrName, n.getNodeId(), session);
        }
       
View Full Code Here

TOP

Related Classes of javax.jcr.retention.RetentionPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.