Package com.foreach.across.core

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


    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

    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

    }
    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

  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

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

      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

      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

            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

      }

      return installerOrClass;
    }
    catch ( InvocationTargetException | NoSuchMethodException | InstantiationException | IllegalAccessException ie ) {
      throw new AcrossException( "Could not create installer instance: " + installerOrClass, ie );
    }
  }
View Full Code Here

TOP

Related Classes of com.foreach.across.core.AcrossException

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.