Package it.eng.spagobi.engines.talend.runtime

Examples of it.eng.spagobi.engines.talend.runtime.RuntimeRepository


      boolean isInMemory = item.isInMemory();
      long sizeInBytes = item.getSize();
     
      if(fieldName.equalsIgnoreCase("deploymentDescriptor")) return null;
     
      RuntimeRepository runtimeRepository = TalendEngine.getRuntimeRepository();
      File jobsDir = new File(runtimeRepository.getRootDir(), jobDeploymentDescriptor.getLanguage().toLowerCase());
    File projectDir = new File(jobsDir, jobDeploymentDescriptor.getProject());
    File tmpDir = new File(projectDir, "tmp");
    if(!tmpDir.exists()) tmpDir.mkdirs();    
       File uploadedFile = new File(tmpDir, fileName);
     
      try {
      item.write(uploadedFile);
    } catch (Exception e) {
      e.printStackTrace();
   
   
    String[] dirNames = ZipUtils.getDirectoryNameByLevel(new ZipFile(uploadedFile), 2);
    List dirNameList = new ArrayList();
    for(int i = 0; i < dirNames.length; i++) {
      if(!dirNames[i].equalsIgnoreCase("lib")) dirNameList.add(dirNames[i]);
    }
    String[] jobNames = (String[])dirNameList.toArray(new String[0]);
   
      runtimeRepository.deployJob(jobDeploymentDescriptor, new ZipFile(uploadedFile));
      uploadedFile.delete()
      tmpDir.delete();
     
      return jobNames;
  }
View Full Code Here


  }
 
  private String getTemplate(String language, String projectName, String jobName) throws IOException, SpagoBIEngineException {
    String template = null;
   
    RuntimeRepository runtimeRepository = TalendEngine.getRuntimeRepository();
    File jobsDir = new File(runtimeRepository.getRootDir(), language.toLowerCase());
    File projectDir = new File(jobsDir, projectName);
    File jobDir = new File(projectDir, jobName);
    File templateFile = new File(jobDir, "spagobi.xml");
    if(templateFile.exists() && isValidTemplate(templateFile) ) {
      BufferedReader reader = new BufferedReader(new FileReader(templateFile));
View Full Code Here

 
  /*
   * TODO: implementare questa funzione tramite una API  WEB Service
   */
  private void publishOnSpagoBI(EngineStartServletIOManager servletIOManager, String language, String projectName, String jobName) throws IOException, SpagoBIEngineException {
    RuntimeRepository runtimeRepository = TalendEngine.getRuntimeRepository();
   
    String template = getTemplate(language, projectName, jobName);
   
    BASE64Encoder encoder = new BASE64Encoder();
    String templateBase64Coded = encoder.encode(template.getBytes());   
View Full Code Here

     
      if(fieldName.equalsIgnoreCase("deploymentDescriptor")) return;
     
     
     
      RuntimeRepository runtimeRepository = TalendEngine.getRuntimeRepository();
     
      String projectName = jobDeploymentDescriptor.getProject();
      String projectLanguage = jobDeploymentDescriptor.getLanguage().toLowerCase();
      String jobName = "JOB_NAME";
      String contextName = "Default";
View Full Code Here

  private static transient Logger logger = Logger.getLogger(JobRunService.class);
 
 
  public void doService( EngineStartServletIOManager servletIOManager ) throws SpagoBIEngineException {
   
    RuntimeRepository runtimeRepository;
    Job job;

    logger.debug("IN");
   
    try {   
     
      //servletIOManager.auditServiceStartEvent();
       
      super.doService(servletIOManager);
       
      job = new Job( servletIOManager.getTemplateAsSourceBean() );     
      runtimeRepository = TalendEngine.getRuntimeRepository();
     
      try {
        runtimeRepository.runJob(job, servletIOManager.getEnv());
      } catch (JobNotFoundException ex) {
        logger.error(ex.getMessage());

        throw new SpagoBIEngineException("Job not found",
            "job.not.existing");
View Full Code Here

TOP

Related Classes of it.eng.spagobi.engines.talend.runtime.RuntimeRepository

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.