Package de.willuhn.jameica.plugin

Examples of de.willuhn.jameica.plugin.PluginResources


   */
  public HBCIUmsatzJob(Konto konto) throws ApplicationException, RemoteException
  {
    try
    {
      PluginResources res = Application.getPluginLoader().getPlugin(HBCI.class).getResources();
      if (konto == null)
        throw new ApplicationException(i18n.tr("Bitte w�hlen Sie ein Konto aus"));

      if (konto.isNewObject())
        konto.store();

      this.konto = konto;
     
      String curr = konto.getWaehrung();
      if (curr == null || curr.length() == 0)
        konto.setWaehrung(HBCIProperties.CURRENCY_DEFAULT_DE);
      setJobParam("my",Converter.HibiscusKonto2HBCIKonto(konto));
     
      this.saldoDatum = konto.getSaldoDatum();
      if (this.saldoDatum != null)
      {
        // BUGZILLA 917 - checken, ob das Datum vielleicht in der Zukunft liegt. Das ist nicht zulaessig
        Date now = new Date();
        if (saldoDatum.after(now))
        {
          Logger.warn("future start date " + saldoDatum + " given. this is not allowed, changing to current date " + now);
          this.saldoDatum = now;
        }
       
        // Mal schauen, ob wir ein konfiguriertes Offset haben
        int offset = res.getSettings().getInt("umsatz.startdate.offset",0);
        if (offset != 0)
        {
          Logger.info("using custom offset for startdate: " + offset);
          Calendar cal = Calendar.getInstance();
          cal.setTime(this.saldoDatum);
View Full Code Here


   * @throws ApplicationException
   */
  protected static String getRDHLib() throws ApplicationException
  {
    AbstractPlugin p    = Application.getPluginLoader().getPlugin(HBCI.class);
    PluginResources res = p.getResources();
    Settings settings   = res.getSettings();
    Manifest mf         = p.getManifest();

    String file = null;
 
    switch (Application.getPlatform().getOS())
    {
      case Platform.OS_LINUX:
        file = settings.getString("sizrdh.nativelib","libhbci4java-sizrdh-linux-gcc3.so");
        break;
      case Platform.OS_WINDOWS:
        file = settings.getString("sizrdh.nativelib","hbci4java-sizrdh-win32.dll");;
        break;
    }
    if (file == null)
      throw new ApplicationException(res.getI18N().tr("SizRDH-Schl�sseldisketten werden f�r Ihr Betriebssystem nicht von Hibiscus unterst�tzt"));

    file = mf.getPluginDir() + File.separator + "lib" + File.separator + file;
    Logger.info("using sizrdh native lib " + file);
    return file;
  }
View Full Code Here

   
    if (!file.canRead() || !file.isFile())
      throw new ApplicationException(i18n.tr("Schl�sseldatei nicht lesbar"));

    HBCI plugin           = (HBCI) Application.getPluginLoader().getPlugin(HBCI.class);
    PluginResources res   = plugin.getResources();
   
    // Wir fragen den User, wo er den Schluessel hinhaben will.
    FileDialog dialog = new FileDialog(GUI.getShell(), SWT.SAVE);
    dialog.setText(Application.getI18n().tr("Bitte w�hlen einen Pfad und Dateinamen, an dem der importierte Schl�ssel gespeichert werden soll."));
    dialog.setFileName("hibiscus-" + file.getName());
    dialog.setOverwrite(true);
    dialog.setFilterPath(res.getWorkPath());
    String newFile = dialog.open();
   
    if (newFile == null || newFile.length() == 0)
      throw new ApplicationException(i18n.tr("Keine Datei ausgew�hlt"));
   
    File newKey = new File(newFile);
    if (!newKey.getParentFile().canWrite())
      throw new ApplicationException(i18n.tr("Keine Schreibberechtigung"));

    // BUGZILLA 289
    Settings settings = res.getSettings();
    HBCICallback callback = plugin.getHBCICallback();

    try
    {
      ////////////////////////////////////////////////////////////////////////
View Full Code Here

TOP

Related Classes of de.willuhn.jameica.plugin.PluginResources

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.