Ejemplo n.º 1
0
  private void updateJoaUtil() {

    final long timeout = 10 * 1000;
    final long t1 = System.currentTimeMillis();

    synchronized (OfficeAddin.class) {
      while (true) {

        if (joaUtil != null) {
          break;
        }

        CoAppType app = getApplication();
        if (app == null) {
          break;
        }
        Object disp = app._get("COMAddIns");
        if (disp == null) {
          break;
        }
        COMAddIns addins = Dispatch.as(disp, COMAddIns.class);
        if (addins == null) {
          break;
        }

        COMAddIn addin = addins.Item("JoaUtilAddin.Class");
        if (addin != null) {
          if (!addin.getConnect()) {
            addin.setConnect(Boolean.TRUE);
          }
          IJoaUtilAddin x = Dispatch.as(addin.getObject(), IJoaUtilAddin.class);
          joaUtil = x;
          OfficeAddin.class.notifyAll();

          /// -- break while(true)
          break;
        } else {
          try {
            OfficeAddin.class.wait(500);
          } catch (InterruptedException e) {
            e.printStackTrace();
            break;
          }
        }

        long t2 = System.currentTimeMillis();
        if (t1 + timeout >= t2) {
          break;
        }
      }
    }
  }
Ejemplo n.º 2
0
 @DeclDISPID(64418)
 public CalendarSharing GetCalendarExporter() throws ComException {
   final Object obj = this._dispatchCall(64418, "GetCalendarExporter", DISPATCH_METHOD, null);
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(CalendarSharing.class);
 }
Ejemplo n.º 3
0
 @DeclDISPID(64346)
 public OrderFields getSortFields() throws ComException {
   final Object obj = this._dispatchCall(64346, "SortFields", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(OrderFields.class);
 }
Ejemplo n.º 4
0
 @DeclDISPID(63008)
 public TaskItem Assign() throws ComException {
   final Object obj = this._dispatchCall(63008, "Assign", DISPATCH_METHOD, null);
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(TaskItem.class);
 }
Ejemplo n.º 5
0
 @DeclDISPID(81)
 public _NavigationFolder Item(final Object Index) throws ComException {
   assert (Index != null);
   final Object obj = this._dispatchCall(81, "Item", DISPATCH_METHOD, null, Index);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._NavigationFolderImpl.class);
 }
Ejemplo n.º 6
0
 @DeclDISPID(64421)
 public com.wilutions.mslib.outlook.Categories getCategories() throws ComException {
   final Object obj = this._dispatchCall(64421, "Categories", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(com.wilutions.mslib.outlook.Categories.class);
 }
Ejemplo n.º 7
0
 @DeclDISPID(64265)
 public com.wilutions.mslib.outlook.Rules GetRules() throws ComException {
   final Object obj = this._dispatchCall(64265, "GetRules", DISPATCH_METHOD, null);
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(com.wilutions.mslib.outlook.Rules.class);
 }
Ejemplo n.º 8
0
 @DeclDISPID(64253)
 public PropertyAccessor getPropertyAccessor() throws ComException {
   final Object obj = this._dispatchCall(64253, "PropertyAccessor", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(PropertyAccessor.class);
 }
Ejemplo n.º 9
0
 @DeclDISPID(64209)
 public Account getSendUsingAccount() throws ComException {
   final Object obj = this._dispatchCall(64209, "SendUsingAccount", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(Account.class);
 }
Ejemplo n.º 10
0
 @DeclDISPID(64217)
 public Store getStore() throws ComException {
   final Object obj = this._dispatchCall(64217, "Store", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(Store.class);
 }
Ejemplo n.º 11
0
 @DeclDISPID(0)
 public com.wilutions.mslib.uccollaborationlib.IParticipant getItem(final Integer _index)
     throws ComException {
   assert (_index != null);
   final Object obj = this._dispatchCall(0, "Item", DISPATCH_PROPERTYGET, null, _index);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.uccollaborationlib.impl.IParticipantImpl.class);
 }
Ejemplo n.º 12
0
 @DeclDISPID(64450)
 public NavigationFolder Add(final MAPIFolder Folder) throws ComException {
   final Object obj =
       this._dispatchCall(64450, "Add", DISPATCH_METHOD, null, Dispatch.param(Folder));
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(NavigationFolder.class);
 }
Ejemplo n.º 13
0
 @DeclDISPID(63510)
 public UserDefinedProperties getUserDefinedProperties() throws ComException {
   final Object obj =
       this._dispatchCall(63510, "UserDefinedProperties", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(UserDefinedProperties.class);
 }
Ejemplo n.º 14
0
 @DeclDISPID(12545)
 public _Explorer GetExplorer(final Object DisplayMode) throws ComException {
   assert (DisplayMode != null);
   final Object obj =
       this._dispatchCall(12545, "GetExplorer", DISPATCH_METHOD, null, Variant.param(DisplayMode));
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._ExplorerImpl.class);
 }
Ejemplo n.º 15
0
 @DeclDISPID(61490)
 public MAPIFolder CopyTo(final MAPIFolder DestinationFolder) throws ComException {
   final Object obj =
       this._dispatchCall(
           61490, "CopyTo", DISPATCH_METHOD, null, Dispatch.param(DestinationFolder));
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl.MAPIFolderImpl.class);
 }
Ejemplo n.º 16
0
 @DeclDISPID(64621)
 public com.wilutions.mslib.outlook.MAPIFolder GetDefaultFolder(
     final com.wilutions.mslib.outlook.OlDefaultFolders FolderType) throws ComException {
   assert (FolderType != null);
   final Object obj =
       this._dispatchCall(64621, "GetDefaultFolder", DISPATCH_METHOD, null, FolderType.value);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl.MAPIFolderImpl.class);
 }
Ejemplo n.º 17
0
 @DeclDISPID(61490)
 public View Copy(final String Name, final OlViewSaveOption SaveOption) throws ComException {
   assert (Name != null);
   assert (SaveOption != null);
   final Object obj =
       this._dispatchCall(61490, "Copy", DISPATCH_METHOD, null, Name, SaveOption.value);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl.ViewImpl.class);
 }
