Class DefaultPrinterSpecification
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.helper.DefaultPrinterSpecification
-
- All Implemented Interfaces:
Cloneable
,PrinterSpecification
public class DefaultPrinterSpecification extends Object implements PrinterSpecification, Cloneable
-
-
Constructor Summary
Constructors Constructor Description DefaultPrinterSpecification(String name, String displayName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEncoding(PrinterEncoding encoding)
Object
clone()
boolean
contains(PrinterEncoding encoding)
String
getDisplayName()
PrinterEncoding
getEncoding(String encoding)
Returns the encoding definition for the given java encoding.String
getName()
Returns the name of the encoding mapping.PrinterEncoding[]
getSupportedEncodings()
boolean
isEncodingSupported(String encoding)
Checks whether the given Java-encoding is supported.boolean
isFeatureAvailable(String operationName)
Returns true, if a given operation is supported, false otherwise.void
removeEncoding(PrinterEncoding encoding)
-
-
-
Method Detail
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfacePrinterSpecification
-
getName
public String getName()
Returns the name of the encoding mapping. This is usually the same as the printer model name.- Specified by:
getName
in interfacePrinterSpecification
- Returns:
- the printer model.
-
isEncodingSupported
public boolean isEncodingSupported(String encoding)
Description copied from interface:PrinterSpecification
Checks whether the given Java-encoding is supported.- Specified by:
isEncodingSupported
in interfacePrinterSpecification
- Parameters:
encoding
- the java encoding that should be mapped into a printer specific encoding.- Returns:
- true, if there is a mapping, false otherwise.
-
contains
public boolean contains(PrinterEncoding encoding)
-
getEncoding
public PrinterEncoding getEncoding(String encoding)
Returns the encoding definition for the given java encoding.- Specified by:
getEncoding
in interfacePrinterSpecification
- Parameters:
encoding
- the java encoding that should be mapped into a printer specific encoding.- Returns:
- the printer specific encoding.
- Throws:
IllegalArgumentException
- if the given encoding is not supported.
-
addEncoding
public void addEncoding(PrinterEncoding encoding)
-
removeEncoding
public void removeEncoding(PrinterEncoding encoding)
-
getSupportedEncodings
public PrinterEncoding[] getSupportedEncodings()
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
isFeatureAvailable
public boolean isFeatureAvailable(String operationName)
Returns true, if a given operation is supported, false otherwise.- Specified by:
isFeatureAvailable
in interfacePrinterSpecification
- Parameters:
operationName
- the operation, that should be performed- Returns:
- true, if the printer will be able to perform that operation, false otherwise.
-
-