org.jickr
Class License

java.lang.Object
  extended by org.jickr.License

public class License
extends java.lang.Object

Encapsulates all the information on a License option for Flickr. To get a list of valid license options from Flickr, use the License.getLicenses() method.

See Also:
getLicenses()

Method Summary
 boolean equals(java.lang.Object o)
          Equals function for License options.
static License findByID(java.lang.String id)
          Gets the License option that matches the supplied ID.
 java.lang.String getID()
          Get the ID for this license option.
static java.util.List<License> getLicenses()
          Get a list of license options available.
 java.lang.String getName()
          Get the name of this license option.
 java.net.URL getURL()
          Get the URL for this license option.
 int hashCode()
          Return the HashCode of this License, based on ID.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLicenses

public static java.util.List<License> getLicenses()
                                           throws FlickrException
Get a list of license options available. This response is cached - it's only checked once.

Returns:
A list of License options available.
Throws:
FlickrException - on any error.

findByID

public static License findByID(java.lang.String id)
                        throws FlickrException
Gets the License option that matches the supplied ID.

Parameters:
id - The License Option ID to search for. Must not be null.
Returns:
The license option corresponding to the supplied ID.
Throws:
FlickrException - on any error, including id not found.

getID

public java.lang.String getID()
Get the ID for this license option.

Returns:
ID of the license option.

getName

public java.lang.String getName()
Get the name of this license option.

Returns:
Name of the license option.

getURL

public java.net.URL getURL()
Get the URL for this license option.

Returns:
URL of the license.

equals

public boolean equals(java.lang.Object o)
Equals function for License options. Compares ID values.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Return the HashCode of this License, based on ID.

Overrides:
hashCode in class java.lang.Object
Returns:
int value representing a fairly unique hashcode.