Ejemplo n.º 18
0
 @DeclDISPID(1610874886)
 public CommandBarControl Copy(final Object Bar, final Object Before) throws ComException {
   assert (Bar != null);
   assert (Before != null);
   final Object obj =
       this._dispatchCall(
           1610874886, "Copy", DISPATCH_METHOD, null, Variant.param(Bar), Variant.param(Before));
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.office.impl.CommandBarControlImpl.class);
 }
Ejemplo n.º 19
0
 @DeclDISPID(2)
 public com.wilutions.mslib.office.SmartArtNode AddNode(
     final com.wilutions.mslib.office.MsoSmartArtNodePosition Position,
     final com.wilutions.mslib.office.MsoSmartArtNodeType Type)
     throws ComException {
   assert (Position != null);
   assert (Type != null);
   final Object obj =
       this._dispatchCall(2, "AddNode", DISPATCH_METHOD, null, Position.value, Type.value);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.office.impl.SmartArtNodeImpl.class);
 }
Ejemplo n.º 20
0
 @DeclDISPID(63009)
 public TaskItem Respond(
     final OlTaskResponse Response, final Object fNoUI, final Object fAdditionalTextDialog)
     throws ComException {
   assert (Response != null);
   assert (fNoUI != null);
   assert (fAdditionalTextDialog != null);
   final Object obj =
       this._dispatchCall(
           63009, "Respond", DISPATCH_METHOD, null, Response.value, fNoUI, fAdditionalTextDialog);
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(TaskItem.class);
 }
Ejemplo n.º 21
0
 @DeclDISPID(64285)
 public Table GetTable(final Object Filter, final Object TableContents) throws ComException {
   assert (Filter != null);
   assert (TableContents != null);
   final Object obj =
       this._dispatchCall(
           64285,
           "GetTable",
           DISPATCH_METHOD,
           null,
           Variant.param(Filter),
           Variant.param(TableContents));
   if (obj == null) return null;
   final Dispatch disp = (Dispatch) obj;
   return disp.as(Table.class);
 }
Ejemplo n.º 22
0
 @DeclDISPID(64264)
 public _StorageItem GetStorage(
     final String StorageIdentifier, final OlStorageIdentifierType StorageIdentifierType)
     throws ComException {
   assert (StorageIdentifier != null);
   assert (StorageIdentifierType != null);
   final Object obj =
       this._dispatchCall(
           64264,
           "GetStorage",
           DISPATCH_METHOD,
           null,
           StorageIdentifier,
           StorageIdentifierType.value);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._StorageItemImpl.class);
 }
Ejemplo n.º 23
0
 @DeclDISPID(64596)
 public _Conversation GetConversation() throws ComException {
   final Object obj = this._dispatchCall(64596, "GetConversation", DISPATCH_METHOD, null);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._ConversationImpl.class);
 }
Ejemplo n.º 24
0
 @DeclDISPID(64187)
 public Conflicts getConflicts() throws ComException {
   final Object obj = this._dispatchCall(64187, "Conflicts", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl.ConflictsImpl.class);
 }
Ejemplo n.º 25
0
 @DeclDISPID(64009)
 public ItemProperties getItemProperties() throws ComException {
   final Object obj = this._dispatchCall(64009, "ItemProperties", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl.ItemPropertiesImpl.class);
 }
Ejemplo n.º 26
0
 @DeclDISPID(61604)
 public RecurrencePattern GetRecurrencePattern() throws ComException {
   final Object obj = this._dispatchCall(61604, "GetRecurrencePattern", DISPATCH_METHOD, null);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl.RecurrencePatternImpl.class);
 }
Ejemplo n.º 27
0
 @DeclDISPID(63508)
 public Recipients getRecipients() throws ComException {
   final Object obj = this._dispatchCall(63508, "Recipients", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl.RecipientsImpl.class);
 }
Ejemplo n.º 28
0
 @DeclDISPID(63511)
 public Actions getActions() throws ComException {
   final Object obj = this._dispatchCall(63511, "Actions", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl.ActionsImpl.class);
 }
Ejemplo n.º 29
0
 @DeclDISPID(61451)
 public _NameSpace getSession() throws ComException {
   final Object obj = this._dispatchCall(61451, "Session", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._NameSpaceImpl.class);
 }
Ejemplo n.º 30
0
 @DeclDISPID(61502)
 public _Inspector getGetInspector() throws ComException {
   final Object obj = this._dispatchCall(61502, "GetInspector", DISPATCH_PROPERTYGET, null);
   if (obj == null) return null;
   return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._InspectorImpl.class);
 }