Movie implements Comparable<Movie>, Identifiable, IMovieBasicInformation { public void setPeopleWriters(Collection<String> writers, String source) { if ((MAX_COUNT_WRITER > 0) && (writers != null) && !writers.isEmpty()) { clearPeopleWriters(); int count = 0; for (String writer : writers) { if (addWriter(Movie.UNKNOWN, writer, Movie.UNKNOWN, source)) { count++; if (count == MAX_COUNT_WRITER) { break; } } } } }  void setSkipped(Boolean skipped); boolean isSkipped(); void setMjbVersion(String mjbVersion); @XmlElement String getMjbVersion(); @XmlElement String getMjbGitSHA(); void setMjbGitSHA(String mjbGitSHA); void setMjbGenerationDateString(String mjbGenerationDate); void setMjbGenerationDate(DateTime mjbGenerationDate); @XmlElement String getMjbGenerationDateString(); DateTime getMjbGenerationDate(); void addSet(String set); void addSet(final String set, final Integer order); void addMovieFile(MovieFile movieFile); void addAward(AwardEvent award); boolean addPerson(Filmography person); void removePerson(Filmography person); boolean addPerson(String key, String name, String url, String job, String source); boolean addPerson(String key, String name, String url, String job, String character, String doublage, String source); void removeMovieFile(MovieFile movieFile); boolean hasNewMovieFiles(); void addExtraFile(ExtraFile extraFile); void addExtraFile(ExtraFile extraFile, boolean isNewFile); boolean hasNewExtraFiles(); String getStrippedTitleSort(); @Override int compareTo(Movie anotherMovie); @Deprecated String getAudioCodec(); @Override String getBaseName(); String getBaseFilename(); @XmlElementWrapper(name = "cast") @XmlElement(name = "actor") Collection<String> getCast(); @XmlElementWrapper(name = "writers") @XmlElement(name = "writer") Collection<String> getWriters(); Collection<String> getDidYouKnow(); String getCompany(); String getContainer(); Collection<String> getCountries(); String getCountriesAsString(); Collection<MovieFile> getFiles(); @XmlElementWrapper(name = "extras") @XmlElement(name = "extra") Collection<ExtraFile> getExtraFiles(); @XmlElementWrapper(name = "awards") @XmlElement(name = "award") Collection<AwardEvent> getAwards(); @XmlElementWrapper(name = "people") @XmlElement(name = "person") Collection<Filmography> getPeople(); Collection<String> getPerson(String department); String getCertification(); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getFirst(); MovieFile getFirstFile(); float getFps(); @XmlElementWrapper(name = "genres") @XmlElement(name = "genre") Collection<String> getGenres(); Collection<String> getSetsKeys(); Integer getSetOrder(String set); @Override String getId(String key); Map<String, String> getIdMap(); String getGross(String country); Map<String, String> getGross(); String getOpenWeek(String country); Map<String, String> getOpenWeek(); String getOverrideSource(OverrideFlag overrideFlag); @XmlElement(name = "id") List<MovieId> getMovieIds(); void setMovieIds(List<MovieId> list); @Override String getLanguage(); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getLast(); @XmlElementWrapper(name = "files") @XmlElement(name = "file") Collection<MovieFile> getMovieFiles(); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getNext(); String getPlot(); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getPrevious(); String getReleaseDate(); String getResolution(); int getWidth(); String getRuntime(); @Override int getSeason(); @Override @XmlElement String getTitle(); @Override @XmlElement String getTitleSort(); @Override @XmlElement String getOriginalTitle(); String getVideoOutput(); String getVideoSource(); @Override String getYear(); String getBudget(); String getSubtitles(); void setDirty(DirtyFlag dirtyType, boolean dirty); void setDirty(DirtyFlag dirtyType); void setDirty(boolean dirty); @XmlTransient boolean isDirty(); String showDirty(); Set<DirtyFlag> getDirty(); void clearDirty(); boolean isDirty(DirtyFlag dirtyType); @XmlAttribute(name = "isTV") @Override boolean isTVShow(); @XmlTransient boolean isBluray(); @XmlTransient boolean isDVD(); @XmlTransient boolean isFile(); @XmlTransient boolean isHD(); @XmlTransient boolean isHD1080(); @XmlTransient boolean is3D(); void setBaseName(String baseName); void setBaseFilename(String baseFilename); void addDidYouKnow(String fact); void setDidYouKnow(List<String> facts); void clearDidYouKnow(); void clearAwards(); boolean addActor(String actor, String source); boolean addActor(String actorKey, String actorName, String character, String actorUrl, String doublage, String source); void setCast(Collection<String> cast, String source); void setPeopleCast(Collection<String> cast, String source); void clearCast(); void clearPeopleCast(); boolean addWriter(String writer, String source); boolean addWriter(String writerKey, String name, String writerUrl, String source); void setWriters(Collection<String> writers, String source); void setPeopleWriters(Collection<String> writers, String source); void clearWriters(); void clearPeopleWriters(); void setCompany(String company, String source); void setContainer(String container, String source); void addCountry(final String country, String source); void setCountries(final Collection<String> countries, String source); void setCountries(final String countries, String source); String getDirector(); Collection<String> getDirectors(); void setDirector(String director, String source); void setDirectors(Collection<String> directors, String source); void setPeopleDirectors(Collection<String> directors, String source); void clearDirectors(); void clearPeopleDirectors(); boolean addDirector(String director, String source); boolean addDirector(String key, String name, String URL, String source); void setFirst(String first); void setFps(float fps, String source); void setGenres(Collection<String> genres, String source); void setSets(Map<String, Integer> sets); Map<String, Integer> getSets(); @Override void setId(final String key, final String id); void setId(String key, int id); void setGross(String country, String value); void setGross(Map<String, String> gross); void setOpenWeek(String country, String value); void setOpenWeek(Map<String, String> openweek); void setOverrideSource(OverrideFlag flag, String source); void setLanguage(String language, String source); void setCertification(String certification, String source); void setLast(String last); void setMovieFiles(Collection<MovieFile> movieFiles); void setExtraFiles(Collection<ExtraFile> extraFiles); void setAwards(Collection<AwardEvent> awards); void setPeople(Collection<Filmography> people); void setNext(String next); void setPlot(String plot, String source); void setPlot(String plot, String source, boolean trimToLength); String getOutline(); void setOutline(String outline, String source); void setOutline(String outline, String source, boolean trimToLength); void setPrevious(String previous); int getRating(); int getRating(String site); Map<String, Integer> getRatings(); void addRating(String site, int rating); void setRatings(Map<String, Integer> ratings); void setReleaseDate(final String releaseDate, String source); void setResolution(String resolution, String source); void setResolution(String width, String height, String source); void setRuntime(String runtime, String source); void setSubtitles(String subtitles); void setTitle(String title, String source); void setTitleSort(final String title); void setOriginalTitle(String originalTitle, String source); @Deprecated String getVideoCodec(); void setVideoOutput(String videoOutput, String source); void setVideoSource(String videoSource, String source); void setYear(String year, String source); void setBudget(String budget); String getQuote(); void setQuote(String quote, String source); @XmlTransient File getFile(); void setFile(File file); @XmlTransient File getContainerFile(); void setContainerFile(File containerFile); long getLastModifiedTimestamp(); @Override String toString(); void setExtra(boolean extra); boolean canHaveTrailers(); void setTrailerExchange(Boolean trailerExchange); void setTrailerLastScan(String lastScan); void setTrailerLastScan(long lastScan); long getTrailerLastScan(); @XmlAttribute(name = "isExtra") boolean isExtra(); @XmlJavaTypeAdapter(BooleanYesNoAdapter.class) @Override Boolean isTrailerExchange(); void setMovieType(String movieType); String getMovieType(); void setFormatType(String formatType); String getFormatType(); void setVideoType(String videoType); String getVideoType(); String getLibraryPath(); void setLibraryPath(String libraryPath); @Deprecated String getAudioChannels(); int getTop250(); void setTop250(String top250, String source); void setTop250(int top250, String source); String getLibraryDescription(); void setLibraryDescription(String libraryDescription); long getPrebuf(); void setPrebuf(long prebuf); @XmlTransient boolean isScrapeLibrary(); void setScrapeLibrary(boolean scrapeLibrary); static void addSortIgnorePrefixes(String prefix); void mergeFileNameDTO(MovieFileNameDTO dto); @XmlAttribute(name = "isSet") @Override boolean isSetMaster(); void setSetMaster(boolean setMaster); @XmlAttribute(name = "setSize") int getSetSize(); void setSetSize(final int size); synchronized void addFileDate(Date fileDate); synchronized void setFileDate(Date fileDate); Date getFileDate(); void setFileSize(long fileSize); long getFileSize(); String getFileSizeString(); void setAspectRatio(String aspectRatio, String source); String getAspectRatio(); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getPosterURL(); void setPosterURL(String posterURL); @XmlElement(name = "posterFile") @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getPosterFilename(); void setPosterFilename(String posterFilename); @XmlElement(name = "detailPosterFile") @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getDetailPosterFilename(); void setDetailPosterFilename(String detailPosterFilename); @XmlElement(name = "thumbnail") @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getThumbnailFilename(); void setThumbnailFilename(String thumbnailFilename); @XmlElement(name = "footer") @XmlJavaTypeAdapter(UrlCodecAdapter.class) List<String> getFooterFilename(); void setFooterFilename(final String footerFilename, Integer inx); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getFanartURL(); void setFanartURL(String fanartURL); @XmlElement(name = "fanartFile") @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getFanartFilename(); void setFanartFilename(String fanartFilename); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getBannerURL(); void setBannerURL(String bannerURL); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getBannerFilename(); void setBannerFilename(String bannerFilename); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getWideBannerFilename(); void setWideBannerFilename(String wideBannerFilename); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getClearLogoURL(); void setClearLogoURL(String clearLogoURL); @XmlElement(name = "clearLogoFile") @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getClearLogoFilename(); void setClearLogoFilename(String clearLogoFilename); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getClearArtURL(); void setClearArtURL(String clearArtURL); @XmlElement(name = "clearArtFile") @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getClearArtFilename(); void setClearArtFilename(String clearArtFilename); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getTvThumbURL(); void setTvThumbURL(String tvThumbURL); @XmlElement(name = "tvThumbFile") @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getTvThumbFilename(); void setTvThumbFilename(String tvThumbFilename); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getSeasonThumbURL(); void setSeasonThumbURL(String seasonThumbURL); @XmlElement(name = "seasonThumbFile") @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getSeasonThumbFilename(); void setSeasonThumbFilename(String seasonThumbFilename); @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getMovieDiscURL(); void setMovieDiscURL(String movieDiscURL); @XmlElement(name = "movieDiscFile") @XmlJavaTypeAdapter(UrlCodecAdapter.class) String getMovieDiscFilename(); void setMovieDiscFilename(String movieDiscFilename); Map<String, String> getIndexes(); void addIndex(String key, String index); void setIndexes(Map<String, String> indexes); String getTagline(); void setTagline(String tagline, String source); @XmlElement(name = "isWatched") boolean isWatched(); @XmlTransient boolean isWatchedNFO(); @XmlTransient boolean isWatchedFile(); void setWatchedNFO(boolean watched); void setWatchedFile(boolean watched); long getWatchedDate(); String getShowStatus(); void setShowStatus(String showStatus); void setMovieScanner(MovieDatabasePlugin movieScanner); @XmlTransient MovieDatabasePlugin getMovieScanner(); static Movie newInstance(Movie aMovie); Set<Codec> getCodecs(); void setCodecs(Set<Codec> codecs); void addCodec(final Codec newCodec); static List<String> getSortIgnorePrefixes(); boolean skipOnlineScan(); boolean skipOnlineScan(String id); static final String UNKNOWN; static final String SOURCE_FILENAME; static final String NOTRATED; static final String REMOVE; static final String TYPE_MOVIE; static final String TYPE_TVSHOW; static final String TYPE_UNKNOWN; static final String TYPE_VIDEO_UNKNOWN; static final String TYPE_VIDEO_HD; static final String TYPE_BLURAY; static final String TYPE_DVD; static final String TYPE_FILE; static final String TYPE_PERSON; static final String SPACE_SLASH_SPACE; }
@Test public void testSetPeopleWriters() { LOG.info("testSetPeopleWriters"); List<String> writers = createList("Writer", WRITER_MAX); Movie movie = new Movie(); movie.setPeopleWriters(writers, ImdbPlugin.IMDB_PLUGIN_ID); Collection<String> people = movie.getPerson(Filmography.DEPT_WRITING); assertEquals("Wrong number of writers returned", WRITER_MAX, people.size()); }