Package org.bladerunnerjs.model.exception.request

Examples of org.bladerunnerjs.model.exception.request.ResourceNotFoundException


 
  public Map<String,Map<String,String>> getTagsAndAttributesFromIndexPage(BrowsableNode browsableNode, Locale locale, String version, UrlContentAccessor contentAccessor, RequestMode requestMode) throws ContentProcessingException, ResourceNotFoundException {
    File indexPage = getIndexPage(browsableNode);
    try {
      if ( !Arrays.asList(app.appConf().getLocales()).contains(locale) ) {
        throw new ResourceNotFoundException("The locale '"+locale+"' is not a valid locale for this app.");
      }
     
      String pathRelativeToApp = RelativePathUtility.get(app.root().getFileInfoAccessor(), app.dir(), indexPage);
      ByteArrayOutputStream indexPageContent = new ByteArrayOutputStream();
      contentAccessor.writeLocalUrlContentsToOutputStream(pathRelativeToApp, indexPageContent);
View Full Code Here


 
  public ResponseContent getIndexPageContent(BrowsableNode browsableNode, Locale locale, String version, UrlContentAccessor contentAccessor, RequestMode requestMode) throws ContentProcessingException, ResourceNotFoundException {
    File indexPage = getIndexPage(browsableNode);
    try {
      if ( !Arrays.asList(app.appConf().getLocales()).contains(locale) ) {
        throw new ResourceNotFoundException("The locale '"+locale+"' is not a valid locale for this app.");
      }
     
      String pathRelativeToApp = RelativePathUtility.get(app.root().getFileInfoAccessor(), app.dir(), indexPage);
      ByteArrayOutputStream indexPageContent = new ByteArrayOutputStream();
      contentAccessor.writeLocalUrlContentsToOutputStream(pathRelativeToApp, indexPageContent);
View Full Code Here

    logger.debug(Messages.CONTEXT_IDENTIFIED_MSG, bundlableNode.getTypeName(), name, logicalRequestpath);
   
    ContentPlugin contentProvider = app.root().plugins().contentPluginForLogicalPath(logicalRequestpath);
   
    if(contentProvider == null) {
      throw new ResourceNotFoundException("No content provider could be found found the logical request path '" + logicalRequestpath + "'");
    }
   
    logger.debug(Messages.BUNDLER_IDENTIFIED_MSG, contentProvider.getPluginClass().getSimpleName(), logicalRequestpath);
   
    ParsedContentPath contentPath = contentProvider.getContentPathParser().parse(logicalRequestpath);
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.model.exception.request.ResourceNotFoundException

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.