Class PageTrail

  • All Implemented Interfaces:
    Serializable

    public class PageTrail
    extends Object
    implements Serializable
    This class captures a chain of markers where each marker contains information on the page session needed to activate view bean.
    See Also:
    Serialized Form
    • Constructor Detail

      • PageTrail

        public PageTrail()
        Default constructor that is required for serialization.
      • PageTrail

        public PageTrail​(String displayName,
                         String viewBeanClassName,
                         Map pageSessionAttributeValues)
        Creates a page trail.
        Parameters:
        displayName - Display Name.
        viewBeanClassName - Class Name of View Bean.
        pageSessionAttributeValues - Map of attribute name (String) to a value (Serializable).
    • Method Detail

      • set

        public void set​(String displayName,
                        String viewBeanClassName,
                        Map pageSessionAttributeValues)
        Set trail.
        Parameters:
        displayName - Display Name.
        viewBeanClassName - Class Name of View Bean.
        pageSessionAttributeValues - Map of attribute name (String) to a value (Serializable).
      • swap

        public void swap​(String displayName,
                         String viewBeanClassName,
                         Map pageSessionAttributeValues)
        Swap the last item of trail.
        Parameters:
        displayName - Display Name.
        viewBeanClassName - Class Name of View Bean.
        pageSessionAttributeValues - Map of attribute name (String) to a value (Serializable).
      • add

        public void add​(String displayName,
                        String viewBeanClassName,
                        Map pageSessionAttributeValues)
        Adds item to trail.
        Parameters:
        displayName - Display Name.
        viewBeanClassName - Class Name of View Bean.
        pageSessionAttributeValues - Map of attribute name (String) to a value (Serializable).
      • pop

        public PageTrail.Marker pop()
        Pops the last item in the list.
        Returns:
        the Marker of the second last item.
      • backTo

        public PageTrail.Marker backTo​(int idx)
                                throws AMConsoleException
        Discards items from a given index (exclusive) to the end.
        Parameters:
        idx - Index.
        Returns:
        the Marker for idx.
        Throws:
        AMConsoleException - if cannot be discard items in page trail.
      • getMarkers

        public List getMarkers()
        Returns a list of marker in this trail.
        Returns:
        a list of marker in this trail.