Class AgentApprovals

  • All Implemented Interfaces:
    java.io.Serializable

    public class AgentApprovals
    extends java.lang.Object
    implements java.io.Serializable
    A collection of AgentApproval objects.
    Version:
    $Revision$, $Date$
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Vector<AgentApproval> mVector  
    • Constructor Summary

      Constructors 
      Constructor Description
      AgentApprovals()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AgentApproval addApproval​(java.lang.String userName)
      Adds an approval to approval's list.
      java.util.Enumeration<AgentApproval> elements()
      Returns an enumeration of the agent approvals
      AgentApproval findApproval​(java.lang.String userName)
      Finds an existing AgentApproval for the named user.
      static AgentApprovals fromStringVector​(java.util.Vector<java.lang.String> stringVector)
      Recreates an AgentApprovals instance from a Vector of strings that was created by toStringVector().
      AgentApproval get​(int i)  
      void removeApproval​(java.lang.String userName)
      Removes an approval from approval's list.
      int size()  
      java.util.Vector<java.lang.String> toStringVector()
      Returns the AgentApprovals as a Vector of strings.
      • Methods inherited from class java.lang.Object

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

      • AgentApprovals

        public AgentApprovals()
    • Method Detail

      • addApproval

        public AgentApproval addApproval​(java.lang.String userName)
        Adds an approval to approval's list.

        If an approval is already present for this user, it is updated with a new date. Otherwise a new value is inserted.

        Parameters:
        userName - user name of the approving agent
      • removeApproval

        public void removeApproval​(java.lang.String userName)
        Removes an approval from approval's list.

        If there is no approval for this userName, this call does nothing.

        Parameters:
        userName - user name of the approving agent
      • findApproval

        public AgentApproval findApproval​(java.lang.String userName)
        Finds an existing AgentApproval for the named user.
        Parameters:
        userName - user name of the approving agent
        Returns:
        an AgentApproval object
      • elements

        public java.util.Enumeration<AgentApproval> elements()
        Returns an enumeration of the agent approvals
        Returns:
        an enumeration of the agent approvals
      • toStringVector

        public java.util.Vector<java.lang.String> toStringVector()
        Returns the AgentApprovals as a Vector of strings. Each entry in the vector is of the format: epoch;username where epoch is the date.getTime()

        This is used for serialization in Request.setExtData().

        Returns:
        The string vector.
      • fromStringVector

        public static AgentApprovals fromStringVector​(java.util.Vector<java.lang.String> stringVector)
        Recreates an AgentApprovals instance from a Vector of strings that was created by toStringVector().
        Parameters:
        stringVector - The vector of strings to translate
        Returns:
        the AgentApprovals instance or null if it can't be translated.
      • size

        public int size()