Example #1
0
 @Override
 protected void writeToConfig() {
   MyTunesRss.CONFIG.setWebLoginMessage(myWebLoginMessage.getStringValue(null));
   MyTunesRss.CONFIG.setWebWelcomeMessage(myWebWelcomeMessage.getStringValue(null));
   MyTunesRss.CONFIG.setServerBrowserActive(myServerBrowserActive.booleanValue());
   MyTunesRss.CONFIG.setOpenIdActive(myOpenIdActive.booleanValue());
   MyTunesRss.CONFIG.setProxyHost(myProxyHost.getStringValue(null));
   MyTunesRss.CONFIG.setProxyPort(myProxyPort.getIntegerValue(-1));
   MyTunesRss.CONFIG.setMailHost(myMailHost.getStringValue(null));
   MyTunesRss.CONFIG.setMailPort(myMailPort.getIntegerValue(-1));
   MyTunesRss.CONFIG.setSmtpProtocol((SmtpProtocol) mySmtpProtocol.getValue());
   MyTunesRss.CONFIG.setMailLogin(myMailLogin.getStringValue(null));
   MyTunesRss.CONFIG.setMailPassword(myMailPassword.getStringValue(null));
   MyTunesRss.CONFIG.setMailSender(myMailSender.getStringValue(null));
   MyTunesRss.CONFIG.setHeadless(myHeadless.booleanValue());
   String gmBinary = myGraphicsMagickBinary.getStringValue(null);
   MyTunesRss.CONFIG.setGmExecutable(gmBinary != null ? new File(gmBinary) : null);
   MyTunesRss.CONFIG.setGmEnabled(myGraphicsMagickEnabled.booleanValue());
   MyTunesRss.CONFIG.save();
 }
Example #2
0
  @Override
  protected void initFromConfig() {

    myWebLoginMessage.setValue(MyTunesRss.CONFIG.getWebLoginMessage());
    myWebWelcomeMessage.setValue(MyTunesRss.CONFIG.getWebWelcomeMessage());
    myServerBrowserActive.setValue(MyTunesRss.CONFIG.isServerBrowserActive());
    myOpenIdActive.setValue(MyTunesRss.CONFIG.isOpenIdActive());
    myProxyHost.setValue(MyTunesRss.CONFIG.getProxyHost());
    myProxyPort.setValue(MyTunesRss.CONFIG.getProxyPort(), 1, 65535, "");
    myMailHost.setValue(MyTunesRss.CONFIG.getMailHost());
    myMailPort.setValue(MyTunesRss.CONFIG.getMailPort(), 1, 65535, "");
    mySmtpProtocol.setValue(MyTunesRss.CONFIG.getSmtpProtocol());
    myMailLogin.setValue(MyTunesRss.CONFIG.getMailLogin());
    myMailPassword.setValue(MyTunesRss.CONFIG.getMailPassword());
    myMailSender.setValue(MyTunesRss.CONFIG.getMailSender());
    myHeadless.setValue(MyTunesRss.CONFIG.isHeadless());
    myGraphicsMagickEnabled.setValue(MyTunesRss.CONFIG.isGmEnabled());
    myGraphicsMagickBinary.setValue(
        MyTunesRss.CONFIG.getGmExecutable() != null
            ? MyTunesRss.CONFIG.getGmExecutable().getAbsolutePath()
            : "");
  }