Package sos.scheduler.editor.conf.forms

Examples of sos.scheduler.editor.conf.forms.SchedulerForm


    });
  }


  public SchedulerForm newScheduler() {
    SchedulerForm scheduler = new SchedulerForm(this, folder, SWT.NONE);
    scheduler.openBlank();
    CTabItem tab = newItem(scheduler, NEW_SCHEDULER_TITLE);
    tab.setImage(new Image(tab.getDisplay(), getClass().getResourceAsStream(
        "/sos/scheduler/editor/editor-small.png")));
    return scheduler;
  }
View Full Code Here


        "/sos/scheduler/editor/editor-small.png")));
    return scheduler;
  }

  public SchedulerForm newScheduler(int type) {
    SchedulerForm scheduler = new SchedulerForm(this, folder, SWT.NONE, type);
    scheduler.openBlank(type);
    CTabItem tab = newItem(scheduler, NEW_SCHEDULER_TITLE);
    tab.setImage(new Image(tab.getDisplay(), getClass().getResourceAsStream(
        "/sos/scheduler/editor/editor-small.png")));
    return scheduler;
  }
View Full Code Here

      return null;
  }

 
  public SchedulerForm openScheduler() {
    SchedulerForm scheduler = new SchedulerForm(this, folder, SWT.NONE);
    if (scheduler.open(filelist)) {
      CTabItem tab = newItem(scheduler, scheduler.getFilename());
      tab.setImage(ResourceManager.getImageFromResource("/sos/scheduler/editor/editor-small.png"));
      return scheduler;
    } else
      return null;
  }
View Full Code Here

  }



  public SchedulerForm openScheduler(String filename) {
    SchedulerForm scheduler = new SchedulerForm(this, folder, SWT.NONE);
    if (scheduler.open(filename, filelist)) {
      CTabItem tab = newItem(scheduler, scheduler.getFilename());
      tab.setImage(ResourceManager.getImageFromResource("/sos/scheduler/editor/editor-small.png"));
      return scheduler;
    } else
      return null;
  }
View Full Code Here

            return null;
    }*/

  public SchedulerForm openDirectory(String filename) {

    SchedulerForm scheduler = new SchedulerForm(this, folder, SWT.NONE, SchedulerDom.DIRECTORY);

    if (scheduler.openDirectory(filename, filelist)) {
      CTabItem tab = newItem(scheduler, scheduler.getFilename());
      tab.setImage(ResourceManager.getImageFromResource("/sos/scheduler/editor/editor-small.png"));
      return scheduler;
    } else
      return null;
  }
View Full Code Here

    } else
      return null;
  }

  public SchedulerForm openLifeElement(String filename, int type) {
    SchedulerForm scheduler = new SchedulerForm(this, folder, SWT.NONE, type);
    if (scheduler.open(filename, filelist, type)) {
      CTabItem tab = newItem(scheduler, scheduler.getFilename());
      tab.setImage(ResourceManager.getImageFromResource("/sos/scheduler/editor/editor-small.png"));
      return scheduler;
    } else
      return null;
  }
