Package org.jostraca

Examples of org.jostraca.BasicTemplate


  }



  public void testPerform() throws Exception {
    Template tm = new BasicTemplate();
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( Tools.findRelativeSystemPath( "conf/system.conf" ) );
    TextualTransformManagerTable   ttmt = new TextualTransformManagerTable( ps );
View Full Code Here


  // test methods

  public void testGet() throws Exception {
    TemplateHandlerManager thm  = new TemplateHandlerManager( "Parser" );
    BasicTemplate          tm01 = new BasicTemplate();
    tm01.getPropertySet(Service.CONF_template)
      .set( TemplateHandlerManager.PROPERTY_PREFIX+"Parser", "org.jostraca.process.test.TestParser" );
   
    TemplateHandler th = thm.getTemplateHandler( tm01 );
    assertTrue( th instanceof TestParser );
    TestParser tp = (TestParser) th;
View Full Code Here

    assertTrue( content.equals( tahs.getLastAppendedContent() ) );
  }


  private BasicTemplateElementProcessor create( TemplateActionHandler pTemplateActionHandler ) throws Exception {
    Template    tm = new BasicTemplate();
    PropertySet ps   = new PropertySet();
    ps.set( "o", "<%" );
    BasicTemplateElementProcessor btep = new BasicTemplateElementProcessor( pTemplateActionHandler, ps, tm );
    return btep;
  }
View Full Code Here


  private BasicDirectiveElementProcessor create( PropertySet           pPropertySet,
                                                 TemplateActionHandler pTemplateActionHandler ) throws Exception {

    Template tm = new BasicTemplate();
    BasicUnitList bul = new BasicUnitList();
    TextualTransformManagerTable   ttmt = new TextualTransformManagerTable( pPropertySet );
    BasicDirectiveElementProcessor bdep = new BasicDirectiveElementProcessor( bul, pTemplateActionHandler,
                                                                              pPropertySet, ttmt, tm );
    return bdep;
View Full Code Here

  public void testLoad() throws Exception {
    String base = FileUtil.findFile("org/jostraca/test").getAbsolutePath();

    PropertySet systemps = getSystemPropertySet();
    BasicTemplate tm = new BasicTemplate();
    tm.setPropertySet( Constants.CONF_system, systemps );

    String            tmfp = base+"/basic.jtm";
    BasicTemplatePath tmp01  = new BasicTemplatePath( tmfp );
    tmp01.resolve( new String[]{} );

    tm.load( tmp01 );

    //System.out.println( Constants.CONF_system+":\n"+tm.getPropertySet( Constants.CONF_system ) );
    //System.out.println( Constants.CONF_template+" after:\n"+tm.getPropertySet( Constants.CONF_template ) );
   
    assertEquals( 7, tm.getPropertySet( Constants.CONF_template ).size() );
  }
View Full Code Here

  }



  public void testPerform() throws Exception {
    Template tm = new BasicTemplate();
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( Tools.findRelativeSystemPath( "conf/system.conf" ) );
    TextualTransformManagerTable   ttmt = new TextualTransformManagerTable( ps );
View Full Code Here

  public static Template makeTemplate( String pName ) throws Exception {
    String base = FileUtil.findFile("org/jostraca/process/test").getAbsolutePath();

    PropertySet systemps = getSystemPropertySet();
    BasicTemplate tm = new BasicTemplate();
    tm.setPropertySet( Constants.CONF_system, systemps );

    String            tmfp = base+"/tm/"+pName+".jtm";
    BasicTemplatePath tmp01  = new BasicTemplatePath( tmfp );
    tmp01.resolve( new String[]{} );

    tm.load( tmp01 );

    return tm;
  }
View Full Code Here

  // test methods

  public void testGet() throws Exception {

    BasicTemplate tm01 = new BasicTemplate( "tm01" );
    tm01.getPropertySet( Service.CONF_template )
      .set( TemplateHandlerManager.PROPERTY_PREFIX+"Test", "org.jostraca.process.test.TestParser" );

    BasicTemplate tm02 = new BasicTemplate( "tm02" );
    tm02.getPropertySet( Service.CONF_template )
      .set( TemplateHandlerManager.PROPERTY_PREFIX+"Test", "org.jostraca.process.test.TestParser" );

    ArrayList tmlist = ListUtil.make( tm01, tm02 );
    TestProcessStage tps = new TestProcessStage();
    tps.setUserMessageHandler( new CommandLineUserMessageHandler() );
View Full Code Here

TOP

Related Classes of org.jostraca.BasicTemplate

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.