Package org.jitterbit.integration.client.ui.structure.editor.xml

Examples of org.jitterbit.integration.client.ui.structure.editor.xml.StructureFileDownloader$Job


    private XmlStructureWizardStartPage(Wizard wizard, XmlStructure toEdit, XsdFileStore fileStore, String subTitle) {
        super(EditorIdGenerator.get(XmlStructureWizardStartPage.class), wizard, subTitle);
        model = StructureFileSelectionModel.forXml();
        model.addPropertyChangeListener(new ModelListener());
        XmlInfoProvider serverApi = IntegrationServer.getInstance().getServerCall(XmlInfoProvider.class);
        StructureFileDownloader downloader = new StructureFileDownloader(model, serverApi);
        ui = createUi(downloader);
        structureFileManager = new StructureFileManager(model, downloader, fileStore);
        rootElementManager = new RootElementManager(this);
        updateCanContinue();
    }
View Full Code Here


    private final StructureFileSelectionUi ui;

    public JsonStructureFileSelectionPage(Wizard wizard, XmlInfoProvider serverApi, XsdFileStore fileStore) {
        super(EditorIdGenerator.get(JsonStructureFileSelectionPage.class), wizard, "Select an Existing JSON Structure");
        model = StructureFileSelectionModel.forJson();
        StructureFileDownloader downloader = new StructureFileDownloader(model, serverApi);
        ui = createUi(downloader);
        model.addPropertyChangeListener(new ModelListener());
        structureFileManager = new StructureFileManager(model, downloader, fileStore);
        updateCanContinue();
    }
View Full Code Here

          throw new IllegalAccessException();
        }
      }
    }

    Job job = null;

    IJobTrigger jobTrigger = SchedulerResourceUtil.convertScheduleRequestToJobTrigger( scheduleRequest, scheduler );

    HashMap<String, Serializable> parameterMap = new HashMap<String, Serializable>();
    for ( JobScheduleParam param : scheduleRequest.getJobParameters() ) {
View Full Code Here

    return job;
  }

  public Job triggerNow( String jobId ) throws SchedulerException {
    Job job = getScheduler().getJob( jobId );
    if ( getPolicy().isAllowed( SchedulerAction.NAME ) ) {
      getScheduler().triggerNow( jobId );
    } else {
      if ( getSession().getName().equals( job.getUserName() ) ) {
        getScheduler().triggerNow( jobId );
      }
    }
    // udpate job state
    job = getScheduler().getJob( jobId );
View Full Code Here

    }
    return getScheduler().getStatus().name();
  }

  public JobState pauseJob( String jobId ) throws SchedulerException {
    Job job = getJob( jobId );
    if ( isScheduleAllowed() || PentahoSessionHolder.getSession().getName().equals( job.getUserName() ) ) {
      getScheduler().pauseJob( jobId );
    }
    job = getJob( jobId );
    return job.getState();
  }
View Full Code Here

    job = getJob( jobId );
    return job.getState();
  }

  public JobState resumeJob( String jobId ) throws SchedulerException {
    Job job = getJob( jobId );
    if ( isScheduleAllowed() || PentahoSessionHolder.getSession().getName().equals( job.getUserName() ) ) {
      getScheduler().resumeJob( jobId );
    }
    job = getJob( jobId );
    return job.getState();
  }
View Full Code Here

    job = getJob( jobId );
    return job.getState();
  }

  public boolean removeJob( String jobId ) throws SchedulerException {
    Job job = getJob( jobId );
    if ( isScheduleAllowed() || PentahoSessionHolder.getSession().getName().equals( job.getUserName() ) ) {
      getScheduler().removeJob( jobId );
      return true;
    }
    return false;
  }
View Full Code Here

    }
    return false;
  }

  public Job getJobInfo( String jobId ) throws SchedulerException {
    Job job = getJob( jobId );
    if ( getSecurityHelper().isPentahoAdministrator( getSession() )
        || getSession().getName().equals( job.getUserName() ) ) {
      for ( String key : job.getJobParams().keySet() ) {
        Serializable value = job.getJobParams().get( key );
        if ( value.getClass().isArray() ) {
          String[] sa = ( new String[0] ).getClass().cast( value );
          ArrayList<String> list = new ArrayList<String>();
          for ( int i = 0; i < sa.length; i++ ) {
            list.add( sa[i] );
          }
          job.getJobParams().put( key, list );
        }
      }
      return job;
    } else {
      throw new RuntimeException( "Job not found or improper credentials for access" );
View Full Code Here

  public Job updateBlockout( String jobId, JobScheduleRequest jobScheduleRequest )
    throws IllegalAccessException, SchedulerException, IOException {
    if ( isScheduleAllowed() ) {
      boolean isJobRemoved = removeJob( jobId );
      if ( isJobRemoved ) {
        Job job = addBlockout( jobScheduleRequest );
        return job;
      }
    }
    throw new IllegalArgumentException();
  }
View Full Code Here

    jobRequest.setJobParameters( jobParams );
    return jobRequest;
  }

  public JobState getJobState( JobRequest jobRequest ) throws SchedulerException {
    Job job = getJob( jobRequest.getJobId() );
    if ( isScheduleAllowed() || getSession().getName().equals( job.getUserName() ) ) {
      return job.getState();
    }

    throw new UnsupportedOperationException();
  }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.client.ui.structure.editor.xml.StructureFileDownloader$Job

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.