Package org.jpos.tlv

Class ISOMsgRef.Ref

    • Method Detail

      • getKey

        public java.lang.Object getKey()
                                throws ISOException
        Description copied from class: ISOComponent
        valid on Leafs only. The value returned is used by ISOMsg as a key to this field.
        Overrides:
        getKey in class ISOMsg
        Returns:
        object representing the field number
        Throws:
        ISOException
      • setFieldNumber

        public void setFieldNumber​(int fieldNumber)
        Description copied from class: ISOMsg
        changes this Component field number
        Use with care, this method does not change any reference held by a Composite.
        Overrides:
        setFieldNumber in class ISOMsg
        Parameters:
        fieldNumber - new field number
      • unset

        public void unset​(int fldno)
        Description copied from class: ISOMsg
        Unset a field if it exists, otherwise ignore.
        Overrides:
        unset in class ISOMsg
        Parameters:
        fldno - - the field number
      • getComposite

        public ISOComponent getComposite()
        Description copied from class: ISOMsg
        In order to interchange Composites and Leafs we use getComposite(). A Composite component returns itself and a Leaf returns null.
        Overrides:
        getComposite in class ISOMsg
        Returns:
        ISOComponent
      • getValue

        public java.lang.Object getValue()
        Description copied from class: ISOComponent
        valid on Leafs only.
        Overrides:
        getValue in class ISOMsg
        Returns:
        object representing the field value
      • getMaxField

        public int getMaxField()
        Description copied from class: ISOComponent
        a Composite must override this function
        Overrides:
        getMaxField in class ISOMsg
        Returns:
        the max field number associated with this message
      • dump

        public void dump​(java.io.PrintStream p,
                         java.lang.String indent)
        Description copied from class: ISOMsg
        dump the message to a PrintStream. The output is sorta XML, intended to be easily parsed.
        Each component is responsible for its own dump function, ISOMsg just calls dump on every valid field.
        Specified by:
        dump in interface Loggeable
        Overrides:
        dump in class ISOMsg
        Parameters:
        p - - print stream
        indent - - optional indent string
      • setDirection

        public void setDirection​(int direction)
        Description copied from class: ISOMsg
        Sets the direction information related to this message
        Overrides:
        setDirection in class ISOMsg
        Parameters:
        direction - can be either ISOMsg.INCOMING or ISOMsg.OUTGOING
      • setHeader

        public void setHeader​(byte[] b)
        Description copied from class: ISOMsg
        Sets an optional message header image
        Overrides:
        setHeader in class ISOMsg
        Parameters:
        b - header image
      • getHeader

        public byte[] getHeader()
        Description copied from class: ISOMsg
        get optional message header image
        Overrides:
        getHeader in class ISOMsg
        Returns:
        message header image (may be null)
      • set

        public void set​(int fldno,
                        java.lang.String value)
        Description copied from class: ISOMsg
        Creates an ISOField associated with fldno within this ISOMsg.
        Overrides:
        set in class ISOMsg
        Parameters:
        fldno - field number
        value - field value
      • set

        public void set​(java.lang.String fpath,
                        java.lang.String value)
        Description copied from class: ISOMsg
        Creates an ISOField associated with fldno within this ISOMsg.
        Overrides:
        set in class ISOMsg
        Parameters:
        fpath - dot-separated field path (i.e. 63.2)
        value - field value
      • set

        public void set​(java.lang.String fpath,
                        ISOComponent c)
                 throws ISOException
        Description copied from class: ISOMsg
        Creates an ISOField associated with fldno within this ISOMsg
        Overrides:
        set in class ISOMsg
        Parameters:
        fpath - dot-separated field path (i.e. 63.2)
        c - component
        Throws:
        ISOException - on error
      • set

        public void set​(java.lang.String fpath,
                        byte[] value)
        Description copied from class: ISOMsg
        Creates an ISOField associated with fldno within this ISOMsg.
        Overrides:
        set in class ISOMsg
        Parameters:
        fpath - dot-separated field path (i.e. 63.2)
        value - binary field value
      • set

        public void set​(int fldno,
                        byte[] value)
        Description copied from class: ISOMsg
        Creates an ISOBinaryField associated with fldno within this ISOMsg.
        Overrides:
        set in class ISOMsg
        Parameters:
        fldno - field number
        value - field value
      • unset

        public void unset​(int[] flds)
        Description copied from class: ISOMsg
        Unsets several fields at once
        Overrides:
        unset in class ISOMsg
        Parameters:
        flds - - array of fields to be unset from this ISOMsg
      • unset

        public void unset​(java.lang.String fpath)
        Description copied from class: ISOMsg
        Unset a field referenced by a fpath if it exists, otherwise ignore.
        Overrides:
        unset in class ISOMsg
        Parameters:
        fpath - dot-separated field path (i.e. 63.2)
      • getComponent

        public ISOComponent getComponent​(int fldno)
        Description copied from class: ISOMsg
        get the component associated with the given field number
        Overrides:
        getComponent in class ISOMsg
        Parameters:
        fldno - the Field Number
        Returns:
        the Component
      • getValue

        public java.lang.Object getValue​(int fldno)
        Description copied from class: ISOMsg
        Return the object value associated with the given field number
        Overrides:
        getValue in class ISOMsg
        Parameters:
        fldno - the Field Number
        Returns:
        the field Object
      • getValue

        public java.lang.Object getValue​(java.lang.String fpath)
                                  throws ISOException
        Description copied from class: ISOMsg
        Return the object value associated with the given field path
        Overrides:
        getValue in class ISOMsg
        Parameters:
        fpath - field path
        Returns:
        the field Object (may be null)
        Throws:
        ISOException - on error
      • getString

        public java.lang.String getString​(int fldno)
        Description copied from class: ISOMsg
        Return the String value associated with the given ISOField number
        Overrides:
        getString in class ISOMsg
        Parameters:
        fldno - the Field Number
        Returns:
        field's String value
      • getString

        public java.lang.String getString​(java.lang.String fpath)
        Description copied from class: ISOMsg
        Return the String value associated with the given field path
        Overrides:
        getString in class ISOMsg
        Parameters:
        fpath - field path
        Returns:
        field's String value (may be null)
      • getBytes

        public byte[] getBytes​(int fldno)
        Description copied from class: ISOMsg
        Return the byte[] value associated with the given ISOField number
        Overrides:
        getBytes in class ISOMsg
        Parameters:
        fldno - the Field Number
        Returns:
        field's byte[] value or null if ISOException or UnsupportedEncodingException happens
      • getBytes

        public byte[] getBytes​(java.lang.String fpath)
        Description copied from class: ISOMsg
        Return the String value associated with the given field path
        Overrides:
        getBytes in class ISOMsg
        Parameters:
        fpath - field path
        Returns:
        field's byte[] value (may be null)
      • hasField

        public boolean hasField​(int fldno)
        Description copied from class: ISOMsg
        Check if a given field is present
        Overrides:
        hasField in class ISOMsg
        Parameters:
        fldno - the Field Number
        Returns:
        boolean indicating the existence of the field
      • hasFields

        public boolean hasFields​(int[] fields)
        Description copied from class: ISOMsg
        Check if all fields are present
        Overrides:
        hasFields in class ISOMsg
        Parameters:
        fields - an array of fields to check for presence
        Returns:
        true if all fields are present
      • hasField

        public boolean hasField​(java.lang.String fpath)
        Description copied from class: ISOMsg
        Check if a field indicated by a fpath is present
        Overrides:
        hasField in class ISOMsg
        Parameters:
        fpath - dot-separated field path (i.e. 63.2)
        Returns:
        true if field present
      • hasFields

        public boolean hasFields()
        Overrides:
        hasFields in class ISOMsg
        Returns:
        true if ISOMsg has at least one field
      • clone

        public java.lang.Object clone​(int[] fields)
        Description copied from class: ISOMsg
        Partially clone an ISOMsg
        Overrides:
        clone in class ISOMsg
        Parameters:
        fields - int array of fields to go
        Returns:
        new ISOMsg instance
      • merge

        public void merge​(ISOMsg m)
        Description copied from class: ISOMsg
        add all fields present on received parameter to this ISOMsg
        please note that received fields take precedence over existing ones (simplifying card agent message creation and template handling)
        Overrides:
        merge in class ISOMsg
        Parameters:
        m - ISOMsg to merge
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class ISOMsg
        Returns:
        a string suitable for a log
      • isInner

        public boolean isInner()
        Overrides:
        isInner in class ISOMsg
        Returns:
        true on inner messages
      • move

        public void move​(int oldFieldNumber,
                         int newFieldNumber)
                  throws ISOException
        Description copied from class: ISOMsg
        moves a field (renumber)
        Overrides:
        move in class ISOMsg
        Parameters:
        oldFieldNumber - old field number
        newFieldNumber - new field number
        Throws:
        ISOException - on error