Examples of dir()


Examples of org.bladerunnerjs.model.App.dir()

          String relativeFilePath = contentPath.properties.get(FILE_PATH_REQUEST_FORM);
         
          File unbundledResourcesDir = bundleSet.getBundlableNode().file(UNBUNDLED_RESOURCES_DIRNAME);
          App app = bundleSet.getBundlableNode().app();
          File requestedFile = new File(unbundledResourcesDir, relativeFilePath);
          String requestedFilePathRelativeToApp = RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir(), requestedFile);
         
          if (!requestedFile.isFile())
          {
            String requestedFilePathRelativeToRoot = RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir().getParentFile(), requestedFile);
            throw new ContentProcessingException("The requested unbundled resource at '"+requestedFilePathRelativeToRoot+"' does not exist or is not a file.");
View Full Code Here

Examples of org.bladerunnerjs.model.App.dir()

          File requestedFile = new File(unbundledResourcesDir, relativeFilePath);
          String requestedFilePathRelativeToApp = RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir(), requestedFile);
         
          if (!requestedFile.isFile())
          {
            String requestedFilePathRelativeToRoot = RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir().getParentFile(), requestedFile);
            throw new ContentProcessingException("The requested unbundled resource at '"+requestedFilePathRelativeToRoot+"' does not exist or is not a file.");
          }
       
          ByteArrayOutputStream outputBuffer = new ByteArrayOutputStream();
          contentAccessor.handleRequest(requestedFilePathRelativeToApp, outputBuffer);
View Full Code Here

Examples of org.bladerunnerjs.model.App.dir()

      NodeImporter.importAppFromZip(new ZipFile(appZip), app, newAppNamespace);
     
      app.deploy();
     
      logger.println("Successfully imported '" + new File(appZipName).getName() + "' as new application '" + newAppName + "'");
      logger.println(" " + app.dir().getAbsolutePath());
    }
    catch(InvalidDirectoryNameException | InvalidRootPackageNameException e) {
      throw new CommandArgumentsException("Failed to import application from zip '" + appZipName + "'.", e, this);
    }
    catch (Exception e)
View Full Code Here

Examples of org.bladerunnerjs.model.App.dir()

      if (warExport && warExportFile.exists()) {
        boolean deleted = FileUtils.deleteQuietly(warExportFile);
        if (!deleted) {
          File oldWarExportFile = warExportFile;
          warExportFile = new File(targetDir, appName+"_"+getBuiltAppTimestamp()+".war");
          brjs.logger(this.getClass()).warn( Messages.UNABLE_TO_DELETE_BULIT_APP_EXCEPTION, RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir(), oldWarExportFile), RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir(), warExportFile));
        }
      } else if (!warExport && appExportDir.exists()){
        boolean deleted = FileUtils.deleteQuietly(appExportDir);     
        if (!deleted) {
          File oldAppExportDir = appExportDir;
View Full Code Here

Examples of org.bladerunnerjs.model.App.dir()

      if (warExport && warExportFile.exists()) {
        boolean deleted = FileUtils.deleteQuietly(warExportFile);
        if (!deleted) {
          File oldWarExportFile = warExportFile;
          warExportFile = new File(targetDir, appName+"_"+getBuiltAppTimestamp()+".war");
          brjs.logger(this.getClass()).warn( Messages.UNABLE_TO_DELETE_BULIT_APP_EXCEPTION, RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir(), oldWarExportFile), RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir(), warExportFile));
        }
      } else if (!warExport && appExportDir.exists()){
        boolean deleted = FileUtils.deleteQuietly(appExportDir);     
        if (!deleted) {
          File oldAppExportDir = appExportDir;
View Full Code Here

Examples of org.bladerunnerjs.model.App.dir()

      } else if (!warExport && appExportDir.exists()){
        boolean deleted = FileUtils.deleteQuietly(appExportDir);     
        if (!deleted) {
          File oldAppExportDir = appExportDir;
          appExportDir = new File(targetDir, appName+"_"+getBuiltAppTimestamp());
          brjs.logger(this.getClass()).warn( Messages.UNABLE_TO_DELETE_BULIT_APP_EXCEPTION, RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir(), oldAppExportDir), RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir(), appExportDir));
        }
      }
      targetDir.mkdirs();
    }
   
View Full Code Here

Examples of org.bladerunnerjs.model.App.dir()

      } else if (!warExport && appExportDir.exists()){
        boolean deleted = FileUtils.deleteQuietly(appExportDir);     
        if (!deleted) {
          File oldAppExportDir = appExportDir;
          appExportDir = new File(targetDir, appName+"_"+getBuiltAppTimestamp());
          brjs.logger(this.getClass()).warn( Messages.UNABLE_TO_DELETE_BULIT_APP_EXCEPTION, RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir(), oldAppExportDir), RelativePathUtility.get(brjs.getFileInfoAccessor(), app.dir(), appExportDir));
        }
      }
      targetDir.mkdirs();
    }
   
View Full Code Here

Examples of org.bladerunnerjs.model.App.dir()

  {
    File servletContextFilePath = new File(servletContext.getRealPath("/"));
    App app = brjs.locateAncestorNodeOfClass(servletContextFilePath, App.class);
    if (app == null) {
      App brjsApp = brjs.app( servletContextFilePath.getName() );
      if (brjsApp.dirExists() && brjsApp.dir().equals(servletContextFilePath)) {
        app = brjsApp;
      }
    }
   
    if (app == null) {
View Full Code Here

Examples of org.bladerunnerjs.model.App.dir()

      NotFileFilter brjsJarFilter = new NotFileFilter(new AndFileFilter(new PrefixFileFilter("brjs-"), new SuffixFileFilter(".jar")));
      IOFileFilter combinedFilter = new AndFileFilter(new ExcludeDirFileFilter("bundles"), brjsJarFilter);
     
      combinedFilter = new AndFileFilter(combinedFilter, excludeUserLibraryTestsFilter);
     
      createResourcesFromSdkTemplate(app.dir(), temporaryExportDir, combinedFilter);
      if (banner != null) {
        String jsBanner = "/*\n" + banner + "\n*/\n\n";
        includeBannerInDirectoryClasses(new File(temporaryExportDir, "libs"), jsBanner, bannerExtensions);
      }
      FileUtility.zipFolder(temporaryExportDir, destinationZipLocation, false);
View Full Code Here

Examples of org.bladerunnerjs.model.Aspect.dir()

    }
    catch(InvalidNameException e) {
      throw new CommandArgumentsException(e, this);
    }
    catch(ModelUpdateException e) {
      throw new CommandOperationException("Cannot create aspect '" + aspect.dir().getPath() + "'", e);
    }
   
    logger.println(Messages.ASPECT_CREATE_SUCCESS_CONSOLE_MSG, aspectName);
    logger.println(Messages.ASPECT_PATH_CONSOLE_MSG, aspect.dir().getPath());
   
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.