Package org.bladerunnerjs.model

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


        }
      }
      targetDir.mkdirs();
    }
   
    if(!app.dirExists()) throw new NodeDoesNotExistException(app, this);
    if(!targetDir.isDirectory()) throw new DirectoryDoesNotExistCommandException(targetDirPath, this);
   
    try {
      if (warExport) {
        if(warExportFile.exists()) throw new DirectoryAlreadyExistsCommandException(warExportFile.getPath(), this);
View Full Code Here


    Map<String, String> transformations = new HashMap<>();
   
    transformations.put("dir", "folder");
    TemplateUtility.installTemplate(brjs.app("app"), "app", transformations);
   
    assertTrue("app folder exists", app.dirExists());
   
    assertTrue("root folder exists", app.file("root-folder").exists());
    assertTrue("root folder is a directory", app.file("root-folder").isDirectory());
    assertTrue("root text file exists", app.file("root-folder/root-text-file.txt").exists());
    assertEquals("root text file has correct contents", "this is the root text file (in root folder)", fileUtil.readFileToString(app.file("root-folder/root-text-file.txt")));
View Full Code Here

    String bladesetName = parsedArgs.getString("new-bladeset-name");
   
    App app = brjs.app(appName);
    Bladeset bladeset = app.bladeset(bladesetName);
   
    if(!app.dirExists()) throw new NodeDoesNotExistException(app, this);
    if(bladeset.dirExists()) throw new NodeAlreadyExistsException(bladeset, this);
   
    try {
      bladeset.populate();
    }
View Full Code Here

   
    App app = brjs.app(appName);
    Bladeset bladeset = getBladeset(app, bladesetName);
    Blade blade = bladeset.blade(bladeName);
   
    if(!app.dirExists()) throw new NodeDoesNotExistException(app, this);
    if(!bladeset.dirExists()) throw new NodeDoesNotExistException(bladeset, this);
    if(blade.dirExists()) throw new NodeAlreadyExistsException(blade, this);
   
    try {
      blade.populate();
View Full Code Here

  {
    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

    String banner = parsedArgs.getString("banner");
    String[] bannerExtensions = parsedArgs.getString("bannerExtensions").split(",");
    String targetPath = parsedArgs.getString("target");

    App app = brjs.app(appName);
    if(!app.dirExists()) throw new CommandArgumentsException("Could not find application '" + appName + "'", this);
   
    File targetDir;
    if (targetPath.equals("")) {
      targetDir = brjs.storageDir("exported-apps");
    } else {
View Full Code Here

    String aspectName = parsedArgs.getString("new-aspect-name");
   
    App app = brjs.app(appName);
    Aspect aspect = app.aspect(aspectName);
   
    if(!app.dirExists()) throw new NodeDoesNotExistException(app, this);
    if(aspect.dirExists()) throw new NodeAlreadyExistsException(aspect, this);
   
    try {
      aspect.populate();
    }
View Full Code Here

    App app = brjs.app(appName);
    Bladeset bladeset = app.bladeset(bladesetName);
    Blade blade = bladeset.blade(bladeName);
    Workbench workbench = blade.workbench();
   
    if(!app.dirExists()) throw new NodeDoesNotExistException(app, this);
    if(!bladeset.dirExists()) throw new NodeDoesNotExistException(bladeset, this);
    if(!blade.dirExists()) throw new NodeDoesNotExistException(blade, this);
    if(!workbench.dirExists()) throw new NodeDoesNotExistException(workbench, "workbench", this);
   
    try {
View Full Code Here

  @Override
  protected int doCommand(JSAPResult parsedArgs) throws CommandArgumentsException, CommandOperationException {
    String appName = parsedArgs.getString("app-name");
    App app = brjs.app(appName);
   
    if(!app.dirExists()) throw new NodeDoesNotExistException(app, this);
   
    File outputDir = app.storageDir(APP_STORAGE_DIR_NAME);
   
    try {
      if (outputDir.isDirectory()) {
View Full Code Here

   
    App app = brjs.app(appName);
    Aspect aspect = app.aspect(aspectName);
   
    if(isRequirePrefix && isAlias) throw new CommandArgumentsException("The --prefix and --alias switches can't both be used at the same time", this);
    if(!app.dirExists()) throw new NodeDoesNotExistException(app, this);
    if(!aspect.dirExists()) throw new NodeDoesNotExistException(aspect, this);
   
    try {
      if(isRequirePrefix) {
        logger.println(DependencyGraphReportBuilder.createReportForRequirePrefix(aspect, requirePathOrAlias, showAllDependencies));
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.