Rename interfaces

master
Stuart Boston 11 years ago
parent 5a1719c662
commit 6e5873b7af

@ -0,0 +1,32 @@
/*
* Copyright (c) 2004-2015 Stuart Boston
*
* This file is part of TheMovieDB API.
*
* TheMovieDB API is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* TheMovieDB API is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.omertron.themoviedbapi.interfaces;
/**
* Interface to indicate that the object has append to response methods
*
* @author Stuart
* @param <T> Method for Append To Response
*/
public interface AppendToResponse<T> {
boolean hasMethod(T method);
}

@ -19,7 +19,7 @@
*/
package com.omertron.themoviedbapi.interfaces;
public interface IIdentification {
public interface Identification {
int getId();

@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.interfaces;
import com.omertron.themoviedbapi.results.ResultDates;
public interface IWrapperDates {
public interface WrapperDates {
ResultDates getDates();

@ -19,7 +19,7 @@
*/
package com.omertron.themoviedbapi.interfaces;
public interface IWrapperPages {
public interface WrapperPages {
int getPage();

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
@ -29,7 +29,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
*
* @author Stuart.Boston
*/
public class AbstractIdName extends AbstractJsonMapping implements Serializable, IIdentification {
public class AbstractIdName extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -21,10 +21,10 @@ package com.omertron.themoviedbapi.model.account;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import java.io.Serializable;
public class Account extends AbstractJsonMapping implements Serializable, IIdentification {
public class Account extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.model.collection;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.io.Serializable;
import org.apache.commons.lang3.StringUtils;
@ -32,7 +32,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
* @author stuart.boston
*/
@JsonRootName("collection")
public class Collection extends AbstractJsonMapping implements Serializable, IIdentification {
public class Collection extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.model.collection;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.io.Serializable;
@ -30,7 +30,7 @@ import java.util.List;
/**
* @author Stuart
*/
public class CollectionInfo extends AbstractJsonMapping implements Serializable, IIdentification {
public class CollectionInfo extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.model.company;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import java.io.Serializable;
import static org.apache.commons.lang3.StringUtils.EMPTY;
@ -30,7 +30,7 @@ import static org.apache.commons.lang3.StringUtils.EMPTY;
*
* @author Stuart
*/
public class Company extends AbstractJsonMapping implements Serializable, IIdentification {
public class Company extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;
// Properties

@ -24,14 +24,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.omertron.themoviedbapi.enumeration.CreditType;
import com.omertron.themoviedbapi.enumeration.MediaType;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.io.Serializable;
/**
* @author stuart.boston
*/
public class CreditBasic extends AbstractJsonMapping implements Serializable, IIdentification {
public class CreditBasic extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.model.credits;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.io.Serializable;
@ -28,7 +28,7 @@ import java.io.Serializable;
*
* @author Stuart.Boston
*/
public class MediaCredit extends AbstractJsonMapping implements Serializable, IIdentification {
public class MediaCredit extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -23,7 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.omertron.themoviedbapi.enumeration.MediaType;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import java.io.Serializable;
/**
@ -31,7 +31,7 @@ import java.io.Serializable;
*
* @author stuart.boston
*/
public class MediaBasic extends AbstractJsonMapping implements Serializable, IIdentification {
public class MediaBasic extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.model.media;
import com.omertron.themoviedbapi.model.credits.MediaCreditCrew;
import com.omertron.themoviedbapi.model.credits.MediaCreditCast;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.io.Serializable;
import java.util.Collections;
@ -31,7 +31,7 @@ import java.util.List;
/**
* @author stuart.boston
*/
public class MediaCreditList extends AbstractJsonMapping implements Serializable, IIdentification {
public class MediaCreditList extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.model.media;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.io.Serializable;
@ -29,7 +29,7 @@ import java.io.Serializable;
*
* @author Stuart.Boston
*/
public class MediaState extends AbstractJsonMapping implements Serializable, IIdentification {
public class MediaState extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -25,7 +25,7 @@ import com.omertron.themoviedbapi.model.media.AlternativeTitle;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.omertron.themoviedbapi.enumeration.MovieMethod;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import com.omertron.themoviedbapi.model.Genre;
import com.omertron.themoviedbapi.model.Language;
@ -59,7 +59,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
*
* @author stuart.boston
*/
public class MovieInfo extends AbstractJsonMapping implements Serializable, IIdentification {
public class MovieInfo extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -19,14 +19,14 @@
*/
package com.omertron.themoviedbapi.model.network;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.AbstractIdName;
import java.io.Serializable;
/**
* @author stuart.boston
*/
public class Network extends AbstractIdName implements Serializable, IIdentification {
public class Network extends AbstractIdName implements Serializable, Identification {
private static final long serialVersionUID = 4L;
// Nothing to add to base class

@ -20,7 +20,7 @@
package com.omertron.themoviedbapi.model.person;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.io.Serializable;
@ -28,7 +28,7 @@ import java.io.Serializable;
*
* @author Stuart
*/
public class ExternalID extends AbstractJsonMapping implements Serializable, IIdentification {
public class ExternalID extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -22,7 +22,7 @@ package com.omertron.themoviedbapi.model.person;
import com.omertron.themoviedbapi.model.credits.CreditBasic;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import java.io.Serializable;
import java.util.List;
@ -31,7 +31,7 @@ import java.util.List;
* @author stuart.boston
* @param <T>
*/
public class PersonCreditList<T extends CreditBasic> extends AbstractJsonMapping implements Serializable, IIdentification {
public class PersonCreditList<T extends CreditBasic> extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -21,7 +21,7 @@ package com.omertron.themoviedbapi.model.tv;
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import java.io.Serializable;
/**
@ -29,7 +29,7 @@ import java.io.Serializable;
*
* @author stuart.boston
*/
public class TVSeasonBasic extends AbstractJsonMapping implements Serializable, IIdentification {
public class TVSeasonBasic extends AbstractJsonMapping implements Serializable, Identification {
private static final long serialVersionUID = 4L;

@ -19,9 +19,9 @@
*/
package com.omertron.themoviedbapi.results;
import com.omertron.themoviedbapi.interfaces.IWrapperDates;
import com.omertron.themoviedbapi.interfaces.IWrapperPages;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.WrapperDates;
import com.omertron.themoviedbapi.interfaces.WrapperPages;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
@ -29,7 +29,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*
* @author Stuart
*/
public class AbstractWrapperAll extends AbstractWrapperIdPages implements IIdentification, IWrapperPages, IWrapperDates {
public class AbstractWrapperAll extends AbstractWrapperIdPages implements Identification, WrapperPages, WrapperDates {
@JsonProperty("dates")
private ResultDates dates = new ResultDates();

@ -19,7 +19,7 @@
*/
package com.omertron.themoviedbapi.results;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
@ -27,7 +27,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*
* @author Stuart
*/
public class AbstractWrapperId extends AbstractWrapperBase implements IIdentification {
public class AbstractWrapperId extends AbstractWrapperBase implements Identification {
@JsonProperty("id")
private int id;

@ -20,14 +20,14 @@
package com.omertron.themoviedbapi.results;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.omertron.themoviedbapi.interfaces.IWrapperPages;
import com.omertron.themoviedbapi.interfaces.WrapperPages;
/**
* Abstract class to return the results and the id/page info
*
* @author Stuart
*/
public abstract class AbstractWrapperIdPages extends AbstractWrapperId implements IWrapperPages {
public abstract class AbstractWrapperIdPages extends AbstractWrapperId implements WrapperPages {
@JsonProperty("page")
private int page = 0;

@ -23,7 +23,7 @@ import com.omertron.themoviedbapi.model.list.UserList;
import com.omertron.themoviedbapi.model.movie.MovieBasic;
import com.omertron.themoviedbapi.model.tv.TVBasic;
import com.omertron.themoviedbapi.results.ResultList;
import com.omertron.themoviedbapi.interfaces.IIdentification;
import com.omertron.themoviedbapi.interfaces.Identification;
import com.omertron.themoviedbapi.model.media.MediaCreditList;
import com.omertron.themoviedbapi.model.movie.MovieInfo;
import com.omertron.themoviedbapi.model.person.ExternalID;
@ -159,13 +159,13 @@ public class TestSuite {
assertTrue(message + ": Missing cast/crew information", found);
}
public static void testId(ResultList<? extends IIdentification> result, int id, String message) {
public static void testId(ResultList<? extends Identification> result, int id, String message) {
testId(result.getResults(), id, message);
}
public static void testId(List<? extends IIdentification> result, int id, String message) {
public static void testId(List<? extends Identification> result, int id, String message) {
boolean found = false;
for (IIdentification item : result) {
for (Identification item : result) {
if (item.getId() == id) {
found = true;
break;

@ -124,7 +124,7 @@ public class TmdbPeopleTest extends AbstractTests {
*
* @throws MovieDbException
*/
//@Test
@Test
public void testGetPersonInfo() throws MovieDbException {
LOG.info("getPersonInfo");
PersonInfo result;
@ -142,7 +142,7 @@ public class TmdbPeopleTest extends AbstractTests {
*
* @throws com.omertron.themoviedbapi.MovieDbException
*/
//@Test
@Test
public void testGetPersonMovieCredits() throws MovieDbException {
LOG.info("getPersonMovieCredits");
String language = LANGUAGE_DEFAULT;
@ -166,7 +166,7 @@ public class TmdbPeopleTest extends AbstractTests {
*
* @throws com.omertron.themoviedbapi.MovieDbException
*/
//@Test
@Test
public void testGetPersonTVCredits() throws MovieDbException {
LOG.info("getPersonTVCredits");
String language = LANGUAGE_DEFAULT;
@ -190,7 +190,7 @@ public class TmdbPeopleTest extends AbstractTests {
*
* @throws com.omertron.themoviedbapi.MovieDbException
*/
//@Test
@Test
public void testGetPersonCombinedCredits() throws MovieDbException {
LOG.info("getPersonCombinedCredits");
String language = LANGUAGE_DEFAULT;
@ -232,7 +232,7 @@ public class TmdbPeopleTest extends AbstractTests {
*
* @throws com.omertron.themoviedbapi.MovieDbException
*/
//@Test
@Test
public void testGetPersonExternalIds() throws MovieDbException {
LOG.info("getPersonExternalIds");
@ -247,7 +247,7 @@ public class TmdbPeopleTest extends AbstractTests {
*
* @throws com.omertron.themoviedbapi.MovieDbException
*/
//@Test
@Test
public void testGetPersonImages() throws MovieDbException {
LOG.info("getPersonImages");
@ -263,7 +263,7 @@ public class TmdbPeopleTest extends AbstractTests {
*
* @throws com.omertron.themoviedbapi.MovieDbException
*/
//@Test
@Test
public void testGetPersonTaggedImages() throws MovieDbException {
LOG.info("getPersonTaggedImages");
Integer page = null;
@ -284,7 +284,7 @@ public class TmdbPeopleTest extends AbstractTests {
*
* @throws com.omertron.themoviedbapi.MovieDbException
*/
//@Test
@Test
public void testGetPersonChanges() throws MovieDbException {
LOG.info("getPersonChanges");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@ -315,7 +315,7 @@ public class TmdbPeopleTest extends AbstractTests {
*
* @throws com.omertron.themoviedbapi.MovieDbException
*/
//@Test
@Test
public void testGetPersonPopular() throws MovieDbException {
LOG.info("getPersonPopular");
Integer page = null;
@ -332,7 +332,7 @@ public class TmdbPeopleTest extends AbstractTests {
*
* @throws com.omertron.themoviedbapi.MovieDbException
*/
//@Test
@Test
public void testGetPersonLatest() throws MovieDbException {
LOG.info("getPersonLatest");
PersonInfo result = instance.getPersonLatest();

Loading…
Cancel
Save