Examples of Batch


Examples of fr.soleil.bossanova.model.Batch

  // --------------------------------------------------------------------------
  // BATCH CONSTRUCTION
  // --------------------------------------------------------------------------
  @Override
  public void cleanAll() {
    this.batch = new Batch();
    BossaNovaData.getSingleton().getApplication().setSelectedStep(0, null);
    setChangedAndNotify();
  }
View Full Code Here

Examples of fr.soleil.bossanova.model.Batch

    sequencer = sequencerToLink;
  }

  public static Batch saveBatchAs(File destination) throws IOException {     
    currentBatchFile = destination;
    Batch result = sequencer.getBatch();
    result.setAllConfiguredParameters();
    FileWriter writer = null;
    try {
      writer = new FileWriter(destination);
      xmlStreamer.toXML(result, writer);
          // Bug 17628
View Full Code Here

Examples of fr.soleil.bossanova.model.Batch

  public static void loadBatch(File file) throws IOException {
    currentBatchFile = file;
    FileReader reader = null;
    try {
      reader = new FileReader(file);
      Batch batch = (Batch) xmlStreamer.fromXML(reader);
      sequencer.setBatch(batch);
      // DBA Need to create director when loading a batch
      sequencer.checkBatchSteps();
//      sequencer.createBatchDirector();
      BossaNovaSequencerImpl.setCurrentBatchSaved(true);
View Full Code Here

Examples of fr.soleil.bossanova.model.Batch

  public static Batch readBatchFile(File file) throws IOException {
    FileReader reader = null;

    try {
      reader = new FileReader(file);
      Batch batch = (Batch) xmlStreamer.fromXML(reader);
      return batch;
    } catch (IOException e) {
            // Bug 18567
      LoggerFactory.getLogger("BatchManager").error(e.getMessage(), e);
      throw e;
View Full Code Here

Examples of fr.soleil.bossanova.model.Batch

  protected Color getDefaultBackgroundColor(int row, boolean isSelected) {
    Color result = super.getDefaultBackgroundColor(row, isSelected);
    if (sequencer.getCurrentRunningStepIndex() == row) {
      result = GUIConstants.RUNNING_COLOR;
    }
    Batch batch = sequencer.getBatch();
    if (batch != null){
      Step step = batch.getStep(row);
      if (step != null){
        if (!step.isEnable()){
          result = GUIConstants.DISABLE_COLOR;
        }
        if (step.isOnFault()){
View Full Code Here

Examples of fr.soleil.bossanova.model.Batch

      JTable table = BossaNovaData.getSingleton().getApplication().getMainScreen().getBatchViewerPanel().getTable();     
      String defaultPath = BossanovaUserPref.getPref(BossanovaUserPref.BATCH_DIRECTORY, System.getProperty("user.home"));
      JFileChooser fileChooser = new JFileChooser(defaultPath);
      fileChooser.showOpenDialog(BossaNovaData.getSingleton().getApplication().getMainScreen());
      File selectedFile = fileChooser.getSelectedFile();
      Batch batch = null;
      if (selectedFile != null) {
        batch = BatchManager.readBatchFile(selectedFile);
        int index = table.getSelectedRow();
       
        // if no step were selected we import the batch in the end of the current batch
        // if the current batch is empty we import the batch content in the current batch in the begin
        if(index < 0 || index == table.getRowCount())
        {
          index = table.getRowCount() - 1;
        }
       
        if (batch.getSteps()!=null && batch.getSteps().size()>0) {
          sequencer.insertStepsAt(batch.getSteps(),index+1);
            // We select the new step.
          if(batch.getSteps().size() > 0)
            BossaNovaData.getSingleton().getApplication().setSelectedStep(0,batch.getStep(0));
           
           
            table.getSelectionModel().setSelectionInterval(index+1, index+1);
           
            StateMachine.getInstance().transitionTo(StateMachine.MODEL_OPEN);           
View Full Code Here

Examples of fr.soleil.bossanova.model.Batch

    Color result;
    result = super.getDefaultBackgroundColor(row, isSelected);
    if (sequencer.getCurrentRunningStepIndex() == row) {
      result = GUIConstants.RUNNING_COLOR;
    }
    Batch batch = sequencer.getBatch();
    if (batch != null){
      Step step = batch.getStep(row);
      if (step != null){
        if (!step.isEnable()){
          result = GUIConstants.DISABLE_COLOR;
        }
        if (step.isOnFault()){
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch

    }

    @Test
    public void should_apply_interceptors_after_flush_for_batch() throws Exception {
        // Given
        final Batch batchingPM = pmf.createBatch();
        batchingPM.startBatch();

        CompleteBean entity = builder().randomId().name("DuyHai").label("label").buid();

        // When
        batchingPM.insert(entity);

        // Then
        assertThat(entity.getName()).isEqualTo("DuyHai");
        assertThat(entity.getLabel()).isEqualTo("label");

        // When
        batchingPM.endBatch();

        // Then
        assertThat(entity.getName()).isEqualTo("prePersist");
        assertThat(entity.getLabel()).isEqualTo("postPersist : label");
    }
View Full Code Here

Examples of org.apache.ambari.server.state.scheduler.Batch

  }

  private JobDetail persistBatch(RequestExecution requestExecution)
    throws  AmbariException {

    Batch batch = requestExecution.getBatch();
    JobDetail jobDetail = null;

    if (batch != null) {
      List<BatchRequest> batchRequests = batch.getBatchRequests();
      if (batchRequests != null) {
        Collections.sort(batchRequests);
        ListIterator<BatchRequest> iterator = batchRequests.listIterator(batchRequests.size());
        String nextJobName = null;
        while (iterator.hasPrevious()) {
View Full Code Here

Examples of org.apache.ambari.server.state.scheduler.Batch

    if (!isSchedulerAvailable()) {
      throw new AmbariException("Scheduler unavailable.");
    }

    // Delete all jobs for this request execution
    Batch batch = requestExecution.getBatch();
    if (batch != null) {
      List<BatchRequest> batchRequests = batch.getBatchRequests();
      if (batchRequests != null) {
        for (BatchRequest batchRequest : batchRequests) {
          String jobName = getJobName(requestExecution.getId(),
            batchRequest.getOrderId());
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.