Class AbstractActionManager

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.pdfbox.cos.COSDictionary actionDictionary
      The action dictionary checked by this class
      protected PreflightContext context
      The validation context
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.pdfbox.cos.COSDictionary getActionDictionary()  
      java.lang.String getAdditionalActionKey()  
      protected abstract boolean innerValid()
      This method must be implemented by inherited classes to process specific validation.
      boolean isAdditionalAction()  
      boolean valid()
      Call the valid(boolean) method with the additionalActionAuth set to false.
      boolean valid​(boolean additionalActionAuth)
      Validate an Action dictionary.
      protected boolean validNextActions()
      This method create a list of Action Managers which represent actions in the Next entry of the current action dictionary.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • actionDictionary

        protected org.apache.pdfbox.cos.COSDictionary actionDictionary
        The action dictionary checked by this class
    • Method Detail

      • isAdditionalAction

        public boolean isAdditionalAction()
        Returns:
        the isAdditionalAction
      • getActionDictionary

        public org.apache.pdfbox.cos.COSDictionary getActionDictionary()
        Returns:
        the actionDictionary
      • getAdditionalActionKey

        public java.lang.String getAdditionalActionKey()
        Returns:
        the aaKey
      • validNextActions

        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:
        True if all Next Action are valid, false otherwise.
        Throws:
        ValidationException
      • valid

        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 to know if an additional action is authorized.
        Returns:
        the validation state of the Action dictionary.
        Throws:
        ValidationException
      • innerValid

        protected abstract boolean innerValid()
                                       throws ValidationException
        This method must be implemented by inherited classes to process specific validation.
        Returns:
        True if the action is valid, false otherwise.
        Throws:
        ValidationException