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.PagedMediaWriterFactory
newFactory(String mediaType)
Creates a new paged media writer factory for the specified media type.void
setCreatedWithSPI()
Informs the implementation that it was discovered and instantiated using information collected from a file within theMETA-INF/services
directory.boolean
supportsMediaType(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:PagedMediaWriterFactoryService
Returns true if this instance can create instances for the specified mediaType.- Specified by:
supportsMediaType
in 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:PagedMediaWriterFactoryService
Lists supported media types.- Specified by:
listMediaTypes
in interfacePagedMediaWriterFactoryService
- Returns:
- returns a list of supported media types
-
newFactory
public PagedMediaWriterFactory newFactory(String mediaType)
Description copied from interface:PagedMediaWriterFactoryService
Creates a new paged media writer factory for the specified media type.- Specified by:
newFactory
in interfacePagedMediaWriterFactoryService
- Parameters:
mediaType
- the media type.- Returns:
- returns a new factory
-
setCreatedWithSPI
public void setCreatedWithSPI()
Description copied from interface:PagedMediaWriterFactoryService
Informs the implementation that it was discovered and instantiated using information collected from a file within the
META-INF/services
directory. 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:
setCreatedWithSPI
in interfacePagedMediaWriterFactoryService
-
-