Package org.jostraca.util

Examples of org.jostraca.util.PropertySet.load()


  }


  protected boolean confirmPropertySet( String pTestRoot, PropertySet pReferencePS ) {
    PropertySet testps = new PropertySet();
    testps.load( new File( getTestFolder(), PREFIX_RESULT + pTestRoot + DOT + TXT ) );
    boolean test = testps.equals( pReferencePS );

    if( !test ) {
      displayPropertySets( testps, pReferencePS );
    }
View Full Code Here


    systemPS.overrideWith( addps );

    PropertySet local           = new PropertySet();
    File        localConfigFile = new File( pConfigFolder, systemPS.get( Property.jostraca_LocalConfigFileName ) );
    if( localConfigFile.exists() && !localConfigFile.isDirectory() ) {
      local.load( localConfigFile  );
      systemPS.overrideWith( local );
    }
    else {
      // if local.conf does not exist, ignore
    }
View Full Code Here

    PropertySet result = new PropertySet();
    int numAddConf = pAdditionalConfigFiles.size();
    for(int addConfI = 0; addConfI < numAddConf; addConfI++) {
      String      path    = (String) pAdditionalConfigFiles.get( addConfI );
      PropertySet addConf = new PropertySet();
      addConf.load( new File(path) );
      result.overrideWith( addConf );
    }
    return result;
  }
View Full Code Here

      configFolder = new File( "" );
    }
    PropertySet local           = new PropertySet();
    File        localConfigFile = new File( configFolder, system.get( Property.jostraca_LocalConfigFileName ) );
    if( localConfigFile.exists() && !localConfigFile.isDirectory() ) {
      local.load( localConfigFile  );
    }

    system.overrideWith( local );

    // only set jostraca.Location if using configuration from disk
View Full Code Here


  public void testProcessText() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( new File( "../../../../conf/system.conf" ) );
    BasicTextElementProcessor btep = create( ps, tahs );
    String content   = "content";
    Block  textBlock = new Block( Block.TYPE_text, content );

    assertTrue( btep.isMatch( textBlock ) );
View Full Code Here


  public void testPerform() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( Tools.findRelativeSystemPath( "conf/system.conf" ) );
    TextualTransformManagerTable   ttmt = new TextualTransformManagerTable( ps );

    BasicUnitList bul = new BasicUnitList();

    SectionDirective sd = new SectionDirective();
View Full Code Here



  public void testCreate() throws Exception {
    PropertySet                 ps   = new PropertySet();
    ps.load( new File( "../../../../conf/system.conf" ) );
    TemplateActionHandler          tah  = new TemplateActionHandlerStub();
    BasicDirectiveElementProcessor bdep = create( ps, tah );
  }

View Full Code Here


  public void testProcessDirective() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( new File( "../../../../conf/system.conf" ) );
    BasicDirectiveElementProcessor bdep = create( ps, tahs );

    tahs.clear();
    String s01 = "foo = bar;";
    Block  b01 = new Block( Block.TYPE_script, s01 );
View Full Code Here


  public void testPerform() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( Tools.findRelativeSystemPath( "conf/system.conf" ) );
    TextualTransformManagerTable   ttmt = new TextualTransformManagerTable( ps );

    BasicUnitList bul = new BasicUnitList();

    ReplaceDirective rd = new ReplaceDirective();
View Full Code Here


  public void testProcessExpression() throws Exception {
    TemplateActionHandlerStub tahs  = new TemplateActionHandlerStub();
    PropertySet               ps    = new PropertySet();
    ps.load( new File( "../../../../conf/system.conf" ) );
   
    // REVIEW: this will have to change
    ps.set( Property.jostraca_old, "yes" );

    BasicExpressionElementProcessor beep = create( ps, tahs );
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.