Package org.bladerunnerjs.model

Examples of org.bladerunnerjs.model.SourceModule


 
  public static String createReport(BrowsableNode browsableNode, String requirePath, boolean showAllDependencies) throws ModelOperationException {
    try {
      fixIncompleteAliases(browsableNode);
     
      SourceModule sourceModule =  (SourceModule)browsableNode.getLinkedAsset(requirePath);
      List<LinkedAsset> linkedAssets = new ArrayList<>();
      linkedAssets.add(sourceModule);
     
      return "Source module '" + sourceModule.getPrimaryRequirePath() + "' dependencies found:\n" +
      new DependencyGraphReportBuilder(linkedAssets, DependencyInfoFactory.buildReverseDependencyMap(browsableNode, sourceModule), showAllDependencies).createReport();
    }
    catch(RequirePathException e) {
      return e.getMessage();
    }
View Full Code Here


      List<LinkedAsset> linkedAssets = new ArrayList<>();
     
      fixIncompleteAliases(browsableNode);
     
      AliasDefinition alias = browsableNode.getAlias(aliasName);
      SourceModule sourceModule =  (SourceModule)browsableNode.getLinkedAsset(alias.getRequirePath());
      linkedAssets.add(sourceModule);
     
      return "Alias '" + aliasName + "' dependencies found:\n" +
      new DependencyGraphReportBuilder(linkedAssets, DependencyInfoFactory.buildReverseDependencyMap(browsableNode, sourceModule), showAllDependencies).createReport();
    }
View Full Code Here

        }
        return new CharResponseContent( brjs, readerList );
      }
      else if(contentPath.formName.equals("single-module-request")) {
        boolean hasUnencapsulatedSourceModule = hasUnencapsulatedSourceModule(sourceModules);
        SourceModule jsModule = (SourceModule)bundleSet.getBundlableNode().getLinkedAsset(contentPath.properties.get("module"));
        return new CharResponseContent(brjs,
          new StringReader("// " + jsModule.getPrimaryRequirePath() + "\n"),
          jsModule.getReader(),
          new StringReader("\n\n"),
          new StringReader(getGlobalisedThirdpartyModuleContent(jsModule, hasUnencapsulatedSourceModule))
        );
      }
      else {
View Full Code Here

      for(String aliasName : aliasNames) {
        AliasDefinition alias = bundlableNode.getAlias(aliasName);
       
        // TODO: get rid of this guard once we remove the 'SERVICE!' hack
        if (alias != null) {
          SourceModule sourceModule =  (SourceModule)bundlableNode.getLinkedAsset(alias.getRequirePath());
          addSourceModule(sourceModule);
         
          if(alias.getInterfaceName() != null) {
            SourceModule aliasInterface = (SourceModule) bundlableNode.getLinkedAsset(alias.getInterfaceRequirePath());
           
            if(sourceModule != aliasInterface) {
              addSourceModule(aliasInterface);
            }
          }
View Full Code Here

  {
    try
    {
      if (contentPath.formName.equals(SINGLE_MODULE_REQUEST))
      {
        SourceModule jsModule = (SourceModule)bundleSet.getBundlableNode().getLinkedAsset(contentPath.properties.get("module"));
        return new CharResponseContent(brjs, jsModule.getReader());
       
      }
      else if (contentPath.formName.equals(BUNDLE_REQUEST))
      {
        List<Reader> readerList = new ArrayList<Reader>();
View Full Code Here

  {
    try
    {
      if (contentPath.formName.equals(SINGLE_MODULE_REQUEST))
      {
        SourceModule jsModule =  (SourceModule)bundleSet.getBundlableNode().getLinkedAsset(contentPath.properties.get("module"));
        return new CharResponseContent(brjs, jsModule.getReader());
      }

      else if (contentPath.formName.equals(BUNDLE_REQUEST))
      {
        List<Reader> readerList = new ArrayList<Reader>();
View Full Code Here

   
    return verifierChainer;
  }
 
  public VerifierChainer sourceModuleHasAssetLocation(String sourceModulePath, String assetLocationPath) throws Exception {
    SourceModule sourceModule = (SourceModule)aspect.getLinkedAsset(sourceModulePath);
    AssetLocation assetLocation = aspect.assetLocation(assetLocationPath);
   
    assertEquals("Source module '" + sourceModulePath + "' did not have the asset location '" + assetLocationPath + "'.", assetLocation.dir().getPath(), sourceModule.assetLocation().dir().getPath());
   
    return verifierChainer;
  }
View Full Code Here

   
    return verifierChainer;
  }
 
  public VerifierChainer classHasPreExportDependencies(String requirePath, String... expectedRequirePaths) throws Exception {
    SourceModule sourceModule = (SourceModule) aspect.linkedAsset(requirePath);
    List<String> actualRequirePaths = requirePaths(sourceModule.getPreExportDefineTimeDependentAssets(aspect));
   
    assertEquals(Joiner.on(", ").join(expectedRequirePaths), Joiner.on(", ").join(actualRequirePaths));
   
    return verifierChainer;
  }
View Full Code Here

   
    return verifierChainer;
  }
 
  public VerifierChainer classHasPostExportDependencies(String requirePath, String... expectedRequirePaths) throws Exception {
    SourceModule sourceModule = (SourceModule) aspect.linkedAsset(requirePath);
    List<String> actualRequirePaths = requirePaths(sourceModule.getPostExportDefineTimeDependentAssets(aspect));
   
    assertEquals(Joiner.on(", ").join(expectedRequirePaths), Joiner.on(", ").join(actualRequirePaths));
   
    return verifierChainer;
  }
View Full Code Here

   
    return verifierChainer;
  }
 
  public VerifierChainer classHasUseTimeDependencies(String requirePath, String... expectedRequirePaths) throws Exception {
    SourceModule sourceModule = (SourceModule) aspect.linkedAsset(requirePath);
    List<String> actualRequirePaths = requirePaths(sourceModule.getUseTimeDependentAssets(aspect));
   
    assertEquals(Joiner.on(", ").join(expectedRequirePaths), Joiner.on(", ").join(actualRequirePaths));
   
    return verifierChainer;
  }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.model.SourceModule

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.