Package org.apache.lenya.cms.rc

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


            RCEnvironment rcEnvironment;
            try {
                File servletContext = publication.getServletContext();
                rcEnvironment = RCEnvironment.getInstance(servletContext.getCanonicalPath());
            } catch (IOException e) {
                throw new RevisionControlException(e);
            }

            File rcmlDirectory = new File(publicationDir, rcEnvironment.getRCMLDirectory());
            File backupDirectory = new File(publicationDir, rcEnvironment.getBackupDirectory());
View Full Code Here


        NamespaceHelper helper = saveToXml();
        Assert.notNull("XML document", helper);
        try {
            SourceUtil.writeDOM(helper.getDocument(), getRcmlSourceUri(), this.manager);
        } catch (Exception e) {
            throw new RevisionControlException(e);
        }
        clearDirty();
    }
View Full Code Here

                Element element = saveToXml(helper, entry);
                root.appendChild(element);
            }
            return helper;
        } catch (Exception e) {
            throw new RevisionControlException("Could create revision control XML ["
                    + getRcmlSourceUri() + "]", e);
        }
    }
View Full Code Here

                        RCMLEntry entry = getEntry(helper, elements[i]);
                        entries.add(entry);
                    }
                }
            } catch (Exception e) {
                throw new RevisionControlException(e);
            }
        }
        return this.entries;
    }
View Full Code Here

        try {
            if (SourceUtil.exists(sourceUri, manager)) {
                SourceUtil.copy(this.manager, sourceUri, backupSourceUri);
            }
        } catch (Exception e) {
            throw new RevisionControlException(e);
        }
    }
View Full Code Here

        SourceResolver resolver = null;
        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            SourceUtil.copy(resolver, backupSourceUri, wrapper.getOutputStream());
        } catch (Exception e) {
            throw new RevisionControlException(e);
        } finally {
            if (resolver != null) {
                this.manager.release(resolver);
            }
        }
View Full Code Here

        String uri = getBackupSourceUri(sourceUri, time);
        try {
            SourceUtil.delete(uri, this.manager);
            SourceUtil.deleteEmptyCollections(uri, this.manager);
        } catch (Exception e) {
            throw new RevisionControlException(e);
        }
    }
View Full Code Here

                deleteBackup(this.contentSourceUri, time);
                deleteBackup(this.metaSourceUri, time);
            }
            this.entries.clear();
        } catch (Exception e) {
            throw new RevisionControlException(e);
        }
    }
View Full Code Here

                this.entries.add(newEntry);
            }

            write();
        } catch (Exception e) {
            throw new RevisionControlException(e);
        }
    }
View Full Code Here

            RCEnvironment rcEnvironment;
            try {
                File servletContext = publication.getServletContext();
                rcEnvironment = RCEnvironment.getInstance(servletContext.getCanonicalPath());
            } catch (IOException e) {
                throw new RevisionControlException(e);
            }

            File rcmlDirectory = new File(publicationDir, rcEnvironment.getRCMLDirectory());
            File backupDirectory = new File(publicationDir, rcEnvironment.getBackupDirectory());
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.rc.RevisionControlException

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.