Examples of Blade


Examples of org.bladerunnerjs.model.Blade

      resourceFile = bladeset.file(resourcePath);
    }
    else if (contentPath.formName.equals(BLADE_THEME_REQUEST))
    {
      Bladeset bladeset = bundlableNode.app().bladeset(contentPath.properties.get("bladeset"));
      Blade blade = bladeset.blade(contentPath.properties.get("blade"));
      ThemedAssetLocation location = getThemedResourceLocation(blade, theme);
      resourceFile = location.file(resourcePath);
    }
    else if (contentPath.formName.equals(BLADE_RESOURCE_REQUEST))
    {
      Bladeset bladeset = bundlableNode.app().bladeset(contentPath.properties.get("bladeset"));
      Blade blade = bladeset.blade(contentPath.properties.get("blade"));
      resourceFile = blade.file(resourcePath);
    }
    else if (contentPath.formName.equals(WORKBENCH_THEME_REQUEST))
    {
      //TODO: this needs implementing
      // Workbenches dont have themes ?
    }
    else if (contentPath.formName.equals(WORKBENCH_RESOURCE_REQUEST))
    {
      Bladeset bladeset = bundlableNode.app().bladeset(contentPath.properties.get("bladeset"));
      Blade blade = bladeset.blade(contentPath.properties.get("blade"));
      Workbench workbench = blade.workbench();
      resourceFile = workbench.file(resourcePath);
    }
    else if (contentPath.formName.equals(LIB_REQUEST))
    {
      JsLib jsLib = bundlableNode.app().jsLib(contentPath.properties.get("lib"));
View Full Code Here

Examples of org.bladerunnerjs.model.Blade

      resourcesRequestName = BLADESET_RESOURCE_REQUEST;
      requestArgs = new String[] { bladeset.getName() };
    }
    else if (assetContainer instanceof Blade)
    {
      Blade blade = (Blade) assetContainer;
      Bladeset bladeset = brjs.locateAncestorNodeOfClass(blade, Bladeset.class);
      themeRequestName = BLADE_THEME_REQUEST;
      resourcesRequestName = BLADE_RESOURCE_REQUEST;
      requestArgs = new String[] { bladeset.getName(), blade.getName() };
    }
    else if (assetContainer instanceof Workbench)
    {
      Workbench workbench = (Workbench) assetContainer;
      Blade blade = brjs.locateAncestorNodeOfClass(workbench, Blade.class);
      Bladeset bladeset = brjs.locateAncestorNodeOfClass(blade, Bladeset.class);
      themeRequestName = WORKBENCH_THEME_REQUEST;
      resourcesRequestName = WORKBENCH_RESOURCE_REQUEST;
      requestArgs = new String[] { bladeset.getName(), blade.getName() };
    }
    else if (assetContainer instanceof JsLib)
    {
      JsLib lib = (JsLib) assetContainer;
      themeRequestName = null;
View Full Code Here

Examples of org.bladerunnerjs.model.Blade

          String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), bladeset.dir(), imageFile);
          targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.BLADESET_RESOURCE_REQUEST, bladeset.getName(), resourcePath);
        }
      }
      else if(assetContainer instanceof Blade) {
        Blade blade = (Blade) assetContainer;
        Bladeset bladeset = blade.parent();
        if (assetLocation instanceof ThemedAssetLocation && assetLocationParentDir.getName().equals("themes")) {
            ThemedAssetLocation theme = (ThemedAssetLocation) assetLocation;
            String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), theme.dir(), imageFile);
           
            targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.BLADE_THEME_REQUEST, bladeset.getName(), blade.getName(), theme.dir().getName(), resourcePath);
        } else {
          String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), blade.dir(), imageFile);
          targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.BLADE_RESOURCE_REQUEST, bladeset.getName(), blade.getName(), resourcePath);
        }
      }
      else if(assetContainer instanceof Workbench) {
        Workbench workbench = (Workbench) assetContainer;
        Blade blade = workbench.parent();
        Bladeset bladeset = blade.parent();
       
        if (assetLocation instanceof ThemedAssetLocation && assetLocationParentDir.getName().equals("themes")) {
          String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), assetLocation.file("resources"), imageFile);
          targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.WORKBENCH_RESOURCE_REQUEST, bladeset.getName(), blade.getName(), resourcePath);
        } else {
          String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), workbench.dir(), imageFile);
          targetPath = cssResourceContentPathParser.createRequest(CssResourceContentPlugin.WORKBENCH_RESOURCE_REQUEST, bladeset.getName(), blade.getName(), resourcePath);
        }
      }
      else if(assetContainer instanceof JsLib) {
        JsLib jsLib = (JsLib) assetContainer;
        String resourcePath = RelativePathUtility.get(root.getFileInfoAccessor(), jsLib.dir(), imageFile);
View Full Code Here

Examples of org.bladerunnerjs.model.Blade

   
    // generate the app structure
    App app = brjs.app("app");
    Aspect aspect = app.defaultAspect();
    Bladeset bs = app.bladeset("bs");
    Blade b1 = bs.blade("b1");
    Workbench workbench = b1.workbench();
   
    given(app).hasBeenPopulated()
      .and(aspect).hasClass("appns/Class1")
      .and(aspect).indexPageRefersTo("appns.Class1")
      .and(b1).hasClass("appns/bs/b1/Class")
View Full Code Here

Examples of org.bladerunnerjs.model.Blade

    String bladesetName = parsedArgs.getString(Parameters.BLADESET_NAME);
    String bladeName = parsedArgs.getString(Parameters.BLADE_NAME);
   
    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();
    }
    catch(InvalidNameException e) {
      throw new CommandArgumentsException(e, this);
    }
    catch(ModelUpdateException e) {
      throw new CommandOperationException("Cannot create blade '" + blade.dir().getPath() + "'", e);
    }
   
    logger.println(Messages.BLADE_CREATE_SUCCESS_CONSOLE_MSG, bladeName);
    logger.println(Messages.BLADE_PATH_CONSOLE_MSG, blade.dir().getPath());
   
    return 0;
  }
View Full Code Here

Examples of org.bladerunnerjs.model.Blade

    String bladeName = parsedArgs.getString("blade-name");
    boolean showAllDependencies = parsedArgs.getBoolean("all");
   
    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 {
      logger.println(DependencyGraphReportBuilder.createReport(workbench, 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.