Examples of dirExists()


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

           String exceptionMsg = String.format(Messages.INVALID_LIB_TYPE_MESSAGE, libraryType, StringUtils.join(SupportedLibraryType.values(), ", ") );
           throw new CommandArgumentsException(exceptionMsg, this);
        }
   
    App app = brjs.app(appName);
    if(!app.dirExists()) throw new NodeDoesNotExistException(app, this);
   
    JsLib library = app.appJsLib(libraryName);
    if (library.dirExists()) throw new NodeAlreadyExistsException(library, this);
   
    switch ( createLibraryType ) {
View Full Code Here

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

  protected int doCommand(JSAPResult parsedArgs) throws CommandArgumentsException, CommandOperationException {
    String appName = parsedArgs.getString("new-app-name");
    String requirePrefix = parsedArgs.getString("require-prefix");
    App app = brjs.app(appName);
   
    if(app.dirExists()) throw new NodeAlreadyExistsException(app, this);
   
    try {
      NameValidator.assertValidDirectoryName(app);
      requirePrefix = (requirePrefix == null) ? NameValidator.generateRequirePrefixFromApp(app) : requirePrefix;
     
View Full Code Here

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

   
    File appZip = (new File(appZipName).exists()) ? new File(appZipName) : new File(brjs.file("sdk"), appZipName);
    App app = brjs.app(newAppName);
   
    if(!appZip.exists()) throw new CommandArgumentsException("Couldn't find zip file at '" + appZipName + "'.", this);
    if(app.dirExists()) throw new NodeAlreadyExistsException(app, this);
   
    try
    {
      NameValidator.assertValidDirectoryName(app);
      NameValidator.assertValidRootPackageName(app, newAppNamespace);
View Full Code Here

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

   
    Bladeset targetBladeset = targetApp.bladeset(targetBladesetName);
   
    if (!sourceApp.dirExists()) throw new NodeDoesNotExistException(sourceApp, this);
    if (!sourceBladeset.dirExists()) throw new NodeDoesNotExistException(sourceBladeset, this);
    if (!targetApp.dirExists()) throw new NodeDoesNotExistException(targetApp, this);
    if (targetBladeset.dirExists()) throw new NodeAlreadyExistsException(targetBladeset, this);
   
    try {
      NodeImporter.importBladeset(sourceBladeset.dir(), sourceApp.appConf().getRequirePrefix(), sourceApp.appConf().getRequirePrefix() + "/" + sourceBladesetName, targetBladeset);
     
View Full Code Here

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

  {
    StringBuilder response = new StringBuilder();
    response.append("{");
   
    App app = brjs.userApp(appName);
    if (!app.dirExists())
    {
      throw new Exception("App " + app.getName() + " does not exist");
    }
   
    List<Bladeset> bladesets = app.bladesets();
View Full Code Here

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

    {
      destinationWar.delete();
    }
   
    App app = brjs.userApp(appName);
    if (!app.dirExists()) {
      throw new Exception("Unable to export, the app '" + appName + "' doesn't exist.");
    }
   
    app.buildWar(destinationWar);
  }
View Full Code Here

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

  @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 CommandArgumentsException( String.format(Messages.APP_DOES_NOT_EXIST_EXCEPTION, appName), this );
   
    Map<String, String> transformations = new HashMap<>();
    transformations.put("app-name", app.getName());
    try
    {
View Full Code Here

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

    boolean showAllDependencies = parsedArgs.getBoolean("all");
   
    App app = brjs.app(appName);
    Aspect aspect = app.aspect(aspectName);
   
    if(!app.dirExists()) throw new NodeDoesNotExistException(app, this);
    if(!aspect.dirExists()) throw new NodeDoesNotExistException(aspect, this);
   
    try {
      logger.println(DependencyGraphReportBuilder.createReport(aspect, showAllDependencies)+"\n");
    }
View Full Code Here

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

 
  @Test
  public void templateCanBeInstalledWithoutTransformations() throws Exception
  {
    App app = brjs.app("app");
    assertFalse("app dir does not exist", app.dirExists());
   
    TemplateUtility.installTemplate(brjs.app("app"), "app", new HashMap<String, String>());
   
    assertTrue("app dir exists", app.dirExists());
   
View Full Code Here

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

    App app = brjs.app("app");
    assertFalse("app dir does not exist", app.dirExists());
   
    TemplateUtility.installTemplate(brjs.app("app"), "app", new HashMap<String, String>());
   
    assertTrue("app dir exists", app.dirExists());
   
    assertTrue("root dir exists", app.file("root-@dir").exists());
    assertTrue("root dir is a directory", app.file("root-@dir").isDirectory());
    assertTrue("root text file exists", app.file("root-@dir/root-text-file.txt").exists());
    assertEquals("root text file has correct contents", "this is the root text file (in root @dir)", fileUtil.readFileToString(app.file("root-@dir/root-text-file.txt")));
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.