org.foray.core
Class OutputConfig

java.lang.Object
  extended by org.foray.common.Configuration
      extended by org.foray.core.OutputConfig
All Implemented Interfaces:
org.axsl.output.DocumentAreaConfiguration, org.axsl.output.DocumentConfiguration, org.axsl.output.DocumentPdfConfiguration, org.axsl.output.OutputConfiguration

public class OutputConfig
extends Configuration
implements org.axsl.output.DocumentPdfConfiguration, org.axsl.output.DocumentAreaConfiguration

Configuration implementation for those configuration items that are related to a specific Renderer. Note that currently all Renderers use the same class. This allows command-line and configuration-file entries to be collected at startup and placed into a default instance of RenderConfig. In general, renderer-specific configuration options should have names that start with the renderer name (e.g. "pdf"). Renderers that are not interested in options specific to other renderers should simply ignore those options.


Field Summary
 
Fields inherited from class org.foray.common.Configuration
PRECEDENCE_COMMAND_LINE, PRECEDENCE_CONFIG_FILE, PRECEDENCE_DEFAULT
 
Constructor Summary
OutputConfig()
          Constructor.
 
Method Summary
 boolean canUserAnnotate()
           
 boolean canUserCopy()
           
 boolean canUserModify()
           
 boolean canUserPrint()
           
 Charset getCharset()
           
 String getGenericOption(String optionName)
           
 String getName()
          Supplies a name for this configuration.
 String getOwnerPassword()
           
 String[] getPdfFilters()
           
 String getPdfVersion()
           
 String getUserPassword()
           
 boolean isOutputSparse()
           
 boolean parseOption(String key, String value, int precedenceValue)
          Attempt to add the configuration option.
 void setConsistentOutput(Boolean value, int precedenceValue)
          Sets the "consistentOutput" option.
protected  void setDefaults()
          Sets any default configuration values.
 void setFineDetail(Boolean value, int precedenceValue)
          Sets the "fineDetail" option.
 
Methods inherited from class org.foray.common.Configuration
addUnvalidatedOption, dumpConfiguration, getBooleanValue, getIntValue, getListValue, getStringValue, getValue, parseBoolean, parseSpaceDelimitedList, parseURL, parseURLDirectory, parseURLFile, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputConfig

public OutputConfig()
Constructor.

Method Detail

getName

public String getName()
Description copied from class: Configuration
Supplies a name for this configuration.

Specified by:
getName in class Configuration
Returns:
A name for this configuration, suitable to be used in logging messages.

setDefaults

protected void setDefaults()
Description copied from class: Configuration
Sets any default configuration values.

Specified by:
setDefaults in class Configuration

parseOption

public boolean parseOption(String key,
                           String value,
                           int precedenceValue)
                    throws ConfigurationException
Description copied from class: Configuration
Attempt to add the configuration option.

Specified by:
parseOption in class Configuration
Parameters:
key - A string containing the key value for the configuration value.
value - The string containing the configuration value.
precedenceValue - The precedence with which this option should be treated. Entries with a higher precedence value override entries with a lower value.
Returns:
True if the option was successfully added, false if it does not belong in this Configuration implementation.
Throws:
ConfigurationException - For an invalid value for the given key.

isOutputSparse

public boolean isOutputSparse()
Specified by:
isOutputSparse in interface org.axsl.output.DocumentAreaConfiguration

getPdfFilters

public String[] getPdfFilters()
Specified by:
getPdfFilters in interface org.axsl.output.DocumentPdfConfiguration

getOwnerPassword

public String getOwnerPassword()
Specified by:
getOwnerPassword in interface org.axsl.output.DocumentPdfConfiguration

getUserPassword

public String getUserPassword()
Specified by:
getUserPassword in interface org.axsl.output.DocumentPdfConfiguration

canUserPrint

public boolean canUserPrint()
Specified by:
canUserPrint in interface org.axsl.output.DocumentPdfConfiguration

canUserCopy

public boolean canUserCopy()
Specified by:
canUserCopy in interface org.axsl.output.DocumentPdfConfiguration

canUserModify

public boolean canUserModify()
Specified by:
canUserModify in interface org.axsl.output.DocumentPdfConfiguration

canUserAnnotate

public boolean canUserAnnotate()
Specified by:
canUserAnnotate in interface org.axsl.output.DocumentPdfConfiguration

getCharset

public Charset getCharset()
Specified by:
getCharset in interface org.axsl.output.DocumentConfiguration

getPdfVersion

public String getPdfVersion()
Specified by:
getPdfVersion in interface org.axsl.output.DocumentPdfConfiguration

getGenericOption

public String getGenericOption(String optionName)
Specified by:
getGenericOption in interface org.axsl.output.OutputConfiguration

setFineDetail

public void setFineDetail(Boolean value,
                          int precedenceValue)
Sets the "fineDetail" option.

Parameters:
value - The value which should be set.
precedenceValue - The precedence with which this option should be treated.

setConsistentOutput

public void setConsistentOutput(Boolean value,
                                int precedenceValue)
Sets the "consistentOutput" option.

Parameters:
value - The value which should be set.
precedenceValue - The precedence with which this option should be treated.


Copyright © 2017. All rights reserved.