Top Fields Constructors Methods
org.apache.pdfbox.preflight.action

public abstract Class AbstractActionManager

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.pdfbox.preflight.action.GoToAction, org.apache.pdfbox.preflight.action.HideAction, org.apache.pdfbox.preflight.action.InvalidAction, org.apache.pdfbox.preflight.action.NamedAction, org.apache.pdfbox.preflight.action.SubmitAction, org.apache.pdfbox.preflight.action.ThreadAction, org.apache.pdfbox.preflight.action.UndefAction, org.apache.pdfbox.preflight.action.UriAction
Static Imports
org.apache.pdfbox.preflight.PreflightConstants.ERROR_ACTION_FORBIDDEN_ADDITIONAL_ACTION

Field Summary

Modifier and TypeField and Description
private String
aaKey

Action name in a Additional Action dictionary

protected COSDictionary
actionDictionary

The action dictionary checked by this class

private ActionManagerFactory
actionFact

ActionManager factory used to create new ActionManager

protected PreflightContext
context

The validation context

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractActionManager(ActionManagerFactory
Instance of ActionManagerFactory used to create ActionManager to check Next actions.
amFact
,
COSDictionary
the COSDictionary of the action wrapped by this class.
adict
,
PreflightContext
the validation context .
ctx
,
String
The name of the key which identify the action in a additional action dictionary.
aaKey
)

Method Summary

Modifier and TypeMethod and Description
public COSDictionary

Returns:

the actionDictionary
getActionDictionary
()

public String

Returns:

the aaKey
getAdditionalActionKey
()

protected abstract boolean

Returns:

True if the action is valid, false otherwise.
innerValid
()

This method must be implemented by inherited classes to process specific validation.

public boolean

Returns:

the isAdditionalAction
isAdditionalAction
()

public boolean

Returns:

the validation state.
valid
()

Call the AbstractActionManager#valid(boolean) method with the additionalActionAuth set to false.

public boolean

Returns:

the validation state of the Action dictionary.
valid
(boolean
boolean to know if an additional action is authorized.
additionalActionAuth
)

Validate an Action dictionary.

protected boolean

Returns:

True if all Next Action are valid, false otherwise.
validNextActions
()

This method create a list of Action Managers which represent actions in the Next entry of the current action dictionary.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aaKeyback to summary
private String aaKey

Action name in a Additional Action dictionary

actionDictionaryback to summary
protected COSDictionary actionDictionary

The action dictionary checked by this class

actionFactback to summary
private ActionManagerFactory actionFact

ActionManager factory used to create new ActionManager

contextback to summary
protected PreflightContext context

The validation context

Constructor Detail

AbstractActionManagerback to summary
pack-priv AbstractActionManager(ActionManagerFactory amFact, COSDictionary adict, PreflightContext ctx, String aaKey)
Parameters
amFact:ActionManagerFactory

Instance of ActionManagerFactory used to create ActionManager to check Next actions.

adict:COSDictionary

the COSDictionary of the action wrapped by this class.

ctx:PreflightContext

the validation context .

aaKey:String

The name of the key which identify the action in a additional action dictionary.

Method Detail

getActionDictionaryback to summary
public COSDictionary getActionDictionary()
Returns:COSDictionary

the actionDictionary

getAdditionalActionKeyback to summary
public String getAdditionalActionKey()
Returns:String

the aaKey

innerValidback to summary
protected abstract boolean innerValid() throws ValidationException

This method must be implemented by inherited classes to process specific validation.

Returns:boolean

True if the action is valid, false otherwise.

isAdditionalActionback to summary
public boolean isAdditionalAction()
Returns:boolean

the isAdditionalAction

validback to summary
public boolean valid() throws ValidationException

Call the AbstractActionManager#valid(boolean) method with the additionalActionAuth set to false.

Returns:boolean

the validation state.

validback to summary
public boolean valid(boolean additionalActionAuth) throws ValidationException

Validate an Action dictionary. Return false if the dictionary is invalid (ex : missing key). If the ActionManager represents an AdditionalAction, this method returns false and updates the error list when the additionalActionAuth parameter is set to false. This method call the innerValid method to process specific checks according to the action type. If innerValid successes, all actions contained in the Next entry of the Action dictionary are validated.

Parameters
additionalActionAuth:boolean

boolean to know if an additional action is authorized.

Returns:boolean

the validation state of the Action dictionary.

validNextActionsback to summary
protected boolean validNextActions() throws ValidationException

This method create a list of Action Managers which represent actions in the Next entry of the current action dictionary. For each Next Action, the innerValid is called and the method returns false if a validation fails.

Returns:boolean

True if all Next Action are valid, false otherwise.