Package org.sonatype.nexus.componentviews.config

Examples of org.sonatype.nexus.componentviews.config.ViewFactory


    final ViewRegistry viewRegistry = mock(ViewRegistry.class);

    // 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);
View Full Code Here


  private void createViews()
      throws IOException
  {
    log.debug("Creating component views.");
    for (ViewConfig config : viewConfigStore.getAll().values()) {
      final ViewFactory factory = viewFactorySource.getFactory(config.getFactoryName());
      if (factory != null) {
        log.debug("Creating view {}", config.getViewId());
        viewRegistry.registerView(factory.createView(config));
      }
      else {
        log.error("No view factory found for view config {}", config);
        throw new IllegalStateException("No view factory found for view config " + config);
      }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.componentviews.config.ViewFactory

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.