@Test public void testGetPDFThumbnailGenerator() throws Exception { ThumbnailGenerator thumbnailPDFGenerator = ThumbnailGeneratorFactory.getThumbnailGenerator(ContentType.PDF, ""); assertTrue(thumbnailPDFGenerator instanceof ThumbnailTextGenerator); }
public static ThumbnailGenerator getThumbnailGenerator(final ContentType contentType, final String colorMapPath) throws Exception { switch(contentType) { case IMAGE: return new ThumbnailImageGenerator(colorMapPath); case PDF: return new ThumbnailTextGenerator(colorMapPath); default : throw new Exception("No thumbnail supported for " + contentType + " content type."); } }
ThumbnailGeneratorFactory { public static ThumbnailGenerator getThumbnailGenerator(final ContentType contentType, final String colorMapPath) throws Exception { switch(contentType) { case IMAGE: return new ThumbnailImageGenerator(colorMapPath); case PDF: return new ThumbnailTextGenerator(colorMapPath); default : throw new Exception("No thumbnail supported for " + contentType + " content type."); } } }
ThumbnailGeneratorFactory { public static ThumbnailGenerator getThumbnailGenerator(final ContentType contentType, final String colorMapPath) throws Exception { switch(contentType) { case IMAGE: return new ThumbnailImageGenerator(colorMapPath); case PDF: return new ThumbnailTextGenerator(colorMapPath); default : throw new Exception("No thumbnail supported for " + contentType + " content type."); } }  }
ThumbnailGeneratorFactory { public static ThumbnailGenerator getThumbnailGenerator(final ContentType contentType, final String colorMapPath) throws Exception { switch(contentType) { case IMAGE: return new ThumbnailImageGenerator(colorMapPath); case PDF: return new ThumbnailTextGenerator(colorMapPath); default : throw new Exception("No thumbnail supported for " + contentType + " content type."); } }  static ThumbnailGenerator getThumbnailGenerator(final ContentType contentType, final String colorMapPath); }
ThumbnailGeneratorFactory { public static ThumbnailGenerator getThumbnailGenerator(final ContentType contentType, final String colorMapPath) throws Exception { switch(contentType) { case IMAGE: return new ThumbnailImageGenerator(colorMapPath); case PDF: return new ThumbnailTextGenerator(colorMapPath); default : throw new Exception("No thumbnail supported for " + contentType + " content type."); } }  static ThumbnailGenerator getThumbnailGenerator(final ContentType contentType, final String colorMapPath);  }