org.apache.pdfbox.pdmodel.fdf

## Class FDFJavaScript

- java.lang.Object
- - org.apache.pdfbox.pdmodel.fdf.FDFJavaScript

All Implemented Interfaces:
  COSObjectable

    public class FDFJavaScript
    extends Object
    implements COSObjectable

This represents an FDF JavaScript dictionary that is part of the FDF document.

Author:
  Ben Litchfield

### Constructor Summary

Constructors
Constructor and Description
`FDFJavaScript()` Default constructor.
`FDFJavaScript(COSDictionary javaScript)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getAfter()` This will get the javascript that is executed after the import.
`String` `getBefore()` This will get the javascript that is executed before the import.
`COSDictionary` `getCOSObject()` Convert this standard java object to a COS object.
`Map<String,PDActionJavaScript>` `getDoc()` Returns the dictionary's "Doc" entry, that is, a map of key value pairs to be added to the document's JavaScript name tree.
`void` `setAfter(String after)` This will set the javascript code the will get execute after the import.
`void` `setBefore(String before)` This will set the javascript code the will get execute before the import.
`void` `setDoc(Map<String,PDActionJavaScript> map)` Sets the dictionary's "Doc" entry.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FDFJavaScript

    public FDFJavaScript()

Default constructor.

#### FDFJavaScript

    public FDFJavaScript(COSDictionary javaScript)

Constructor.

Parameters:
  `javaScript` - The FDF java script.

### Method Detail

#### getCOSObject

    public COSDictionary getCOSObject()

Convert this standard java object to a COS object.

Specified by:
  `getCOSObject` in interface `COSObjectable`
Returns:
  The cos object that matches this Java object.

#### getBefore

    public String getBefore()

This will get the javascript that is executed before the import.

Returns:
  Some javascript code.

#### setBefore

    public void setBefore(String before)

This will set the javascript code the will get execute before the import.

Parameters:
  `before` - A reference to some javascript code.

#### getAfter

    public String getAfter()

This will get the javascript that is executed after the import.

Returns:
  Some javascript code.

#### setAfter

    public void setAfter(String after)

This will set the javascript code the will get execute after the import.

Parameters:
  `after` - A reference to some javascript code.

#### getDoc

    public Map<String,PDActionJavaScript> getDoc()

Returns the dictionary's "Doc" entry, that is, a map of key value pairs to be added to the document's JavaScript name tree.

Returns:
  Map of named "JavaScript" dictionaries.

#### setDoc

    public void setDoc(Map<String,PDActionJavaScript> map)

Sets the dictionary's "Doc" entry.

Parameters:
  `map` - Map of named "JavaScript" dictionaries.