Examples of IRosterEntry


Examples of org.eclipse.ecf.presence.roster.IRosterEntry

  CompareWithHandler(IRosterEntry entry) {
    super(entry);
  }

  public Object execute(ExecutionEvent event) throws ExecutionException {
    IRosterEntry selectedEntry = getRosterEntry();
    IRoster roster = selectedEntry.getRoster();
    final IUser remoteUser = roster.getUser();
    ID localId = remoteUser.getID();
    ID remoteId = selectedEntry.getUser().getID();
    IContainer container = (IContainer) roster.getPresenceContainerAdapter().getAdapter(IContainer.class);

    final IResource resource = getResource(event);
    if (resource == null) {
      MessageDialog.openInformation(HandlerUtil.getActiveShell(event), null, Messages.CompareWithHandler_FileNotSelectedError);
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRosterEntry

  SynchronizeWithHandler(IRosterEntry entry) {
    super(entry);
  }

  public Object execute(ExecutionEvent event) throws ExecutionException {
    IRosterEntry selectedEntry = getRosterEntry();
    IRoster roster = selectedEntry.getRoster();
    final IUser remoteUser = roster.getUser();
    final ID localId = remoteUser.getID();
    final ID remoteId = selectedEntry.getUser().getID();
    IContainer container = (IContainer) roster.getPresenceContainerAdapter().getAdapter(IContainer.class);

    final IResource[] resources = getResources(event);
    final RemoteShare share = TeamSynchronization.getShare(container.getID());
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRosterEntry

  }

  public boolean performFinish() {
    ID containerId = page.getContainerId();
    RemoteShare share = TeamSynchronization.getShare(containerId);
    IRosterEntry entry = page.getRosterEntry();
    IUser remoteUser = entry.getUser();
    ID ownId = entry.getRoster().getUser().getID();
    IResource[] resources = page.getSelectedResources();

    RemoteSubscriberParticipant participant = getSubscriberParticipant(share, ownId, remoteUser.getID());
    participant.setResources(resources);
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRosterEntry

   *
   * @see org.eclipse.ecf.presence.ui.roster.AbstractPresenceContributionItem#makeActions()
   */
  protected IAction[] makeActions() {
    IAction action = null;
    final IRosterEntry rosterEntry = getSelectedRosterEntry();
    if (rosterEntry != null) {
      if (initializeChannelFor(getContainerForRosterEntry(rosterEntry)) != null) {
        action = new Action() {
          public void run() {
            sendDataToChannel(rosterEntry);
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRosterEntry

  protected IContributionItem[] getContributionItems() {
    final Object selection = getSelection();
    if (!(selection instanceof IRosterEntry)) {
      return EMPTY_ARRAY;
    }
    final IRosterEntry entry = (IRosterEntry) selection;
    final IContainer container = getContainerForRosterEntry(entry);
    if (container instanceof XMPPContainer) {
      final IContributionItem[] contributions = new IContributionItem[1];
      final ISendFileTransferContainerAdapter ioftca = (ISendFileTransferContainerAdapter) container.getAdapter(ISendFileTransferContainerAdapter.class);
      if (!(ioftca != null && isAvailable(entry)))
        return EMPTY_ARRAY;
      final IAction fileSendAction = new Action() {
        public void run() {
          sendFileToTarget(ioftca, entry.getUser().getID());
        }
      };
      fileSendAction.setText(Messages.XMPPCompoundContributionItem_SEND_FILE);
      fileSendAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FILE));
      contributions[0] = new ActionContributionItem(fileSendAction);
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRosterEntry

    }
  }

  private boolean replace(IRosterItem i1, IRosterItem i2) {
    if (i1 instanceof IRosterEntry) {
      IRosterEntry re1 = (IRosterEntry) i1;
      if (!(i2 instanceof IRosterEntry))
        return false;
      IRosterEntry re2 = (IRosterEntry) i2;
      XMPPID id1 = (XMPPID) re1.getUser().getID();
      XMPPID id2 = (XMPPID) re2.getUser().getID();
      String jid1 = id1.getUsernameAtHost();
      String jid2 = id2.getUsernameAtHost();
      if (jid1.equals(jid2)) {
        String r1 = id1.getResourceName();
        String r2 = id2.getResourceName();
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRosterEntry

    AdditionalClientRosterEntry[] entrys = (AdditionalClientRosterEntry[]) newEntrys
        .toArray(new AdditionalClientRosterEntry[] {});
    if (entrys.length > 0) {
      for (int i = 0; i < entrys.length; i++) {
        if (entrys[i].add) {
          IRosterEntry entry = new org.eclipse.ecf.presence.roster.RosterEntry(
              entrys[i].parent, entrys[i].user,
              entrys[i].presence);
          addUniqueToRoster(new IRosterItem[] { entry });
          fireSetRosterEntry(false, entry);
        } else {
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRosterEntry

      final IRosterGroup localGrp = new org.eclipse.ecf.presence.roster.RosterGroup(
          roster, groupName);
      groups.add(localGrp);
    }
    final IUser user = new User(userID, name);
    IRosterEntry newEntry = null;
    if (groups.size() == 0)
      return new org.eclipse.ecf.presence.roster.RosterEntry(roster,
          user, new org.eclipse.ecf.presence.Presence(
              IPresence.Type.UNAVAILABLE,
              IPresence.Type.UNAVAILABLE.toString(),
              IPresence.Mode.AWAY));
    else
      for (int i = 0; i < groups.size(); i++) {
        final IRosterGroup grp = (IRosterGroup) groups.get(i);
        if (i == 0)
          newEntry = new org.eclipse.ecf.presence.roster.RosterEntry(
              grp, user, null);
        else {
          grp.getEntries().add(newEntry);
          newEntry.getGroups().add(grp);
        }
      }
    return newEntry;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.