Package org.bladerunnerjs.model.exception

Examples of org.bladerunnerjs.model.exception.ModelOperationException


    try {
      return bundlableNode.getLinkedAssets( assetLocation, new ArrayList<>(requirePaths) );
    }
    catch (AmbiguousRequirePathException | UnresolvableRequirePathException e) {
            e.setSourceRequirePath(getPrimaryRequirePath());
            throw new ModelOperationException(e);
        }
        catch (RequirePathException e) {
            throw new ModelOperationException(e);
        }
  }
View Full Code Here


{

  public static void build(App app, File targetDir) throws ModelOperationException {
   
    File targetContainer = targetDir.getParentFile();
    if(!targetContainer.isDirectory()) throw new ModelOperationException("'" + targetContainer.getPath() + "' is not a directory.");
   
    try {
      String version = app.root().getAppVersionGenerator().getProdVersion();
      Map<String,List<String>> contentPluginProdRequestsMap = new HashMap<>();
      BRJS brjs = app.root();
      AppRequestHandler appRequestHandler = new AppRequestHandler(app);
      UrlContentAccessor urlContentAccessor = new StaticContentAccessor(app);
      Locale[] locales = app.appConf().getLocales();
     
      filterAppWebXml(app, targetDir, version);
     
      for (Aspect aspect : app.aspects()) {
        BundleSet bundleSet = aspect.getBundleSet();
        String aspectRequestPrefix = (aspect.getName().equals("default")) ? "" : aspect.getName() + "/";       
               
        writeLocaleForwardingFileForAspect(bundleSet, targetDir, appRequestHandler, aspectRequestPrefix, urlContentAccessor, version);
       
        for (Locale locale : locales) {
          outputAspectIndexPage(aspect, locale, bundleSet, targetDir, appRequestHandler, aspectRequestPrefix, urlContentAccessor, version);
          calculateUsedContentPlugins(aspect, locale, bundleSet, appRequestHandler, urlContentAccessor, version, contentPluginProdRequestsMap);
        }
       
        for (ContentPlugin contentPlugin : brjs.plugins().contentPlugins()) {
          outputContentPluginBundles(contentPlugin, bundleSet, locales, targetDir, version, appRequestHandler, aspectRequestPrefix, urlContentAccessor, contentPluginProdRequestsMap);
        }
      }
    }
    catch(Exception e) {
      throw new ModelOperationException(e);
    }
  }
View Full Code Here

    {
      return FileUtility.createTemporaryDirectory(AppBuilderUtilis.class, app.getName());
    }
    catch (IOException ex)
    {
      throw new ModelOperationException(ex);
    }
  }
View Full Code Here

import org.bladerunnerjs.utility.FileUtility;

public class StaticAppBuilder implements AppBuilder {
 
  public void build(App app, File appBuildDir) throws ModelOperationException {
    if (!appBuildDir.exists()) throw new ModelOperationException("'" + appBuildDir.getPath() + "' does not exist");
   
    File exportDir = AppBuilderUtilis.getTemporaryExportDir(app);
    AppBuilderUtilis.build(app, exportDir);
   
    try
    {
      FileUtility.moveDirectoryContents(exportDir, appBuildDir);
      FileUtils.deleteQuietly(exportDir);
    }
    catch (IOException ex)
    {
      throw new ModelOperationException(ex);
    }
  }
View Full Code Here

public class WarAppBuilder implements AppBuilder
{

  public void build(App app, File appWarFile) throws ModelOperationException {
    if (!appWarFile.getParentFile().exists()) throw new ModelOperationException("'" + appWarFile.getParentFile().getPath() + "' does not exist");
    if (appWarFile.exists()) throw new ModelOperationException("'" + appWarFile.getParentFile().getPath() + "' already exists");
   
    File exportDir = AppBuilderUtilis.getTemporaryExportDir(app);
    AppBuilderUtilis.build(app, exportDir);
   
    try
    {
      FileUtility.zipFolder(exportDir, appWarFile, true);
      FileUtils.deleteQuietly(exportDir);
    }
    catch (IOException ex)
    {
      throw new ModelOperationException(ex);
    }
  }
View Full Code Here

            }
          }
        }
        catch (IOException ex)
        {
          throw new ModelOperationException(ex);
        }
       
        return computedValue;
      }
    });
View Full Code Here

    try {
       return bundlableNode.getLinkedAssets(assetLocation, getDependencyCalculator().getRequirePaths());
    }
    catch (AmbiguousRequirePathException e) {     
      e.setSourceRequirePath(getAssetPath());
      throw new ModelOperationException(e);
    }
    catch (RequirePathException e) {
      throw new ModelOperationException(e);
    }
  }
View Full Code Here

  public void filterIndexPage(String indexPage, Locale locale, String version, Writer writer, RequestMode requestMode) throws ModelOperationException {
    try {
      TagPluginUtility.filterContent(indexPage, getBundleSet(), writer, requestMode, locale, version);
    }
    catch (IOException | NoTagHandlerFoundException e) {
      throw new ModelOperationException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.model.exception.ModelOperationException

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.