Package sos.settings

Examples of sos.settings.SOSProfileSettings


   * returns the Settings for the Job Scheduler as SOSSettings object
   * @param factoryIni Path to factory.ini (delivered by spooler.ini_path() )
   * @throws Exception
   */
  public static SOSSettings getSchedulerSettings(String factoryIni) throws Exception {
    SOSSettings schedulerSettings = new SOSProfileSettings(factoryIni);
    return schedulerSettings;
  }
View Full Code Here


    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;
View Full Code Here

                }else {
                  // use defaults from Scheduler configuration
                  sosMail = new SOSMail(host);
                  sosMail.setQueueDir(queueDir);
                  sosMail.setFrom(from);
                  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"));
                            }
                            if (smtpProperties.getProperty("mail.smtp.password") != null && smtpProperties.getProperty("mail.smtp.password").length() > 0) {
View Full Code Here

   */
  public SOSLDAPConnection(
      String configfile) throws Exception {
    try {       
     
      SOSProfileSettings jobSettings = new SOSProfileSettings(configfile);
      Properties section = jobSettings.getSection("ldap");
     
     
      int port = LDAPConnection.DEFAULT_PORT;
      if (section.getProperty("port") != null
          && section.getProperty("port").length() > 0)  {
View Full Code Here

    try {       
     
      if(sosLogger == null)
        throw (new Exception("invalid SOSLogger object !!"));
     
      SOSProfileSettings jobSettings = new SOSProfileSettings(configfile, sosLogger);
      Properties section = jobSettings.getSection("ldap");
     
     
      int port = LDAPConnection.DEFAULT_PORT;
      if (section.getProperty("port") != null
          && section.getProperty("port").length() > 0)  {
View Full Code Here

    if(sosString.parseToString(getSosSettingsFile()).length() > 0) {     
      conn = getConnectionFromINIFile();
    }
   
    if (conn == null) {
      conn = JobSchedulerJob.getSchedulerConnection(new SOSProfileSettings(spooler.ini_path()), new SOSSchedulerLogger(spooler_log));
    }
   
    return conn;
  }
View Full Code Here

       
        try {
            this.setLogger(new SOSSchedulerLogger(this.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

      if(!new File(configFile).exists()) {
        new File(configFile).createNewFile();
      }

      settings = new SOSProfileSettings(configFile);
      ArrayList l = settings.getSections();
      profileNames = convert(settings.getSections().toArray());

      profiles = new HashMap();
      for(int i = 0; i < l.size(); i++) {
View Full Code Here

      sosMail.setQueueDir(spooler_log.mail().queue_dir());
      sosMail.setFrom(spooler_log.mail().from());
      sosMail.addRecipient(spooler_log.mail().to());
      sosMail.addCC(spooler_log.mail().cc());
      sosMail.addBCC(spooler_log.mail().bcc());
      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"));
                }
                if (smtpProperties.getProperty("mail.smtp.password") != null && smtpProperties.getProperty("mail.smtp.password").length() > 0) {
View Full Code Here

    public boolean spooler_init() {

        try {
            this.setLogger(new SOSSchedulerLogger(spooler_log));
            this.setJobSettings(new SOSProfileSettings(spooler.ini_path()));
            this.setJobProperties(this.getJobSettings().getSection("job " + spooler_job.name()));

            return true;
        } catch (Exception e) {
            try {
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.