Package jp.ne.so_net.ga2.no_ji.jcom

Examples of jp.ne.so_net.ga2.no_ji.jcom.ReleaseManager


  // performs 100 calls in 5 seconds
  private boolean writeEvent(String subject, String body, Date start, Date end, int reminderMinutesBeforeStart,
      boolean reminderSet, int busyStatus, String categories, boolean durationIs0, int sensitivity) {

    ReleaseManager rm = null;
    IDispatch outlook;
    IDispatch item;
    try {
      System.loadLibrary("JCom");
      rm = new ReleaseManager();
      try {
        outlook = new IDispatch(rm, "Outlook.Application");
      } catch (jp.ne.so_net.ga2.no_ji.jcom.JComException ex) {
        JOptionPane.showMessageDialog(CalendarExportPlugin.getInstance().getBestParentFrame(), mLocalizer.msg(
            "noOutlookFound", "MS Outlook is not installed."), Localizer.getLocalization(Localizer.I18N_ERROR),
            JOptionPane.WARNING_MESSAGE);
        return false;
      }
      item = (IDispatch) outlook.invoke("CreateItem", IDispatch.PROPERTYGET, new Integer[] { olAppointmentItem });
      item.put("Subject", subject);
      item.put("Body", body);
      item.put("Start", correctTimeZone(start));
      item.put("End", correctTimeZone(end));
      item.put("ReminderSet", reminderSet);
      if (reminderSet) {
        item.put("ReminderMinutesBeforeStart", reminderMinutesBeforeStart);
      }
      item.put("BusyStatus", busyStatus);
      item.put("Categories", categories);
      if (durationIs0) {
        item.put("Duration", 0);
      }
      item.put("Sensitivity", sensitivity);
      item.method("Save", null);
      item.release();
      outlook.release();
    } catch (Exception e) {
      e.printStackTrace();
      ErrorHandler.handle(mLocalizer
          .msg("exportError", "An error occured while creating an appointment in MS Outlook."), e);
View Full Code Here


    /**
     * Füllt die Außendienst Datenbank.
     */
    private void fillAD() {
        IDispatch archvorg = bpn.getDataSet("VorgangArchiv");
        IDispatch archvorgpos = bpn.getDataSet("VorgangPositionArchiv");
        IDispatch archvorgangposfields = bpn.getFields(archvorgpos);
        LinkedList<String> adList = getADList();
        bpn.sort(archvorgpos, "ArtNr");
        for (String artnummer : adList) {
            bpn.setRange(archvorgpos, "ArtNr", artnummer, artNrPlusEins(artnummer));
            bpn.first(archvorgpos);
            IDispatch id = bpn.getItem(archvorgangposfields, "ID");
            String lastItem = "";
            String actualItem = bpn.itemAsString(id);
            while (hasnext(lastItem, actualItem)) {
                if (bpn.itemAsString(
                        bpn.getItem(archvorgangposfields, "BelegNr")).startsWith("RE")) {
View Full Code Here

     */
    private String getBelegDatum(IDispatch archvorg, String belegnr) {
        bpn.sort(archvorg, "BelegNr");
        bpn.setRange(archvorg, "BelegNr", belegnr, belegNrPlusEins(belegnr));
        bpn.first(archvorg);
        IDispatch archvorgfields = bpn.getFields(archvorg);
        String toReturn = bpn.itemAsString(bpn.getItem(archvorgfields, "Dat"));
        return toReturn.substring(3);
    }
View Full Code Here

    /**
     * Füllt die Data-Datenbank.
     */
    private void fillArchVorg() {
        IDispatch archvorg = bpn.getDataSet("VorgangArchiv");
        IDispatch archvorgpos = bpn.getDataSet("VorgangPositionArchiv");
        IDispatch archvorgfields = bpn.getFields(archvorg);
        bpn.sort(archvorg, "ArtBelegNr");
        bpn.setRange(archvorg, "Art", "70", "71");
        bpn.first(archvorg);

        IDispatch vorgvorgID = bpn.getItem(archvorgfields, "BelegNr");
        String vorglastItem = "";
        String vorgactualItem = bpn.itemAsString(vorgvorgID);
        while (hasnext(vorglastItem, vorgactualItem)) {
            IDispatch vorgbelegNr = bpn.getItem(archvorgfields, "BelegNr");
            String belegNrString = bpn.itemAsString(vorgbelegNr);
            if (!bpn.itemAsString(bpn.getItem(archvorgfields, "Sel49")).equals("")) {
                fillArchPos(archvorgpos, archvorgfields, belegNrString);
            }
            vorglastItem = bpn.itemAsString(vorgvorgID);
View Full Code Here

     * @param archvorgpos DataSet
     * @param vorgang DataSet
     * @param belegnummer Belegnummer
     */
    private void fillArchPos(IDispatch archvorgpos, IDispatch vorgang, String belegnummer) {
        IDispatch archvorgangposfields = bpn.getFields(archvorgpos);

        bpn.sort(archvorgpos, "Nr");
        bpn.setRange(archvorgpos, "BelegNr", belegnummer, belegNrPlusEins(belegnummer));
        bpn.first(archvorgpos);

        IDispatch posID = bpn.getItem(archvorgangposfields, "ID");
        String lastItem = "";
        String actualItem = bpn.itemAsString(posID);

        while (hasnext(lastItem, actualItem)) {
            addPosDataLine(archvorgangposfields, vorgang);
View Full Code Here

    public BPN() {
        rm = new ReleaseManager();
        try {
            try {
                try {
                    app = new IDispatch(rm, "BpNT.Application");
                    appusable = true;
                } catch (JComException ex) {
                    ErrorHandling.showError("BPN nicht erreichbar.");
                    appusable = false;
                }
View Full Code Here

     *
     * @param name Name des DataSets
     * @return DataSet
     */
    public IDispatch getDataSet(String name) {
        IDispatch toReturn = null;
        try {
            IDispatch dataSetInfos = (IDispatch) app.get("DataSetInfos", new Object[]{name});
            toReturn = (IDispatch) dataSetInfos.method("CreateDataSet", null);
        } catch (JComException ex) {
            ErrorHandling.showError("DataSet " + name + " nicht vorhanden.");
        }
        return toReturn;
    }
View Full Code Here

     *
     * @param dataset DataSet
     * @return Field
     */
    public IDispatch getFields(IDispatch dataset) {
        IDispatch toReturn = null;
        try {
            toReturn = (IDispatch) dataset.get("Fields");
        } catch (JComException ex) {
            ErrorHandling.showError("Fields nicht erreichbar.");
        }
View Full Code Here

     * @param fields Field
     * @param art Itemname
     * @return Item
     */
    public IDispatch getItem(IDispatch fields, String art) {
        IDispatch toReturn = null;
        try {
            toReturn = (IDispatch) fields.get("Item", new Object[]{art});
        } catch (JComException ex) {
            ErrorHandling.showError("Item nicht erreichbar.");
        }
View Full Code Here

     * @return Itemtext
     */
    public String getItemInfo(IDispatch fields, String art) {
        String toReturn = null;
        try {
            IDispatch zwischen = (IDispatch) fields.get("Item", new Object[]{art});
            toReturn = (String) zwischen.get("Text", null);
        } catch (JComException ex) {
            ErrorHandling.showError("ItemInfo nicht erreichbar.");
        }
        return toReturn;
    }
View Full Code Here

TOP

Related Classes of jp.ne.so_net.ga2.no_ji.jcom.ReleaseManager

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.