Package org.sonatype.nexus.componentviews

Examples of org.sonatype.nexus.componentviews.View


    // A changed (and persisted) configuration created by an admin
    final ViewConfig config = mock(ViewConfig.class);

    final ViewFactory factory = factorySource.getFactory(config.getFactoryName());
    final View newView = factory.createView(config);

    // De-register the existing view
    final View existingView = viewRegistry.findViewByName(config.getViewName());
    if (existingView != null) {
      viewRegistry.unregisterView(existingView);
    }
    // Register its replacement
    viewRegistry.registerView(newView);
View Full Code Here


  protected void service(final HttpServletRequest req, final HttpServletResponse resp)
      throws ServletException, IOException
  {
    final ViewNameParser viewNameParser = new ViewNameParser(req.getPathInfo());

    final View view = viewRegistry.getView(viewNameParser.getViewName());
    if (view == null) {
      throw new ErrorStatusException(HttpServletResponse.SC_NOT_FOUND, "Not Found", "View not found.");
    }

    final ViewRequest request = new HttpViewRequest(req, view.getConfig(), viewNameParser.getRemainingPath(),
        req.getQueryString());

    try {
      view.dispatch(request).send(resp);
    }
    catch (Exception e) {
      Throwables.propagate(e);
    }
  }
View Full Code Here

        sourceRegistry);
    final HostedRawBinariesHandler hosted = new HostedRawBinariesHandler(binaryStore);

    router.addRoute(binariesRequestMatcher, asList(proxyingWrapper, hosted));

    return new View(config, router, notFoundHandler);
  }
View Full Code Here

    final AllRequestMatcher binariesRequestMatcher = new AllRequestMatcher();

    final Router router = new Router();
    router.addRoute(binariesRequestMatcher, asList((Handler) new HostedRawBinariesHandler(binaryStore)));

    return new View(config, router, notFoundHandler);
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.componentviews.View

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.