src/net/java/sip/communicator/impl/protocol/jabber/OperationSetExtendedAuthorizationsJabberImpl.java
/**
     * Send a positive authorization to <tt>contact</tt> thus allowing them to
     * add us to their contact list without needing to first request an
     * authorization.
     * @param contact the <tt>Contact</tt> whom we're granting authorization
     * prior to receiving a request.
     * @throws OperationFailedException if we fail sending the authorization.
     */
Send a positive authorization to contact thus allowing them to
add us to their contact list without needing to first request an
authorization.
@param contact the Contact whom we're granting authorization
prior to receiving a request.
@throws OperationFailedException if we fail sending the authorization.
Send a positive authorization to contact thus allowing them to add us to their contact list without needing to first request an authorization . @param contact the Contact whom we ' re granting authorization prior to receiving a request . @throws OperationFailedException if we fail sending the authorization .
public void explicitAuthorize(Contact contact)
        throws
        OperationFailedException
    {
        opSetPersPresence.assertConnected();
        if( !(contact instanceof ContactJabberImpl) )
            throw new IllegalArgumentException(
                "The specified contact is not an jabber contact." +
                    contact);
        Presence responsePacket = new Presence(Presence.Type.subscribed);
        responsePacket.setTo(((ContactJabberImpl) contact).getAddressAsJid());
        try
        {
            parentProvider.getConnection().sendStanza(responsePacket);
        }
        catch (NotConnectedException | InterruptedException e)
        {
            throw new OperationFailedException(
                "Could not send authorize",
                OperationFailedException.NETWORK_FAILURE,
                e
            );
        }
    }
public void explicitAuthorize ( Contact contact ) throws OperationFailedException { opSetPersPresence . assertConnected ( ) ; if ( ! ( contact instanceof ContactJabberImpl ) ) throw new IllegalArgumentException ( "The specified contact is not an jabber contact." + contact ) ; Presence responsePacket = new Presence ( Presence . Type . subscribed ) ; responsePacket . setTo ( ( ( ContactJabberImpl ) contact ) . getAddressAsJid ( ) ) ; try { parentProvider . getConnection ( ) . sendStanza ( responsePacket ) ; } catch ( NotConnectedException | InterruptedException e ) { throw new OperationFailedException ( "Could not send authorize" , OperationFailedException . NETWORK_FAILURE , e ) ; } }
Send a positive authorization to <tt>contact</tt> thus allowing them to
 add us to their contact list without needing to first request an
 authorization.
Send a positive authorization to <tt > contact< / tt > thus allowing them to add us to their contact list without needing to first request an authorization .