Interface PayloadBlockView

All Superinterfaces:
oracle.communication.brm.charging.config.servicespec.BasePayloadBlock

public interface PayloadBlockView extends oracle.communication.brm.charging.config.servicespec.BasePayloadBlock
Class exposes the immutable interface of a PayloadBlock. Users cannot modify the attributes and sub-blocks when using this interface.
  • Method Details

    • getAttribute

      <T> T getAttribute(String name)
      method returns the attribute value for the provided attribute name. ClassCastException will be thrown if caller attempts to retrieve the attribute as the incorrect data type. Dot notation addressing is supported in the supplied name.
      Type Parameters:
      T - the type of the expected attribute
      Parameters:
      name - the name of the attribute to be retrieved (eg. ABC[2].XYZ[1].TIME)
      Returns:
      the attribute value corresponding to the supplied name.
    • getParentBlockView

      PayloadBlockView getParentBlockView()
      the parent block associated with this sub-block. If this block is a root block, then null is returned.
      Returns:
      parent block for this block.
    • getSubBlocks

      List<PayloadBlockView> getSubBlocks(String name)
      method gets the sub-block matching the supplied name. A List of immutable PayloadBlockViews are returned.
      Parameters:
      name - name of the block to get. Dot notation is NOT supported, this is a non-qualified block name that represents a block with is a direct descendant of this payload.
      Returns:
      the list matching blocks. Empty list is return if there are no child blocks available by the supplied name.
    • createViewIterator

      PayloadBlockIterator<PayloadBlockView> createViewIterator()
      method to create an iterator that will do a depth first traversal of all sub-blocks below this Payload.
      Returns:
      iterator for all sub-blocks of this PayloadBlock.
    • createViewIterator

      PayloadBlockIterator<PayloadBlockView> createViewIterator(String blockName)
      method to create an iterator that will do a depth first traversal of all sub-blocks below this PayloadBlock that match the supplied blockName.
      Parameters:
      blockName - block name to match. A trailing '*' suffix can be used to do wildcard helps. (eg. CUSTOMER.BALANCE*)
      Returns:
      iterator to traverse all sub-blocks of this PayloadBlock that match the supplied blockName.
    • createViewIterator

      PayloadBlockIterator<PayloadBlockView> createViewIterator(String blockName, String attrName)
      method to create an iterator that will do a depth first traversal of all sub-blocks below this PayloadBlock that match the supplied blockName and attribute name.
      Parameters:
      blockName - block name to match. A trailing '*' suffix can be used to do wildcard helps. (eg. CUSTOMER.BALANCE*)
      attrName - attr name to match.
      Returns:
      iterator to traverse all sub-blocks of this PayloadBlock that match the supplied blockName and attr name.
    • createViewIterator

      PayloadBlockIterator<PayloadBlockView> createViewIterator(String blockName, String attrName, String value)
      method to create an iterator that will do a depth first traversal of all sub-blocks below this PayloadBlock that match the supplied blockName. attribute name and attribute value.
      Parameters:
      blockName - block name to match. A trailing '*' suffix can be used to do wildcard helps. (eg. CUSTOMER.BALANCE*)
      attrName - attr name to match.
      value - attr value to match.
      Returns:
      iterator to traverse all sub-blocks of this PayloadBlock that match the supplied blockName, attr name and attr value.