org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.helper
Class DefaultPrinterSpecification

java.lang.Object
  extended by 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
DefaultPrinterSpecification(String name, String displayName)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPrinterSpecification

public DefaultPrinterSpecification(String name,
                                   String displayName)
Method Detail

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface PrinterSpecification

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 interface PrinterSpecification
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 interface PrinterSpecification
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 interface PrinterSpecification
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 class Object
Throws:
CloneNotSupportedException

isFeatureAvailable

public boolean isFeatureAvailable(String operationName)
Returns true, if a given operation is supported, false otherwise.

Specified by:
isFeatureAvailable in interface PrinterSpecification
Parameters:
operationName - the operation, that should be performed
Returns:
true, if the printer will be able to perform that operation, false otherwise.