Examples of AcrossException


Examples of com.foreach.across.core.AcrossException

  public void addPackage( String... packageNames ) {
    for ( String packageName : packageNames ) {
      WebResourcePackage webResourcePackage = packageManager.getPackage( packageName );

      if ( webResourcePackage == null ) {
        throw new AcrossException( "No WebResourcePackage found with name " + packageName );
      }

      webResourcePackage.install( this );
    }
  }
View Full Code Here

Examples of com.foreach.across.core.AcrossException

    return addItem( item );
  }

  public Menu addItem( Menu item ) {
    if ( item.hasParent() ) {
      throw new AcrossException( "A Menu can only belong to a single parent menu." );
    }

    items.add( item );
    item.setParent( this );
View Full Code Here

Examples of com.foreach.across.core.AcrossException

    catch ( Exception e ) {
      LOG.debug( "Exception during bootstrapping, destroying all created ApplicationContext instances" );

      destroyAllCreatedApplicationContexts();

      throw new AcrossException( "Across bootstrap failed", e );
    }
  }
View Full Code Here

Examples of com.foreach.across.core.AcrossException

    }
    catch ( ClassNotFoundException e ) {
      LOG.trace( "No specific settings implementation defined for {}", moduleClass );
    }
    catch ( InstantiationException | IllegalAccessException iae ) {
      throw new AcrossException(
          "Illegal configuration, " + settingsClassName + " should have a public parameter-less constructor",
          iae );
    }

    // Create generic setting
View Full Code Here

Examples of com.foreach.across.core.AcrossException

  private void checkUniqueModuleNames( Collection<AcrossModule> modules ) {
    Set<String> moduleNames = new HashSet<>();

    for ( AcrossModule module : modules ) {
      if ( moduleNames.contains( module.getName() ) ) {
        throw new AcrossException(
            "Each module must have a unique name, duplicate found for " + module.getName() );
      }

      moduleNames.add( module.getName() );
    }
View Full Code Here

Examples of com.foreach.across.core.AcrossException

      else {
        dynamicConfigurationDenied( servletContext );
      }
    }
    catch ( ServletException se ) {
      throw new AcrossException( se );
    }
  }
View Full Code Here

Examples of com.foreach.across.core.AcrossException

      if ( processor != null ) {
        request.setAttribute( PROCESSOR_ATTRIBUTE, processor );
        processor.prepareForTemplate( request, response, handler );
      }
      else {
        throw new AcrossException( "No WebTemplateProcessor registered with name: " + templateName );
      }
    }

    return true;
  }
View Full Code Here

Examples of com.foreach.across.core.AcrossException

      Class<?> installerClass = determineInstallerClass( installer );
      Installer metadata = installerClass.getAnnotation( Installer.class );

      if ( metadata == null ) {
        throw new AcrossException( "Installer " + installer.getClass() + " should have @Installer annotation" );
      }

      if ( metadata.phase() == phase ) {
        if ( areDependenciesMet( installerClass ) ) {
          LOG.trace( "Dependencies for installer {} are met.", installerClass );
View Full Code Here

Examples of com.foreach.across.core.AcrossException

            method.invoke( installer );

            executed = true;
          }
          catch ( Exception e ) {
            throw new AcrossException( e );
          }
        }
      }

      if ( !executed ) {
        throw new AcrossException(
            "At least one @InstallerMethod method was expected for " + installer.getClass() );
      }

      LOG.trace( "Finished execution of installer {} for module {}", installer.getClass(), module.getName() );
    }
View Full Code Here

Examples of com.foreach.across.core.AcrossException

      }

      return installerOrClass;
    }
    catch ( InvocationTargetException | NoSuchMethodException | InstantiationException | IllegalAccessException ie ) {
      throw new AcrossException( "Could not create installer instance: " + installerOrClass, ie );
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.