Class ActionManagerFactory
- java.lang.Object
-
- org.apache.pdfbox.preflight.action.ActionManagerFactory
-
public class ActionManagerFactory extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ActionManagerFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractActionManagercreateActionManager(PreflightContext ctx, org.apache.pdfbox.cos.COSDictionary action, java.lang.String aaKey)Create an instance of ActionManager according to the value of the S entry.java.util.List<AbstractActionManager>getActionManagers(PreflightContext ctx, org.apache.pdfbox.cos.COSDictionary dictionary)This method extract actions from the given dictionary.java.util.List<AbstractActionManager>getNextActions(PreflightContext ctx, org.apache.pdfbox.cos.COSDictionary actionDictionary)Returns all actions contained by the Next entry.
-
-
-
Method Detail
-
getActionManagers
public final java.util.List<AbstractActionManager> getActionManagers(PreflightContext ctx, org.apache.pdfbox.cos.COSDictionary dictionary) throws ValidationException
This method extract actions from the given dictionary. An action is identified by the following entries :- A (Action) : Available in Annotations, Outline items
- OpenAction (OpenAction) : Available in the Catalog dictionary
- AA (Additional Action) : Available in the Catalog dictionary, Annotations, Pages
- Parameters:
ctx- the preflight context.dictionary- the dictionary to retrieve the actions from.- Returns:
- the list of actions from the given dictionary.
- Throws:
ValidationException
-
getNextActions
public final java.util.List<AbstractActionManager> getNextActions(PreflightContext ctx, org.apache.pdfbox.cos.COSDictionary actionDictionary) throws ValidationException
Returns all actions contained by the Next entry. If the action dictionary doesn't have Next action, the result is an empty list.- Parameters:
ctx- the preflight context.actionDictionary- the dictionary to retrieve the actions from.- Returns:
- the list of actions from the given dictionary.
- Throws:
ValidationException
-
createActionManager
protected AbstractActionManager createActionManager(PreflightContext ctx, org.apache.pdfbox.cos.COSDictionary action, java.lang.String aaKey) throws ValidationException
Create an instance of ActionManager according to the value of the S entry. If the type entry isn't Action, a ValidationException will be thrown. If the action type isn't authorized in a PDF/A file, an instance of InvalidAction is returned.- Parameters:
ctx- the preflight context.action- the action dictionary used to instantiate the ActionManageraaKey- the Action identifier if it is an additional action- Returns:
- the ActionManager instance.
- Throws:
ValidationException
-
-