public class ActionsValidationProcess extends AbstractProcess
{
public void validate(PreflightContext context) throws ValidationException
{
PreflightPath vPath = context.getValidationPath();
if (vPath.isEmpty()) {
return;
}
else if (!vPath.isExpectedType(COSDictionary.class))
{
context.addValidationError(new ValidationError(PreflightConstants.ERROR_ACTION_INVALID_TYPE, "Action validation process needs at least one COSDictionary object"));
}
else
{
COSDictionary actionsDict = (COSDictionary) vPath.peek();
// AA entry is authorized only for Page, in this case A Page is just before the Action Dictionary in the path
boolean aaEntryAuth = ((vPath.size() - vPath.getClosestTypePosition(PDPage.class)) == 2);
PreflightConfiguration config = context.getConfig();
ActionManagerFactory factory = config.getActionFact();
List<AbstractActionManager> la = factory.getActionManagers(context, actionsDict);
for (AbstractActionManager aMng : la)