Class AgentApprovals

java.lang.Object
com.netscape.certsrv.request.AgentApprovals
All Implemented Interfaces:
Serializable

public class AgentApprovals extends Object implements Serializable
A collection of AgentApproval objects.
Version:
$Revision$, $Date$
See Also:
  • Field Details

    • logger

      public static org.slf4j.Logger logger
    • mVector

      protected Vector<AgentApproval> mVector
  • Constructor Details

    • AgentApprovals

      public AgentApprovals()
  • Method Details

    • addApproval

      public AgentApproval addApproval(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(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(String userName)
      Finds an existing AgentApproval for the named user.
      Parameters:
      userName - user name of the approving agent
      Returns:
      an AgentApproval object
    • elements

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

      public Vector<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(Vector<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()
    • get

      public AgentApproval get(int i)