View Full Code Here

      return;
   
    if(sos.scheduler.editor.app.MainWindow.getContainer().getCurrentEditor() instanceof sos.scheduler.editor.doc.forms.DocumentationForm)
      return;
     
    SchedulerForm f = (SchedulerForm)(sos.scheduler.editor.app.MainWindow.getContainer().getCurrentEditor());
   
    if(f == null)
      return;
   
    Tree tree = f.getTree();
    if(tree != null && tree.getSelectionCount() > 0) {
      TreeItem item = f.getTree().getSelection()[0];
            if(item.getParentItem() != null && (item.getParentItem().getText().equalsIgnoreCase("Holidays") ||
                (item.getParentItem().getData("key") != null && item.getParentItem().getData("key").equals("holidays")))) {
      //if(_runtime.getName().equals("config")){
        if(_runtime.getChild("holidays") != null)
          _runtime = _runtime.getChild("holidays");
View Full Code Here

            String pathFromHotFolderDirectory = new File(hotFolderfilename).getParent();
            if(tab.getFilelist() != null &&
                (tab.getFilelist().contains(hotFolderfilename) || 
                    tab.getFilelist().contains(pathFromHotFolderDirectory)    )) {
              //Hot Folder oder Hot Folder Element ist in einem Tabraiter offen oder             
              SchedulerForm form = null;

              if(tab.getFilelist().contains(hotFolderfilename)) {
                form = (SchedulerForm)tab.getEditor(hotFolderfilename);//hot folder element
                x2 = XPath.newInstance("//job/monitor/script[@java_class='sos.scheduler.managed.configuration.ConfigurationOrderMonitor']");
              } else {
                form = (SchedulerForm)tab.getEditor(pathFromHotFolderDirectory);//hot folder
                x2 = XPath.newInstance("//job[@name='"+new File(jobname).getName()+"']/monitor/script[@java_class='sos.scheduler.managed.configuration.ConfigurationOrderMonitor']");
              }

              SchedulerDom currdom = (SchedulerDom)form.getDom();

              listOfElement2 = x2.selectNodes(currdom.getDoc());
              if(listOfElement2.isEmpty()) {             
                XPath x3 = null;
                XPath x4 = null;
                if(tab.getFilelist().contains(hotFolderfilename)) {
                  x3 = XPath.newInstance("//job/monitor/script[@java_class='sos.scheduler.managed.configuration.ConfigurationOrderMonitor']");
                  x4 = XPath.newInstance("//job");;
                } else {
                  x3 = XPath.newInstance("//job[@name='"+new File(jobname).getName()+"']/monitor/script[@java_class='sos.scheduler.managed.configuration.ConfigurationOrderMonitor']");
                  x4 = XPath.newInstance("//job[@name='"+new File(jobname).getName()+"']");
                }
                List listOfElement3  = x3.selectNodes(currdom.getDoc());
                if(listOfElement3.isEmpty()) {                 
                  List listOfElement4  = x4.selectNodes(currdom.getDoc());
                  Element job = (Element)listOfElement4.get(0);
                  addMonitoring(job, currdom);

                  if(currdom.isLifeElement())
                    form.getTree().setSelection(new org.eclipse.swt.widgets.TreeItem[] { form.getTree().getItem(0) });
                  else if(currdom.isDirectory())
                    form.selectTreeItem(SchedulerListener.JOBS , SchedulerListener.JOB + new File(jobname).getName());

                  currdom.setChanged(true);
                  if(form != null) {

                    form.updateJob(job);
                    form.updateJob();
                    form.update();
                  }
                  currdom.setChanged(true);
                  form.dataChanged();
                  dom.setChanged(true);

                  if(tab.getFilelist().contains(hotFolderfilename)) {
                    form.dataChanged(tab.getFolderTab(hotFolderfilename));
                  } else {
                    form.dataChanged(tab.getFolderTab(pathFromHotFolderDirectory));
                  }

                }
              }
View Full Code Here

          //Es ist ein Hot Folder oder der Job ist woanders abgelegt
          sos.scheduler.editor.app.TabbedContainer tab = ((sos.scheduler.editor.app.TabbedContainer)MainWindow.getContainer());
          if(tab.getFilelist() != null && tab.getFilelist().contains(hotFolderfilename)) {
            //Hot Folder Element ist in einem Tabraiter offen 
            //org.eclipse.swt.custom.CTabItem f = tab.getFolderTab(hotFolderfilename);
            SchedulerForm form =(SchedulerForm)tab.getEditor(hotFolderfilename);
            SchedulerDom currdom = (SchedulerDom)form.getDom();

            listOfElement2 = x2.selectNodes(currdom.getDoc());
            if(listOfElement2.isEmpty()) {             
              XPath x3 = XPath.newInstance("//job/monitor/script[@java_class='sos.scheduler.managed.configuration.ConfigurationOrderMonitor']");
              List listOfElement3  = x3.selectNodes(currdom.getDoc());
              if(listOfElement3.isEmpty()) {
                x3 = XPath.newInstance("//job");
                listOfElement3  = x3.selectNodes(currdom.getDoc());
                Element job = (Element)listOfElement3.get(0);
                addMonitoring(job, currdom);

                form.getTree().setSelection(new org.eclipse.swt.widgets.TreeItem[] { form.getTree().getItem(0) });

                currdom.setChanged(true);
                if(form != null) {

                  form.updateJob();
                  form.update();
                }
                currdom.setChanged(true);
                form.dataChanged();
                dom.setChanged(true);


                form.dataChanged(tab.getFolderTab(hotFolderfilename));

              }
            }

          } else {
View Full Code Here

TOP

Related Classes of sos.scheduler.editor.conf.forms.SchedulerForm

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.