Class PEFMediaWriterFactoryService
- java.lang.Object
-
- org.daisy.dotify.formatter.impl.writer.PEFMediaWriterFactoryService
-
- All Implemented Interfaces:
PagedMediaWriterFactoryService
public class PEFMediaWriterFactoryService extends Object implements PagedMediaWriterFactoryService
Provides a paged media writer factory for PEF.
-
-
Constructor Summary
Constructors Constructor Description PEFMediaWriterFactoryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>listMediaTypes()Lists supported media types.PagedMediaWriterFactorynewFactory(String mediaType)Creates a new paged media writer factory for the specified media type.voidsetCreatedWithSPI()Informs the implementation that it was discovered and instantiated using information collected from a file within theMETA-INF/servicesdirectory.booleansupportsMediaType(String mediaType)Returns true if this instance can create instances for the specified mediaType.
-
-
-
Method Detail
-
supportsMediaType
public boolean supportsMediaType(String mediaType)
Description copied from interface:PagedMediaWriterFactoryServiceReturns true if this instance can create instances for the specified mediaType.- Specified by:
supportsMediaTypein interfacePagedMediaWriterFactoryService- Parameters:
mediaType- a valid Internet media type- Returns:
- returns true if the specified locale is supported, false otherwise
-
listMediaTypes
public Collection<String> listMediaTypes()
Description copied from interface:PagedMediaWriterFactoryServiceLists supported media types.- Specified by:
listMediaTypesin interfacePagedMediaWriterFactoryService- Returns:
- returns a list of supported media types
-
newFactory
public PagedMediaWriterFactory newFactory(String mediaType)
Description copied from interface:PagedMediaWriterFactoryServiceCreates a new paged media writer factory for the specified media type.- Specified by:
newFactoryin interfacePagedMediaWriterFactoryService- Parameters:
mediaType- the media type.- Returns:
- returns a new factory
-
setCreatedWithSPI
public void setCreatedWithSPI()
Description copied from interface:PagedMediaWriterFactoryServiceInforms the implementation that it was discovered and instantiated using information collected from a file within the
META-INF/servicesdirectory. In other words, it was created using SPI (service provider interfaces).This information, in turn, enables the implementation to use the same mechanism to set dependencies as needed.
If this information is not given, an implementation should avoid using SPIs and instead use declarative services for dependency injection as specified by OSGi. Note that this also applies to several newInstance() methods in the Java API.
The class that created an instance with SPI must call this method before putting it to use.
- Specified by:
setCreatedWithSPIin interfacePagedMediaWriterFactoryService
-
-