Interface IArgBlock

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    ArgBlock

    public interface IArgBlock
    extends java.io.Serializable
    This interface defines the abstraction for the generic collection of attributes indexed by string names. Set of cooperating implementations of this interface may exploit dot-separated attribute names to provide seamless access to the attributes of attribute value which also implements AttrSet interface as if it was direct attribute of the container E.g., ((AttrSet)container.get("x")).get("y") is equivalent to container.get("x.y");

    Version:
    $Revision$, $Date$
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object addBigIntegerValue​(java.lang.String n, java.math.BigInteger v, int radix)
      Adds integer-type arguments to this block.
      java.lang.Object addBooleanValue​(java.lang.String n, boolean v)
      Adds boolean-type arguments to this block.
      java.lang.Object addIntegerValue​(java.lang.String n, int v)
      Adds integer-type arguments to this block.
      java.lang.Object addLongValue​(java.lang.String n, long v)
      Adds long-type arguments to this block.
      java.lang.Object addStringValue​(java.lang.String n, java.lang.String v)
      Adds string-based value into this argument block.
      void delete​(java.lang.String name)
      Deletes argument by the given key.
      java.util.Enumeration<java.lang.String> elements()
      Retrieves a list of argument keys.
      java.lang.Object get​(java.lang.String name)
      Retrieves argument.
      java.util.Enumeration<java.lang.String> getElements()
      Retrieves a list of argument keys.
      java.lang.Object getValue​(java.lang.Object n)
      Retrieves argument value as object
      java.lang.Object getValue​(java.lang.Object n, java.lang.Object def)
      Retrieves argument value as object
      java.math.BigInteger getValueAsBigInteger​(java.lang.String n)
      Retrieves argument value as big integer.
      java.math.BigInteger getValueAsBigInteger​(java.lang.String n, java.math.BigInteger def)
      Retrieves argument value as big integer.
      boolean getValueAsBoolean​(java.lang.String name)
      Gets boolean value.
      boolean getValueAsBoolean​(java.lang.String name, boolean def)
      Gets boolean value.
      int getValueAsInt​(java.lang.String n)
      Retrieves argument value as integer.
      int getValueAsInt​(java.lang.String n, int def)
      Retrieves argument value as integer.
      KeyGenInfo getValueAsKeyGenInfo​(java.lang.String name, KeyGenInfo def)
      Gets KeyGenInfo
      org.mozilla.jss.netscape.security.pkcs.PKCS10 getValueAsPKCS10​(java.lang.String name, boolean checkheader)
      Retrieves PKCS10
      org.mozilla.jss.netscape.security.pkcs.PKCS10 getValueAsPKCS10​(java.lang.String name, boolean checkheader, org.mozilla.jss.netscape.security.pkcs.PKCS10 def)
      Retrieves PKCS10
      org.mozilla.jss.netscape.security.pkcs.PKCS10 getValueAsRawPKCS10​(java.lang.String name)
      Gets PKCS10 request.
      org.mozilla.jss.netscape.security.pkcs.PKCS10 getValueAsRawPKCS10​(java.lang.String name, org.mozilla.jss.netscape.security.pkcs.PKCS10 def)
      Gets PKCS10 request.
      java.lang.String getValueAsString​(java.lang.String n)
      Retrieves argument value as string.
      java.lang.String getValueAsString​(java.lang.String n, java.lang.String def)
      Retrieves argument value as string.
      org.mozilla.jss.netscape.security.pkcs.PKCS10 getValuePKCS10​(java.lang.String name, org.mozilla.jss.netscape.security.pkcs.PKCS10 def)
      Retrieves PKCS10
      boolean isValuePresent​(java.lang.String n)
      Checks if this argument block contains the given key.
      void set​(java.lang.String name, java.lang.Object obj)
      Sets argument into this block.
    • Method Detail

      • isValuePresent

        boolean isValuePresent​(java.lang.String n)
        Checks if this argument block contains the given key.
        Parameters:
        n - key
        Returns:
        true if key is present
      • addStringValue

        java.lang.Object addStringValue​(java.lang.String n,
                                        java.lang.String v)
        Adds string-based value into this argument block.
        Parameters:
        n - key
        v - value
        Returns:
        value
      • getValueAsString

        java.lang.String getValueAsString​(java.lang.String n)
                                   throws EBaseException
        Retrieves argument value as string.
        Parameters:
        n - key
        Returns:
        argument value as string
        Throws:
        EBaseException - failed to retrieve value
      • getValueAsString

        java.lang.String getValueAsString​(java.lang.String n,
                                          java.lang.String def)
        Retrieves argument value as string.
        Parameters:
        n - key
        def - default value to be returned if key is not present
        Returns:
        argument value as string
      • getValueAsInt

        int getValueAsInt​(java.lang.String n)
                   throws EBaseException
        Retrieves argument value as integer.
        Parameters:
        n - key
        Returns:
        argument value as int
        Throws:
        EBaseException - failed to retrieve value
      • getValueAsInt

        int getValueAsInt​(java.lang.String n,
                          int def)
        Retrieves argument value as integer.
        Parameters:
        n - key
        def - default value to be returned if key is not present
        Returns:
        argument value as int
      • getValueAsBigInteger

        java.math.BigInteger getValueAsBigInteger​(java.lang.String n)
                                           throws EBaseException
        Retrieves argument value as big integer.
        Parameters:
        n - key
        Returns:
        argument value as big integer
        Throws:
        EBaseException - failed to retrieve value
      • getValueAsBigInteger

        java.math.BigInteger getValueAsBigInteger​(java.lang.String n,
                                                  java.math.BigInteger def)
        Retrieves argument value as big integer.
        Parameters:
        n - key
        def - default value to be returned if key is not present
        Returns:
        argument value as big integer
      • getValue

        java.lang.Object getValue​(java.lang.Object n)
                           throws EBaseException
        Retrieves argument value as object
        Parameters:
        n - key
        Returns:
        argument value as object
        Throws:
        EBaseException - failed to retrieve value
      • getValue

        java.lang.Object getValue​(java.lang.Object n,
                                  java.lang.Object def)
        Retrieves argument value as object
        Parameters:
        n - key
        def - default value to be returned if key is not present
        Returns:
        argument value as object
      • getValueAsBoolean

        boolean getValueAsBoolean​(java.lang.String name)
                           throws EBaseException
        Gets boolean value. They should be "true" or "false".
        Parameters:
        name - name of the input type
        Returns:
        boolean type: true or false
        Throws:
        EBaseException - failed to retrieve value
      • getValueAsBoolean

        boolean getValueAsBoolean​(java.lang.String name,
                                  boolean def)
        Gets boolean value. They should be "true" or "false".
        Parameters:
        name - name of the input type
        def - Default value to return.
        Returns:
        boolean type: true or false
      • getValueAsKeyGenInfo

        KeyGenInfo getValueAsKeyGenInfo​(java.lang.String name,
                                        KeyGenInfo def)
                                 throws EBaseException
        Gets KeyGenInfo
        Parameters:
        name - name of the input type
        def - default value to return
        Returns:
        KeyGenInfo object
        Throws:
        EBaseException - On error.
      • getValueAsRawPKCS10

        org.mozilla.jss.netscape.security.pkcs.PKCS10 getValueAsRawPKCS10​(java.lang.String name)
                                                                   throws EBaseException
        Gets PKCS10 request. This pkcs10 attribute does not contain header information.
        Parameters:
        name - name of the input type
        Returns:
        pkcs10 request
        Throws:
        EBaseException - failed to retrieve value
      • getValueAsRawPKCS10

        org.mozilla.jss.netscape.security.pkcs.PKCS10 getValueAsRawPKCS10​(java.lang.String name,
                                                                          org.mozilla.jss.netscape.security.pkcs.PKCS10 def)
                                                                   throws EBaseException
        Gets PKCS10 request. This pkcs10 attribute does not contain header information.
        Parameters:
        name - name of the input type
        def - default PKCS10
        Returns:
        pkcs10 request
        Throws:
        EBaseException - failed to retrieve value
      • getValueAsPKCS10

        org.mozilla.jss.netscape.security.pkcs.PKCS10 getValueAsPKCS10​(java.lang.String name,
                                                                       boolean checkheader)
                                                                throws EBaseException
        Retrieves PKCS10
        Parameters:
        name - name of the input type
        checkheader - true if header must be present
        Returns:
        PKCS10 object
        Throws:
        EBaseException - failed to retrieve value
      • getValueAsPKCS10

        org.mozilla.jss.netscape.security.pkcs.PKCS10 getValueAsPKCS10​(java.lang.String name,
                                                                       boolean checkheader,
                                                                       org.mozilla.jss.netscape.security.pkcs.PKCS10 def)
                                                                throws EBaseException
        Retrieves PKCS10
        Parameters:
        name - name of the input type
        checkheader - true if header must be present
        def - default PKCS10
        Returns:
        PKCS10 object
        Throws:
        EBaseException - on error
      • getValuePKCS10

        org.mozilla.jss.netscape.security.pkcs.PKCS10 getValuePKCS10​(java.lang.String name,
                                                                     org.mozilla.jss.netscape.security.pkcs.PKCS10 def)
                                                              throws EBaseException
        Retrieves PKCS10
        Parameters:
        name - name of the input type
        def - default PKCS10
        Returns:
        PKCS10 object
        Throws:
        EBaseException - on error
      • elements

        java.util.Enumeration<java.lang.String> elements()
        Retrieves a list of argument keys.
        Returns:
        a list of string-based keys
      • addLongValue

        java.lang.Object addLongValue​(java.lang.String n,
                                      long v)
        Adds long-type arguments to this block.
        Parameters:
        n - key
        v - value
        Returns:
        value
      • addIntegerValue

        java.lang.Object addIntegerValue​(java.lang.String n,
                                         int v)
        Adds integer-type arguments to this block.
        Parameters:
        n - key
        v - value
        Returns:
        value
      • addBooleanValue

        java.lang.Object addBooleanValue​(java.lang.String n,
                                         boolean v)
        Adds boolean-type arguments to this block.
        Parameters:
        n - key
        v - value
        Returns:
        value
      • addBigIntegerValue

        java.lang.Object addBigIntegerValue​(java.lang.String n,
                                            java.math.BigInteger v,
                                            int radix)
        Adds integer-type arguments to this block.
        Parameters:
        n - key
        v - value
        radix - radix
        Returns:
        value
      • set

        void set​(java.lang.String name,
                 java.lang.Object obj)
        Sets argument into this block.
        Parameters:
        name - key
        obj - value
      • get

        java.lang.Object get​(java.lang.String name)
        Retrieves argument.
        Parameters:
        name - key
        Returns:
        object value
      • delete

        void delete​(java.lang.String name)
        Deletes argument by the given key.
        Parameters:
        name - key
      • getElements

        java.util.Enumeration<java.lang.String> getElements()
        Retrieves a list of argument keys.
        Returns:
        a list of string-based keys