Examples of FSEntryFile


Examples of ca.carleton.gcrc.couch.fsentry.FSEntryFile

    copyMachine.addTextConversion("ATLAS_NAME", props.getProperty("atlas.name"));

    File templateDir = PathComputer.computeTemplatesDir( gs.getInstallDir() );
    File sourceExtra = new File(templateDir, "extra");
    File destExtra = new File(atlasDir, "extra");
    copyMachine.copyDir(new FSEntryFile(sourceExtra), destExtra);
   
   
  }
View Full Code Here

Examples of ca.carleton.gcrc.couch.fsentry.FSEntryFile

        copyMachine.addTextConversion("NUNALIIT_BIN_DIR", binDir.getAbsolutePath());
      }
      copyMachine.addTextConversion("ATLAS_DIR", atlasDir.getAbsolutePath());
      copyMachine.addTextConversion("ATLAS_NAME", "unknown");
     
      copyMachine.copyDir(new FSEntryFile(templateDir), atlasDir);
   
    } catch(Exception e) {
      throw new Exception("Unable to copy template to new atlas directory",e);
    }
   
View Full Code Here

Examples of ca.carleton.gcrc.couch.fsentry.FSEntryFile

    // Create _design/mobile document...
    Document doc = null;
    {
      File userDesignDir = PathComputer.computeUserDesignDir(gs.getInstallDir());
         
      FSEntry fileEntry = new FSEntryFile(userDesignDir);
      doc = DocumentFile.createDocument(fileEntry);
    }

    // Update document
    updateProcess.update(doc, true);
View Full Code Here

Examples of ca.carleton.gcrc.couch.fsentry.FSEntryFile

      }
     
      // Template for _design/site
      File siteDesignDocDir = PathComputer.computeSiteDesignDir( gs.getInstallDir() );
      if( siteDesignDocDir.exists() && siteDesignDocDir.isDirectory() ){
        FSEntry templateDir = new FSEntryFile(siteDesignDocDir);
        mergedEntries.add(templateDir);
      } else {
        throw new Exception("Unable to find internal template for _design/site");
      }
     
View Full Code Here

Examples of ca.carleton.gcrc.couch.fsentry.FSEntryFile

      {
        File atlasDesignDir = PathComputer.computeAtlasDesignDir(installDir);
        if( null == atlasDesignDir ) {
          throw new Exception("Can not find _design/atlas template");
        } else {
          FSEntryFile f = new FSEntryFile(atlasDesignDir);
          entries.add(f);
        }
       
        // Vendor files
        {
View Full Code Here

Examples of ca.carleton.gcrc.couch.fsentry.FSEntryFile

    // Create _design/mobile document...
    Document doc = null;
    {
      File mobileDesignDir = PathComputer.computeMobileDesignDir(gs.getInstallDir());
         
      FSEntry fileEntry = new FSEntryFile(mobileDesignDir);
      doc = DocumentFile.createDocument(fileEntry);
    }

    // Update document
    updateProcess.update(doc);
View Full Code Here

Examples of ca.carleton.gcrc.couch.fsentry.FSEntryFile

        File subDir = new File(docsDir, subDirName);
        if( subDir.exists() && subDir.isDirectory() ) {
          // OK, let's create a document based on this
          Document doc = null;
          try {
            FSEntryFile entry = new FSEntryFile(subDir);
            doc = DocumentFile.createDocument(entry);
          } catch(Exception e){
            throw new Exception("Unable to read document at: "+subDir.getName(), e);
          }
         
View Full Code Here

Examples of ca.carleton.gcrc.couch.fsentry.FSEntryFile

    copyMachine.addTextConversion("ATLAS_NAME", props.getProperty("atlas.name"));

    File templateDir = PathComputer.computeTemplatesDir( gs.getInstallDir() );
    File sourceExtra = new File(templateDir, "extra");
    File destExtra = new File(atlasDir, "extra");
    copyMachine.copyDir(new FSEntryFile(sourceExtra), destExtra);
   
   
  }
View Full Code Here

Examples of ca.carleton.gcrc.couch.fsentry.FSEntryFile

    try {
      DocumentUpdateProcess updateProcess = new DocumentUpdateProcess(couchDb);
      updateProcess.setListener(UpdateListener._singleton);
     
      FSEntry fileEntry = new FSEntryFile(ddDir);
      Document doc = DocumentFile.createDocument(fileEntry);

      updateProcess.update(
          doc
          ,DocumentUpdateProcess.Schedule.UPDATE_EVEN_IF_MODIFIED
View Full Code Here

Examples of ca.carleton.gcrc.couch.fsentry.FSEntryFile

        String[] fileNames = documentsDir.list();
        for(String fileName : fileNames) {
          File file = new File(documentsDir, fileName);
   
          try {
            FSEntry fileEntry = new FSEntryFile(file);
            Document doc = DocumentFile.createDocument(fileEntry);

            updateProcess.update(doc);

          } catch(Exception e) {
            throw new ServletException("Problem pushing document: "+file.getAbsolutePath(), e);
          }
        }
      }
    }
   
    // Find root directory for updating documents
    {
      File documentsDir = null;
      {
        documentsDir = new File(webInfDirectory, "updateDocs");
        if( false == documentsDir.exists() || false == documentsDir.isDirectory() ) {
          documentsDir = null;
        }
      }
     
      if( null == documentsDir ) {
        logger.error("Unable to find document directory for updating");
      } else {
        String[] fileNames = documentsDir.list();
        for(String fileName : fileNames) {
          File file = new File(documentsDir, fileName);
   
          try {
            FSEntry fileEntry = new FSEntryFile(file);
            Document doc = DocumentFile.createDocument(fileEntry);

            updateProcess.update(
              doc
              ,DocumentUpdateProcess.Schedule.UPDATE_EVEN_IF_MODIFIED
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.