Class FacturXSettings

  • All Implemented Interfaces:
    NodeParser, com.inet.report.ReferenceHolder, java.io.Serializable

    public class FacturXSettings
    extends java.lang.Object
    implements java.io.Serializable, com.inet.report.ReferenceHolder, NodeParser
    Settings for the FacturX plugin to generate a PDF file with a FacturX attachment.
    Since:
    20.10
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addReferencedObject​(com.inet.report.ReferencedObject reference)
      FOR INTERNAL USE ONLY
      void clearMappings()
      Removes all mappings between FacturX nodes and fields from the report.
      GroupField getDataGroup()
      Get the group for which a line in the invoice should be created.
      java.util.HashMap<java.lang.String,​Field> getFields()
      Provides a map with all available field mappings.
      com.inet.report.renderer.factur.model.ProfileLevel getProfile()
      Get the profile of the FacturX.
      int getRealReferencedObjectCount()
      FOR INTERNAL USE ONLY
      int getReferencedObjectCount()
      FOR INTERNAL USE ONLY
      com.inet.report.ReferencedObject[] getReferencedObjects()
      FOR INTERNAL USE ONLY
      boolean isDOMParser()
      FOR INTERNAL USE ONLY Internal method for reading report XML
      void parseDOM​(org.w3c.dom.Node node, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      NodeParser parseElement​(com.inet.report.parser.XMLTag group, java.lang.String tag, org.xml.sax.Attributes atts, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      void parseEndElement​(com.inet.report.parser.XMLTag group, java.lang.String tag, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      void parseText​(java.lang.String text, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      void put​(com.inet.report.renderer.factur.model.FacturModelNode node, Field field)
      Put a mapping between a FacturX node and a field from the report.
      void remove​(com.inet.report.renderer.factur.model.FacturModelNode node)
      Remove a mapping between a FacturX node and a field from the report.
      void removeReferencedObject​(com.inet.report.ReferencedObject reference)
      FOR INTERNAL USE ONLY
      void resetReferences()
      FOR INTERNAL USE ONLY
      void setDataGroup​(GroupField group)
      Set for which group a line in the invoice should be created.
      void setProfile​(com.inet.report.renderer.factur.model.ProfileLevel profile)
      Set the profile of the FacturX.
      void setReferences()
      FOR INTERNAL USE ONLY
      • Methods inherited from class java.lang.Object

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

      • setProfile

        public void setProfile​(@Nonnull
                               com.inet.report.renderer.factur.model.ProfileLevel profile)
        Set the profile of the FacturX.
        Parameters:
        profile - the new profile
        Since:
        20.10
      • getProfile

        @Nonnull
        public com.inet.report.renderer.factur.model.ProfileLevel getProfile()
        Get the profile of the FacturX.
        Returns:
        the profile
        Since:
        20.10
      • put

        public void put​(com.inet.report.renderer.factur.model.FacturModelNode node,
                        Field field)
        Put a mapping between a FacturX node and a field from the report.
        Parameters:
        node - the target FacturX node
        field - the value source
        Since:
        20.10
      • getFields

        public java.util.HashMap<java.lang.String,​Field> getFields()
        Provides a map with all available field mappings.
        Returns:
        a map with all field mappings
        Since:
        20.10
      • remove

        public void remove​(com.inet.report.renderer.factur.model.FacturModelNode node)
        Remove a mapping between a FacturX node and a field from the report.
        Parameters:
        node - the FacturX node
        Since:
        20.10
      • clearMappings

        public void clearMappings()
        Removes all mappings between FacturX nodes and fields from the report.
        Since:
        20.10
      • setDataGroup

        public void setDataGroup​(@Nullable
                                 GroupField group)
        Set for which group a line in the invoice should be created. Null means for every visible detail area.
        Parameters:
        group - the group
        Since:
        20.10
      • getDataGroup

        public GroupField getDataGroup()
        Get the group for which a line in the invoice should be created. Null means for every visible detail area.
        Returns:
        the group or null
        Since:
        20.10
      • parseElement

        public NodeParser parseElement​(com.inet.report.parser.XMLTag group,
                                       java.lang.String tag,
                                       org.xml.sax.Attributes atts,
                                       java.util.Map<java.lang.String,​java.lang.Object> parserMap)
                                throws FatalParserException
        FOR INTERNAL USE ONLY Internal method for reading report XML

        Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.

        Specified by:
        parseElement in interface NodeParser
        Parameters:
        group - XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.
        tag - The XMLTag to be parsed
        atts - The set of attributes in the current XMLTag
        parserMap - The map of current Parser.
        Returns:
        The NodeParser sub-element if one needed to be created, or null if none was created.
        Throws:
        FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
      • parseText

        public void parseText​(java.lang.String text,
                              java.util.Map<java.lang.String,​java.lang.Object> parserMap)
        FOR INTERNAL USE ONLY Internal method for reading report XML

        This method is called if text was encountered in the context of this node. (Examples would be a formula's text or a text element's text)

        Specified by:
        parseText in interface NodeParser
        Parameters:
        text - text encountered and to be stored
        parserMap - The map of current Parser.
      • parseEndElement

        public void parseEndElement​(com.inet.report.parser.XMLTag group,
                                    java.lang.String tag,
                                    java.util.Map<java.lang.String,​java.lang.Object> parserMap)
                             throws FatalParserException
        FOR INTERNAL USE ONLY Internal method for reading report XML

        Receive notification of the end of an XML tag.

        Specified by:
        parseEndElement in interface NodeParser
        Parameters:
        group - XMLTag of the current node to be parsed, or null if there is no such current group.
        tag - The XMLTag to be parsed
        parserMap - The map of current Parser.
        Throws:
        FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
      • isDOMParser

        public boolean isDOMParser()
        FOR INTERNAL USE ONLY Internal method for reading report XML

        Returns whether this node is to be read via a DOM parser.

        Specified by:
        isDOMParser in interface NodeParser
        Returns:
        true if this node is to be read via a DOM parser, false otherwise.
      • parseDOM

        public void parseDOM​(org.w3c.dom.Node node,
                             java.util.Map<java.lang.String,​java.lang.Object> parserMap)
                      throws FatalParserException
        FOR INTERNAL USE ONLY Internal method for reading report XML

        Parses the node.

        Specified by:
        parseDOM in interface NodeParser
        Parameters:
        node - the node
        parserMap - The map of current Parser.
        Throws:
        FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
      • addReferencedObject

        public void addReferencedObject​(com.inet.report.ReferencedObject reference)
        FOR INTERNAL USE ONLY
        Specified by:
        addReferencedObject in interface com.inet.report.ReferenceHolder
      • removeReferencedObject

        public void removeReferencedObject​(com.inet.report.ReferencedObject reference)
        FOR INTERNAL USE ONLY
        Specified by:
        removeReferencedObject in interface com.inet.report.ReferenceHolder
      • getReferencedObjectCount

        public int getReferencedObjectCount()
        FOR INTERNAL USE ONLY
        Specified by:
        getReferencedObjectCount in interface com.inet.report.ReferenceHolder
      • getReferencedObjects

        public com.inet.report.ReferencedObject[] getReferencedObjects()
        FOR INTERNAL USE ONLY
        Specified by:
        getReferencedObjects in interface com.inet.report.ReferenceHolder
      • setReferences

        public void setReferences()
        FOR INTERNAL USE ONLY
        Specified by:
        setReferences in interface com.inet.report.ReferenceHolder
      • resetReferences

        public void resetReferences()
        FOR INTERNAL USE ONLY
        Specified by:
        resetReferences in interface com.inet.report.ReferenceHolder
      • getRealReferencedObjectCount

        public int getRealReferencedObjectCount()
        FOR INTERNAL USE ONLY
        Specified by:
        getRealReferencedObjectCount in interface com.inet.report.ReferenceHolder