Examples of Contexts


Examples of br.com.caelum.vraptor.ioc.cdi.Contexts

    return CDI.current().select(clazz).get();
  }
 
  @Override
  protected void runChild(FrameworkMethod method, RunNotifier notifier) {
    Contexts contexts = CDI.current().select(Contexts.class).get();
    contexts.startRequestScope();
    super.runChild(method, notifier);
    contexts.stopRequestScope();
  }
View Full Code Here

Examples of liquibase.Contexts

  @Override
  protected void performLiquibaseTask(Liquibase liquibase)
      throws LiquibaseException {
    switch (type) {
    case COUNT: {
      liquibase.rollback(rollbackCount, new Contexts(contexts), new LabelExpression(labels), outputWriter);
      break;
    }
    case DATE: {
      DateFormat format = DateFormat.getDateInstance();
      try {
        liquibase.rollback(format.parse(rollbackDate), new Contexts(contexts), new LabelExpression(labels),
            outputWriter);
      } catch (ParseException e) {
        String message = "Error parsing rollbackDate: "
            + e.getMessage();
        if (format instanceof SimpleDateFormat) {
          message += "\nDate must match pattern: "
              + ((SimpleDateFormat) format).toPattern();
        }
        throw new LiquibaseException(message, e);
      }
      break;
    }
    case TAG: {
      liquibase.rollback(rollbackTag, new Contexts(contexts), new LabelExpression(labels), outputWriter);
      break;
    }
    default: {
      throw new IllegalStateException("Unexpected rollback type, " + type);
    }
View Full Code Here

Examples of liquibase.Contexts

  }

  @Override
  protected void doUpdate(Liquibase liquibase) throws LiquibaseException {
    if (changesToApply > 0) {
      liquibase.update(changesToApply, new Contexts(contexts), new LabelExpression(labels));
    } else {
      liquibase.update(new Contexts(contexts), new LabelExpression(labels));
    }
  }
View Full Code Here

Examples of liquibase.Contexts

public class LiquibaseChangeLogSyncMojo extends AbstractLiquibaseChangeLogMojo {

  @Override
  protected void performLiquibaseTask(Liquibase liquibase)
      throws LiquibaseException {
    liquibase.changeLogSync(new Contexts(contexts), new LabelExpression(labels));
  }
View Full Code Here

Examples of liquibase.Contexts

      if (dropFirst) {
        liquibase.dropAll();
      }

    if (changesToApply > 0) {
      liquibase.update(changesToApply, new Contexts(contexts), new LabelExpression(labels));
    } else {
      liquibase.update(new Contexts(contexts), new LabelExpression(labels));
    }
  }
View Full Code Here

Examples of liquibase.Contexts

public class LiquibaseReportStatusMojo extends AbstractLiquibaseChangeLogMojo {

  @Override
  protected void performLiquibaseTask(Liquibase liquibase)
      throws LiquibaseException {
    liquibase.reportStatus(true, new Contexts(contexts), new LabelExpression(labels), new OutputStreamWriter(
        System.out));
  }
View Full Code Here

Examples of liquibase.Contexts

*/
public class LiquibaseUpdateTestingRollback extends AbstractLiquibaseUpdateMojo {

    @Override
    protected void doUpdate(Liquibase liquibase) throws LiquibaseException {
        liquibase.updateTestingRollback(new Contexts(contexts), new LabelExpression(labels));
    }
View Full Code Here

Examples of liquibase.Contexts

        }
    }

    @Override
    protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException {
        liquibase.futureRollbackSQL(null, new Contexts(contexts), new LabelExpression(labels), outputWriter);
    }
View Full Code Here

Examples of liquibase.Contexts

  private Writer outputWriter;

  @Override
  protected void performLiquibaseTask(Liquibase liquibase)
      throws LiquibaseException {
    liquibase.changeLogSync(new Contexts(contexts), new LabelExpression(labels), outputWriter);
  }
View Full Code Here

Examples of liquibase.Contexts

  }

  @Override
  protected void doUpdate(Liquibase liquibase) throws LiquibaseException {
    if (changesToApply > 0) {
      liquibase.update(changesToApply, new Contexts(contexts), new LabelExpression(labels), outputWriter);
    } else {
      liquibase.update(new Contexts(contexts), new LabelExpression(labels), outputWriter);
    }
  }
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.