public interface PaperCatalogService
Provides an interface for a PaperCatalog service. The purpose of this interface is to expose an implementation of a PaperCatalog as an OSGi service.
To comply with this interface, an implementation must be thread safe and address both the possibility that only a single instance is created and used throughout and that new instances are created as desired.
| Modifier and Type | Method and Description |
|---|---|
boolean |
addNewRollPaper(String name,
String desc,
Length across)
Adds a new roll paper to the collection.
|
boolean |
addNewSheetPaper(String name,
String desc,
Length width,
Length height)
Adds a new sheet paper to the collection.
|
boolean |
addNewTractorPaper(String name,
String desc,
Length across,
Length along)
Adds a new tractor paper to the collection.
|
Paper |
get(String identifier)
Gets a paper by identifier.
|
boolean |
isRemovable(Paper paper)
Returns true if the paper can be removed, false otherwise
|
Collection<Paper> |
list()
Lists all available papers.
|
Collection<Paper> |
list(PaperFilter filter)
Lists available papers that the filter accepts.
|
boolean |
remove(Paper p)
Removes the specified paper from the collection.
|
boolean |
supportsUserPapers()
Returns true if user papers are supported, false otherwise.
|
Paper get(String identifier)
identifier - the identifier of the paperCollection<Paper> list()
Collection<Paper> list(PaperFilter filter)
filter - the filterboolean supportsUserPapers()
addNewSheetPaper(String, String, Length, Length),
addNewRollPaper(String, String, Length),
addNewTractorPaper(String, String, Length, Length),
isRemovable(Paper),
remove(Paper)
should not be used.boolean addNewSheetPaper(String name, String desc, Length width, Length height)
name - the namedesc - the descriptionwidth - the widthheight - the heightboolean addNewTractorPaper(String name, String desc, Length across, Length along)
name - the namedesc - the descriptionacross - the length across the feedalong - the length along the feedboolean addNewRollPaper(String name, String desc, Length across)
name - the namedesc - the descriptionacross - the length across the feedboolean isRemovable(Paper paper)
paper - the paperboolean remove(Paper p)
p - the paper to remove