public class EmbosserCatalog extends Object implements FactoryCatalog<Embosser>, EmbosserCatalogService
Constructor and Description |
---|
EmbosserCatalog()
Creates a new empty instance.
|
Modifier and Type | Method and 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)
|
public EmbosserCatalog()
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.
public void addFactory(EmbosserProvider factory)
factory
- the factory to addpublic void removeFactory(EmbosserProvider factory)
factory
- the factory to removepublic Embosser get(String identifier)
FactoryCatalog
get
in interface FactoryCatalog<Embosser>
identifier
- the identifier for the requested Factorypublic Embosser newEmbosser(String identifier)
EmbosserCatalogService
newEmbosser
in interface EmbosserCatalogService
identifier
- the identifierpublic Collection<EmbosserFactoryProperties> listEmbossers()
EmbosserCatalogService
listEmbossers
in interface EmbosserCatalogService
public Collection<EmbosserFactoryProperties> listEmbossers(EmbosserFilter filter)
EmbosserCatalogService
listEmbossers
in interface EmbosserCatalogService
filter
- the filter