net.anidb.udp
Class UdpGroupStatusFactory

java.lang.Object
  extended by net.anidb.udp.UdpGroupStatusFactory

public class UdpGroupStatusFactory
extends java.lang.Object

A factory for GroupStatus objects.

Version:
1.0, 26.12.2009
Author:
grizzlyxp (http://anidb.net/perl-bin/animedb.pl?show=userpage&uid=63935)

Method Summary
 java.util.List<GroupStatus> getGroupStatus(long animeId)
          Returns a list of the group status for the anime with the given anime Id.
 java.util.List<GroupStatus> getGroupStatus(long animeId, GroupStatusState state)
          Returns a list of the group status for the anime with the given anime Id and the given state.
static UdpGroupStatusFactory getInstance(UdpConnection conn)
          Returns an instance of this class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UdpGroupStatusFactory getInstance(UdpConnection conn)
Returns an instance of this class.

Parameters:
conn - The connection.
Returns:
The instance.
Throws:
java.lang.IllegalArgumentException - If the connection is null.

getGroupStatus

public java.util.List<GroupStatus> getGroupStatus(long animeId)
                                           throws UdpConnectionException,
                                                  AniDbException

Returns a list of the group status for the anime with the given anime Id.

Parameters:
animeId - The anime Id.
Returns:
The list of the group status.
Throws:
UdpConnectionException - If a connection problem occured.
AniDbException - If a problem with AniDB occured.
See Also:
UdpReturnCodes.NO_GROUPS_FOUND, UdpReturnCodes.NO_SUCH_ANIME

getGroupStatus

public java.util.List<GroupStatus> getGroupStatus(long animeId,
                                                  GroupStatusState state)
                                           throws UdpConnectionException,
                                                  AniDbException

Returns a list of the group status for the anime with the given anime Id and the given state.

Parameters:
animeId - The anime Id.
state - The state.
Returns:
The list of the group status.
Throws:
java.lang.IllegalArgumentException - If the state is null.
UdpConnectionException - If a connection problem occured.
AniDbException - If a problem with AniDB occured.
See Also:
UdpReturnCodes.NO_GROUPS_FOUND, UdpReturnCodes.NO_SUCH_ANIME