src/net/java/sip/communicator/impl/protocol/jabber/OperationSetServerStoredAccountInfoJabberImpl.java
/**
     * Adds the specified detail to the list of details ready to be saved online
     * for this account. If such a detail already exists its max instance number
     * is consulted and if it allows it - a second instance is added or otherwise
     * and illegal argument exception is thrown. An IllegalArgumentException is
     * also thrown in case the class of the specified detail is not supported by
     * the underlying implementation, i.e. its class name was not returned by the
     * getSupportedDetailTypes() method.
     * <p>
     * @param detail the detail that we'd like registered on the server.
     * <p>
     * @throws IllegalArgumentException if such a detail already exists and its
     * max instances number has been attained or if the underlying
     * implementation does not support setting details of the corresponding
     * class.
     * @throws java.lang.ArrayIndexOutOfBoundsException if the number of
     * instances currently registered by the application is already equal to the
     * maximum number of supported instances (@see getMaxDetailInstances())
     */
Adds the specified detail to the list of details ready to be saved online
for this account. If such a detail already exists its max instance number
is consulted and if it allows it - a second instance is added or otherwise
and illegal argument exception is thrown. An IllegalArgumentException is
also thrown in case the class of the specified detail is not supported by
the underlying implementation, i.e. its class name was not returned by the
getSupportedDetailTypes() method.

@param detail the detail that we'd like registered on the server.

@throws IllegalArgumentException if such a detail already exists and its
max instances number has been attained or if the underlying
implementation does not support setting details of the corresponding
class.
@throws java.lang.ArrayIndexOutOfBoundsException if the number of
instances currently registered by the application is already equal to the
maximum number of supported instances (@see getMaxDetailInstances())
Adds the specified detail to the list of details ready to be saved online for this account . If such a detail already exists its max instance number is consulted and if it allows it - a second instance is added or otherwise and illegal argument exception is thrown . An IllegalArgumentException is also thrown in case the class of the specified detail is not supported by the underlying implementation i . e . its class name was not returned by the getSupportedDetailTypes () method . @param detail the detail that we ' d like registered on the server . @throws IllegalArgumentException if such a detail already exists and its max instances number has been attained or if the underlying implementation does not support setting details of the corresponding class . @throws java . lang . ArrayIndexOutOfBoundsException if the number of instances currently registered by the application is already equal to the maximum number of supported instances ( @see getMaxDetailInstances () )
public void addDetail(ServerStoredDetails.GenericDetail detail)
        throws IllegalArgumentException,
               ArrayIndexOutOfBoundsException
    {
        if (!isDetailClassSupported(detail.getClass())) {
            throw new IllegalArgumentException(
                    "implementation does not support such details " +
                    detail.getClass());
        }
        Iterator<GenericDetail> iter = getDetails(detail.getClass());
        int currentDetailsSize = 0;
        while (iter.hasNext())
        {
            currentDetailsSize++;
            iter.next();
        }
        if (currentDetailsSize > getMaxDetailInstances(detail.getClass()))
        {
            throw new ArrayIndexOutOfBoundsException(
                    "Max count for this detail is already reached");
        }
        infoRetreiver.getCachedContactDetails(uin).add(detail);
    }
public void addDetail ( ServerStoredDetails . GenericDetail detail ) throws IllegalArgumentException , ArrayIndexOutOfBoundsException { if ( ! isDetailClassSupported ( detail . getClass ( ) ) ) { throw new IllegalArgumentException ( "implementation does not support such details " + detail . getClass ( ) ) ; } Iterator < GenericDetail > iter = getDetails ( detail . getClass ( ) ) ; int currentDetailsSize = 0 ; while ( iter . hasNext ( ) ) { currentDetailsSize ++ ; iter . next ( ) ; } if ( currentDetailsSize > getMaxDetailInstances ( detail . getClass ( ) ) ) { throw new ArrayIndexOutOfBoundsException ( "Max count for this detail is already reached" ) ; } infoRetreiver . getCachedContactDetails ( uin ) . add ( detail ) ; }
Adds the specified detail to the list of details ready to be saved online
 for this account.
Adds the specified detail to the list of details ready to be saved online for this account .