Package org.apache.lenya.cms.rc

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


            File rcmlDirectory = new File(publicationDir, rcEnvironment.getRCMLDirectory());
            File backupDirectory = new File(publicationDir, rcEnvironment.getBackupDirectory());

            revisionController =
                new RevisionController(
                    rcmlDirectory.getAbsolutePath(),
                    backupDirectory.getAbsolutePath(),
                    publicationDir.getAbsolutePath());
        }
        return revisionController;
View Full Code Here


            String publicationPath =
                this.getPublicationDirectory().getCanonicalPath();
            String rcmlDirectory = new File(publicationPath, this.getRcmlDir()).getCanonicalPath();
            String rcbakDirectory = new File(publicationPath, this.getRcbakDir()).getCanonicalPath();
            this.rc  =
                new RevisionController(
            rcmlDirectory,
            rcbakDirectory,
                    publicationPath);
    } catch (IOException e) {
      throw new BuildException(e);
View Full Code Here

    String filename = AUTHORING_PATH +FIRST_DOCUMENT_ID + File.separator + "index_de.xml";
   
    // generate the rcml and rcbak files
    File rcmlDirectory = new File(publicationPath , RCML_DIR);
    File rcbakDirectory = new File(publicationPath , RCBAK_DIR);
    RevisionController rc = new RevisionController(rcmlDirectory.getAbsolutePath(), rcbakDirectory.getAbsolutePath(), publicationPath);
    rc.reservedCheckOut(filename, "lenya");  
    time = rc.reservedCheckIn(filename, "lenya", true);  

    // TODO generate the workflow, meta 
  }
View Full Code Here

    // TODO generate the resources 

    // generate the rcml and rcbak files
    File rcmlDirectory = new File(publicationPath , RCML_DIR);
    File rcbakDirectory = new File(publicationPath , RCBAK_DIR);
        RevisionController rc = new RevisionController(rcmlDirectory.getAbsolutePath(), rcbakDirectory.getAbsolutePath(), publicationPath);
    String filename = AUTHORING_PATH +FIRST_DOCUMENT_ID + File.separator + "index.xml";
    rc.reservedCheckOut(filename, "lenya");  
    time = rc.reservedCheckIn(filename, "lenya", true);  
  }
View Full Code Here

        String rcmlDirectory = rcEnvironment.getRCMLDirectory();
        rcmlDirectory = publicationPath + File.separator + rcmlDirectory;
        String backupDirectory = rcEnvironment.getBackupDirectory();
        backupDirectory = publicationPath + File.separator + backupDirectory;

        return new RevisionController(rcmlDirectory, backupDirectory, publicationPath);     
    }
View Full Code Here

        rcmlDirectory = publicationPath + File.separator + rcmlDirectory;
        backupDirectory = rcEnvironment.getBackupDirectory();
        backupDirectory = publicationPath + File.separator + backupDirectory;

        // Initialize Revision Controller
        rc = new RevisionController(rcmlDirectory, backupDirectory, publicationPath);
        getLogger().debug("revision controller" + rc);

        // /Initialize Revision Controller
        // Get session
        Session session = request.getSession(false);
View Full Code Here

        // save to permanent file, if needed
        if ("checkin".equals(reqType)) {
            getLogger().debug(".act(): Save to permanent file: " + permFile);

            RevisionController rc =
                new RevisionController(
                    sitemapPath + rcmlDirectory,
                    sitemapPath + backupDirectory,
                    sitemapPath);

            try {
                Session session = httpReq.getSession(false);

                if (session == null) {
                    throw new Exception("No session");
                }

                Identity identity = (Identity) session.getAttribute(Identity.class.getName());
                org.apache.lenya.ac.Identity identityTwo =
                    (org.apache.lenya.ac.Identity) session.getAttribute(Identity.class.getName());
                String username = null;
                if (identity != null) {
                    User user = identity.getUser();
                    if (user != null) {
                        username = user.getId();
                    }
                } else if (identityTwo != null) {
                    username = identityTwo.getUser().getId();
                } else {
                    getLogger().error(".act(): No identity!");
                }
                getLogger().debug(".act(): Checkin: " + reqFile + "::" + username);
                rc.reservedCheckIn(xmlRoot + reqFile, username, true);
                FileUtils.copyFile(tempFile, permFile);
            } catch (Exception e) {
                getLogger().error(".act(): Exception during checkin of " + xmlRoot + reqFile, e);
                return null;
            }
View Full Code Here

        rcmlDirectory = publicationPath + File.separator + rcmlDirectory;
        backupDirectory = rcEnvironment.getBackupDirectory();
        backupDirectory = publicationPath + File.separator + backupDirectory;

        // Initialize Revision Controller
        rc = new RevisionController(rcmlDirectory, backupDirectory, publicationPath);
        getLogger().debug("revision controller" + rc);

        // /Initialize Revision Controller
        // Get session
        Session session = request.getSession(false);
View Full Code Here

        String rcmlDirectory = rcEnvironment.getRCMLDirectory();
        rcmlDirectory = publicationPath + File.separator + rcmlDirectory;
        String backupDirectory = rcEnvironment.getBackupDirectory();
        backupDirectory = publicationPath + File.separator + backupDirectory;

        return new RevisionController(rcmlDirectory, backupDirectory, publicationPath);     
    }
View Full Code Here

    // TODO generate the resources 

    // generate the rcml and rcbak files
    File rcmlDirectory = new File(publicationPath , RCML_DIR);
    File rcbakDirectory = new File(publicationPath , RCBAK_DIR);
        RevisionController rc = new RevisionController(rcmlDirectory.getAbsolutePath(), rcbakDirectory.getAbsolutePath(), publicationPath);
    String filename = AUTHORING_PATH +FIRST_DOCUMENT_ID + File.separator + "index.xml";
    rc.reservedCheckOut(filename, "lenya");  
    time = rc.reservedCheckIn(filename, "lenya", true);  
  }
View Full Code Here

TOP

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

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.