src/net/java/sip/communicator/impl/protocol/jabber/OperationSetUserSearchJabberImpl.java
/**
     * Performs user search for the searched string and returns the JIDs of the
     * found contacts.
     *
     * @param searchedString the text we want to query the server.
     * @return the list of found JIDs
     */
Performs user search for the searched string and returns the JIDs of the
found contacts.

@param searchedString the text we want to query the server.
@return the list of found JIDs
Performs user search for the searched string and returns the JIDs of the found contacts . @param searchedString the text we want to query the server . @return the list of found JIDs
public List<String> search(String searchedString)
    {
        ReportedData data = null;
        try
        {
            Form form = searchManager.getSearchForm(serviceName);
            data = searchManager.getSearchResults(form, serviceName);
        }
        catch (XMPPException
            | NotConnectedException
            | InterruptedException
            | NoResponseException e)
        {
           logger.error(e);
           return null;
        }
        if(data == null)
        {
            logger.error("No data have been received from server.");
            return null;
        }
        List<Column> columns = data.getColumns();
        List<Row> rows = data.getRows();
        if(columns == null || rows == null)
        {
            logger.error("The received data is corrupted.");
            return null;
        }
        Column jidColumn = null;
        for (Column tmpCollumn : columns)
        {
            if(tmpCollumn.getType().equals(FormField.Type.jid_single))
            {
                jidColumn = tmpCollumn;
                break;
            }
        }
        if(jidColumn == null)
        {
            logger.error("No jid collumn provided by the server.");
            return null;
        }
        List<String> result = new ArrayList<>();
        for (Row row : rows)
        {
            result.add(row.getValues(jidColumn.getVariable()).get(0));
        }
        return result;
    }
public List < String > search ( String searchedString ) { ReportedData data = null ; try { Form form = searchManager . getSearchForm ( serviceName ) ; data = searchManager . getSearchResults ( form , serviceName ) ; } catch ( XMPPException | NotConnectedException | InterruptedException | NoResponseException e ) { logger . error ( e ) ; return null ; } if ( data == null ) { logger . error ( "No data have been received from server." ) ; return null ; } List < Column > columns = data . getColumns ( ) ; List < Row > rows = data . getRows ( ) ; if ( columns == null || rows == null ) { logger . error ( "The received data is corrupted." ) ; return null ; } Column jidColumn = null ; for ( Column tmpCollumn : columns ) { if ( tmpCollumn . getType ( ) . equals ( FormField . Type . jid_single ) ) { jidColumn = tmpCollumn ; break ; } } if ( jidColumn == null ) { logger . error ( "No jid collumn provided by the server." ) ; return null ; } List < String > result = new ArrayList < > ( ) ; for ( Row row : rows ) { result . add ( row . getValues ( jidColumn . getVariable ( ) ) . get ( 0 ) ) ; } return result ; }
Performs user search for the searched string and returns the JIDs of the
 found contacts.
Performs user search for the searched string and returns the JIDs of the found contacts .