Examples of RCML


Examples of org.apache.lenya.cms.rc.RCML

     * @param manager The service manager.
     * @return An RCML object.
     */
    public synchronized RCML getRcml(SourceNode node, ServiceManager manager) {
        String uri = node.getSourceURI();
        RCML rcml = (RCML) this.uri2rcml.get(uri);
        if (rcml == null) {
            rcml = new SourceNodeRCML(node.getContentSource().getRealSourceUri(), node
                    .getMetaSource().getRealSourceUri(), manager);
            this.uri2rcml.put(uri, rcml);
        }
View Full Code Here

Examples of org.apache.lenya.cms.rc.RCML

    public Revision getRevision(int number) throws RepositoryException {
        return new SourceNodeRevision(this.node, number, this.manager, getLogger());
    }

    public int[] getRevisionNumbers() {
        RCML rcml = this.node.getRcml();
        try {
            Vector entries = rcml.getBackupEntries();
            int[] numbers = new int[entries.size()];
            for (int i = 0; i < entries.size(); i++) {
                CheckInEntry entry = (CheckInEntry) entries.get(i);
                numbers[i] = entry.getVersion();
            }
View Full Code Here

Examples of org.apache.lenya.cms.rc.RCML

    /**
     * @see org.apache.lenya.transaction.Transactionable#checkin()
     */
    public void checkin() throws RepositoryException {
        RCML rcml = getRcml();
        synchronized (rcml) {
            try {
                if (!rcml.isCheckedOutBySession(getSession())) {
                    throw new RepositoryException("Cannot check in node [" + getSourceURI()
                            + "]: not checked out by this session!");
                }
                rcml.checkIn(this, exists(), getSession().isDirty(this));
            } catch (Exception e) {
                throw new RepositoryException(e);
            }
        }
    }
View Full Code Here

Examples of org.apache.lenya.cms.rc.RCML

            }
        }
    }

    public void forceCheckIn() throws RepositoryException {
        RCML rcml = getRcml();
        synchronized (rcml) {
            try {
                if (!rcml.isCheckedOut()) {
                    throw new RepositoryException("Cannot check in node [" + getSourceURI()
                            + "]: not checked out!");
                }
                rcml.checkIn(this, false, false);
            } catch (Exception e) {
                throw new RepositoryException(e);
            }
        }
    }
View Full Code Here

Examples of org.apache.lenya.cms.rc.RCML

    public void checkout(boolean restrictedToSession) throws RepositoryException {

        if (getLogger().isDebugEnabled())
            getLogger().debug("SourceNode::checkout() called, sourceURI [" + getSourceURI() + "]");

        RCML rcml = getRcml();
        synchronized (rcml) {
            try {
                if (rcml.isCheckedOut() && !rcml.isCheckedOutBySession(getSession())) {
                    throw new RepositoryException("The node [" + this
                            + "] is already checked out by another session!");
                }
                if (!rcml.isCheckedOut()) {
                    rcml.checkOut(this, restrictedToSession);
                }
            } catch (RevisionControlException e) {
                throw new RepositoryException(e);
            }
        }
View Full Code Here

Examples of org.apache.lenya.cms.rc.RCML

        return this.metaSource.getMetaData(namespaceUri);
    }

    public boolean exists() throws RepositoryException {
        try {
            RCML rcml = getRcml();
            RCMLEntry entry = rcml.getLatestEntry();
            if (entry == null) {
                return false;
            } else if (entry.getType() == RCML.ci) {
                return true;
            } else {
                if (rcml.getLatestCheckInEntry() != null) {
                    return true;
                } else {
                    // before first check-in, the node exists only in the session that created it
                    return entry.getSessionId().equals(getSession().getId());
                }
View Full Code Here

Examples of org.apache.lenya.cms.rc.RCML

        this.metaSource.delete();
        registerRemoved();
    }

    public String getCheckoutUserId() throws RepositoryException {
        RCML rcml = getRcml();
        synchronized (rcml) {
            try {
                if (!rcml.isCheckedOut()) {
                    throw new RepositoryException("The node [" + this + "] is not checked out!");
                }
                return rcml.getLatestEntry().getIdentity();
            } catch (RevisionControlException e) {
                throw new RepositoryException(e);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.