Package org.daisy.dotify.api.embosser
Class EmbosserCatalog
- java.lang.Object
-
- org.daisy.dotify.api.embosser.EmbosserCatalog
-
- All Implemented Interfaces:
EmbosserCatalogService
,FactoryCatalog<Embosser>
public class EmbosserCatalog extends Object implements FactoryCatalog<Embosser>, EmbosserCatalogService
Provides a catalog of Embosser factories.
-
-
Constructor Summary
Constructors Constructor Description EmbosserCatalog()
Creates a new empty instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFactory(EmbosserProvider factory)
Adds a factory (intended for use by the OSGi framework).Embosser
get(String identifier)
Gets the Factory with this identifier.Collection<EmbosserFactoryProperties>
listEmbossers()
Lists embossers.Collection<EmbosserFactoryProperties>
listEmbossers(EmbosserFilter filter)
Lists embossers matching the specified filter.Embosser
newEmbosser(String identifier)
Creates a new embosser with the specified identifier.static EmbosserCatalog
newInstance()
Creates a new EmbosserCatalog and populates it using the SPI (java service provider interface).void
removeFactory(EmbosserProvider factory)
Removes a factory (intended for use by the OSGi framework).
-
-
-
Method Detail
-
newInstance
public static EmbosserCatalog newInstance()
Creates a new EmbosserCatalog and populates it using the SPI (java service provider interface).
In an OSGi context, an instance should be retrieved using the service registry. It will be registered under the EmbosserCatalogService interface.
- Returns:
- returns a new EmbosserCatalog
-
addFactory
public void addFactory(EmbosserProvider factory)
Adds a factory (intended for use by the OSGi framework).- Parameters:
factory
- the factory to add
-
removeFactory
public void removeFactory(EmbosserProvider factory)
Removes a factory (intended for use by the OSGi framework).- Parameters:
factory
- the factory to remove
-
get
public Embosser get(String identifier)
Description copied from interface:FactoryCatalog
Gets the Factory with this identifier.- Specified by:
get
in interfaceFactoryCatalog<Embosser>
- Parameters:
identifier
- the identifier for the requested Factory- Returns:
- returns the Factory with this identifier, or null if none is found
-
newEmbosser
public Embosser newEmbosser(String identifier)
Description copied from interface:EmbosserCatalogService
Creates a new embosser with the specified identifier.- Specified by:
newEmbosser
in interfaceEmbosserCatalogService
- Parameters:
identifier
- the identifier- Returns:
- returns a new embosser, or null if not found
-
listEmbossers
public Collection<EmbosserFactoryProperties> listEmbossers()
Description copied from interface:EmbosserCatalogService
Lists embossers.- Specified by:
listEmbossers
in interfaceEmbosserCatalogService
- Returns:
- returns a list of embossers
-
listEmbossers
public Collection<EmbosserFactoryProperties> listEmbossers(EmbosserFilter filter)
Description copied from interface:EmbosserCatalogService
Lists embossers matching the specified filter.- Specified by:
listEmbossers
in interfaceEmbosserCatalogService
- Parameters:
filter
- the filter- Returns:
- returns a list of embossers
-
-