Package org.bladerunnerjs.model.exception.command

Examples of org.bladerunnerjs.model.exception.command.NodeAlreadyExistsException


    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();
    }
    catch(InvalidNameException e) {
View Full Code Here


   
    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 ) {
      case br:
        break;
      case thirdparty:
View Full Code Here

  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

   
    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

    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);
     
      logger.println("Successfully copied " + sourceAppName + "/" + sourceBladesetName + " to " + targetAppName + "/" + targetBladesetName);
View Full Code Here

   
    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();
    }
    catch(InvalidNameException e) {
View Full Code Here

   
    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();
    }
    catch(InvalidNameException e) {
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.model.exception.command.NodeAlreadyExistsException

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.