Package sos.settings

Examples of sos.settings.SOSProfileSettings


        }


        try { // to read master settings
            settingsFilename = spooler.ini_path();
            this.sosSettings = new SOSProfileSettings(settingsFilename);

            this.masterProperties = this.sosSettings.getSection("mysqld");
            if (this.masterProperties.isEmpty()) {
                this.masterProperties = this.sosSettings.getSection("job " + spooler_job.name());
                if (!this.masterProperties.isEmpty())
View Full Code Here


            }
      else{
              if(conn == null){
                log.debug3("connecting to database using Job Scheduler connection ...");
           
                conn = JobSchedulerJob.getSchedulerConnection(new SOSProfileSettings(spooler.ini_path()),log);
               
                conn.connect();
                    log.debug3("connected to database using Job Scheduler connection");
              }
              else{
View Full Code Here

   
    
     try {
     sosLogger = new SOSSchedulerLogger(spooler_log);

       this.setJobSettings(new SOSProfileSettings(spooler.ini_path()));
        this.setJobProperties(this.getJobSettings().getSection("spooler"));
        if (this.getJobProperties().isEmpty())
            throw new Exception("no settings found in section [spooler] of configuration file: " + spooler.ini_path());
        if (this.getJobProperties().getProperty("db") == null || this.getJobProperties().getProperty("db").length() == 0)
            throw new Exception("no settings found for entry [db] in section [spooler] of configuration file: " + spooler.ini_path());
View Full Code Here

            if (!rc) return false;
            this.setLogger(new SOSSchedulerLogger(spooler_log));           

            try { // to initialize database connection
               
                this.setJobSettings(new SOSProfileSettings(spooler.ini_path()));
                this.setJobProperties(this.jobSettings.getSection("spooler"));

                if (this.getJobProperties().isEmpty())
                    throw new Exception("no settings found in section [spooler] of configuration file: " + spooler.ini_path());
View Full Code Here

     * @param factoryIni Pfad zur Datei factory.ini (wird von der Methode ini_path()
     * des spooler Objekts geliefert)
     * @throws Exception
     */
    public static SOSSettings getSchedulerSettings(String factoryIni) throws Exception{
        SOSSettings schedulerSettings = new SOSProfileSettings(factoryIni);
        return schedulerSettings;
    }
View Full Code Here

    private boolean getSettings() {
       
        try {
            if (spooler_job == null) return false;
           
            setJobSettings(new SOSProfileSettings(spooler.ini_path()));
            setJobProperties(getJobSettings().getSection("job " + spooler_job.name()));

            if (getJobProperties().isEmpty()) return false;

            return true;
View Full Code Here

        this.new_release = "";
        this.downloaded_file = "0";
        this.os_install = "*unknown*";
       
      }else {
        SOSProfileSettings s = new SOSProfileSettings("config/.version","scheduler");
        this.os_install = s.getSectionEntry("os_install");
        this.release = s.getSectionEntry("release");
        this.new_release = s.getSectionEntry("new_release");
        this.downloaded_file = s.getSectionEntry("downloaded_file");
      }
    }
View Full Code Here

      SOSDialogTest dialogTest = new SOSDialogTest(logger);
          /* if (dialogTest.initialize(this.configFile)) {
              throw new Exception("error occurred initializing SOSDialogTest");
          }*/
      //dialogTest.initialize(this.configFile);
      SOSSettings settings = new SOSProfileSettings(configFile);
      dialogTest.initialize(settings);
          dialogTest.execute();
         
      } catch (Exception e) {
          spooler_log.warn("error occurred in JobSchedulerDialogTest: " + e.getMessage());
View Full Code Here

                sosMail.setQueueDir(this.getQueueDirectory());

            // set queue prefix "sos" to enable dequeueing by JobSchedulerMailDequeueJob
            sosMail.setQueuePraefix(this.getQueuePrefix());

            SOSSettings smtpSettings = new SOSProfileSettings(spooler.ini_path());
            Properties smtpProperties = smtpSettings.getSection("smtp");

            if (!smtpProperties.isEmpty()) {
                if (smtpProperties.getProperty("mail.smtp.user") != null && smtpProperties.getProperty("mail.smtp.user").length() > 0) {
                    sosMail.setUser(smtpProperties.getProperty("mail.smtp.user"));
                }
View Full Code Here

 
  private void removeSection(String name) {
    try{
      String section = "job " + name;
      String factoryIni = spooler.ini_path();
      SOSProfileSettings p = new SOSProfileSettings(factoryIni, "emptySection");
      Properties job = p.getSection();
      writeSection(factoryIni, section, job);
    } catch (Exception e){
      try{
        getLog().warn("Error occured removing job settings \""+name+"\": "+e);
      } catch (Exception ex) {}
View Full Code Here

TOP

Related Classes of sos.settings.SOSProfileSettings

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.