Package sos.util

Examples of sos.util.SOSString


    setToolTipText();

  }

  private void initialize() {
    sosString = new SOSString();
    try {
      isRemoteConnection = sosString.parseToString(MainWindow.getContainer().getCurrentTab().getData("ftp_title")).length() > 0;
    } catch (Exception e) {}   
    this.setLayout(new GridLayout());
    GridLayout gridLayout2 = new GridLayout();
View Full Code Here


 
  private              Text                   txtPath                       = null;

 
  public FTPDialogListener(java.util.Properties profile, String profilename) {
    sosString = new SOSString();
    currProfile = profile;
    currProfileName = profilename;
    profiles = new HashMap();
    profiles.put(profilename,profile);
  }
View Full Code Here

    profiles.put(profilename,profile);
  }

  public FTPDialogListener() {

    sosString = new SOSString();

    String sep = "/";
    try {   

      configFile = Options.getSchedulerData();
View Full Code Here

   
    try {
      this.setLogger(new sos.util.SOSSchedulerLogger(spooler_log));
      String filename = "";
      if(rc) {
        sosString = new SOSString();
        this.setParameters(spooler.create_variable_set());
       
       
       
        if (spooler_task.params() != null) this.getParameters().merge(spooler_task.params());
View Full Code Here

 
  public boolean spooler_init() {
    boolean rc = super.spooler_init();
    if(rc){
      try {
        sosString = new SOSString();
        this.setLogger(new sos.util.SOSSchedulerLogger(spooler_log));
        this.setParameters(spooler.create_variable_set());
        //Parameter auslesen
        if (spooler_task.params() != null) this.getParameters().merge(spooler_task.params());
        if (spooler_job.order_queue() != null) this.getParameters().merge(spooler_task.order().params());
View Full Code Here

    private              boolean                saved                         = false; //hilsvariable
   
       
  public WebDavDialogProfiles(WebDavDialogListener listener_) {
    listener = listener_;
    sosString = new SOSString();

  }
View Full Code Here

      return false;
    }

    private void checkDataBaseSettings() throws Exception{
      if (this.getConnection()==null) return; //No Database Settings when running without Database
      SOSString sosString = new SOSString();
      try { // to retrieve reference categories and values
            ArrayList results = this.getConnection().getArray(
                    "SELECT \"CATEGORY\", \"VALUE\", \"SUBTYPE\" FROM SCHEDULER_SANITY_REFERENCES WHERE \"SPOOLER_ID\" IS NULL AND \"CATEGORY\"='disk_space'");
         
            ArrayList results2 = this.getConnection().getArray(
                    "SELECT \"CATEGORY\", \"VALUE\", \"SUBTYPE\" FROM SCHEDULER_SANITY_REFERENCES WHERE \"SPOOLER_ID\"='" + spooler.id() + "' AND \"CATEGORY\"='disk_space' ");
           
            results.addAll(results2);
            Iterator iter = results.iterator();
           
            while (iter.hasNext()){
              HashMap row = (HashMap) iter.next();
              String location = sosString.parseToString(row,"subtype");
              String sMinSpace = sosString.parseToString(row,"value");
              Long minSpace = new Long(minDiskSpace);
              try{minSpace = new Long(sMinSpace);} catch  (Exception e){}
              if (location.length()>0){
                diskChecks.put(location, minSpace);
              }
            }
            spooler_log.debug3("Found "+ diskChecks.size()+" drives/directories to check in database.");
           
            results = this.getConnection().getArray(
            "SELECT \"CATEGORY\", \"VALUE\", \"SUBTYPE\" FROM SCHEDULER_SANITY_REFERENCES WHERE \"SPOOLER_ID\" IS NULL AND \"CATEGORY\"='disk_space_user'");
     
            results2 = this.getConnection().getArray(
            "SELECT \"CATEGORY\", \"VALUE\", \"SUBTYPE\" FROM SCHEDULER_SANITY_REFERENCES WHERE \"SPOOLER_ID\"='" + spooler.id() + "' AND \"CATEGORY\"='disk_space_user' ");
   
            results.addAll(results2);
            iter = results.iterator();
           
            while (iter.hasNext()) {
              HashMap row = (HashMap) iter.next();
              String location = sosString.parseToString(row, "subtype");
              String sMinSpace = sosString.parseToString(row, "value");
              Long minSpace = new Long(minDiskSpace);
              try {
                minSpace = new Long(sMinSpace);
              } catch (Exception e) {
              }
              if (location.length() > 0) {
                diskChecksUser.put(location, minSpace);
              }
            }
            spooler_log.debug3("Found " + diskChecksUser.size()
                + " drives/directories for Scheduler user to check in database.");           
           
           
            results = this.getConnection().getArray(
                    "SELECT \"CATEGORY\", \"VALUE\", \"SUBTYPE\" FROM SCHEDULER_SANITY_REFERENCES WHERE \"SPOOLER_ID\" IS NULL " +
          "AND \"CATEGORY\"='free_memory' ");
            results2 = this.getConnection().getArray(
                    "SELECT \"CATEGORY\", \"VALUE\", \"SUBTYPE\" FROM SCHEDULER_SANITY_REFERENCES WHERE \"SPOOLER_ID\"='" + spooler.id() + "' AND \"CATEGORY\"='free_memory' ");
            results.addAll(results2);
            iter = results.iterator();
           
            while (iter.hasNext()){
              HashMap row = (HashMap) iter.next();
              String type = sosString.parseToString(row,"subtype");
              String sMinMem = sosString.parseToString(row,"value");
              Long minMem = new Long(minMemorySize);
              try{minMem = new Long(sMinMem);} catch  (Exception e){}
              if (type.length()>0){
                memChecks.put(type, minMem);
              }
View Full Code Here

   
    private void checkINISettings() throws Exception{
      try{
        int dsCounter=0;
        int dsuCounter=0;
        SOSString sosString = new SOSString();
        Properties settings = getJobProperties();
            Enumeration keys = settings.keys();
            while (keys.hasMoreElements()){
              String key =  sosString.parseToString(keys.nextElement());
              if (key.startsWith("category_")){
                String number = key.substring(9);
                String category = sosString.parseToString(settings,key);
                String subtype = sosString.parseToString(settings,"subtype_"+number);
                String value = sosString.parseToString(settings,"value_"+number);
                if(category.equalsIgnoreCase("disk_space")){
                  Long minSpace = new Long(minDiskSpace);
                      try{minSpace = new Long(value);} catch  (Exception e){}
                      if (subtype.length()>0){
                        diskChecks.put(subtype, minSpace);
View Full Code Here

   
    private void checkJobSettings() throws Exception{
      try{
        int dsCounter=0;
        int dsuCounter=0;
        SOSString sosString = new SOSString();
        Variable_set params = spooler_task.params();
        if (params.var("check_disk_space") != null
                    && params.var("check_disk_space").length() >0 ){
          String sCheckDiskSpace=params.var("check_disk_space");
          if(sCheckDiskSpace.equalsIgnoreCase("0") ||
View Full Code Here

      } else iter = diskChecks.keySet().iterator();
     
      try{
        while (iter.hasNext()){         
          long freeDiskSpace = 0;
          SOSString sosString = new SOSString();
          String location = sosString.parseToString(iter.next());         
          long minDS = 0;
          if(user) minDS=((Long) diskChecksUser.get(location)).longValue();
          else minDS=((Long) diskChecks.get(location)).longValue();  
          spooler_log.info("Checking disk space on partition "+location+sUser);
          subtype = location;
View Full Code Here

TOP

Related Classes of sos.util.SOSString

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.