com.ibm.commerce.security.keys

Interface WCKey

  • All Known Implementing Classes:
    WCKeyBaseImpl


    public interface WCKey
    This class defines an interface that must be implemented by all key provider objects that are stored in the WCKeyRegistry service.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • setName

        void setName(java.lang.String strKeyName)
        Sets the name of the key in the WCKeyRegistry. Clients can query the service with this name to retrieve a particular key.
        Parameters:
        strKeyName - The name of the key.
      • setWorkingDirectory

        void setWorkingDirectory(java.lang.String strWorkingDirectory)
        Sets the directory relative to which any key files will be stored. By default this is the directory where the Keys Configuration File is stored.
        Parameters:
        strWorkingDirectory - The directory relative to which any key files will be stored.
      • setStatus

        void setStatus(java.lang.String strStatus)
        Sets the status of this key.
        Parameters:
        strStatus - The status of the key: "current" or "new"
      • setVersion

        void setVersion(java.lang.String strVersion)
        Sets the version of this key.
        Parameters:
        strVersion - The version of the key.
      • setAlgorithm

        void setAlgorithm(java.lang.String strAlgorithm)
        Sets the algorithm of this key.
        Parameters:
        strAlgorithm - The algorithm of the key.
      • getName

        java.lang.String getName()
        Retrieves the name of this Key.
        Returns:
        The name of key.
      • getStatus

        java.lang.String getStatus()
        Gets the status of this key.
        Returns:
        The status of the key.
      • getVersion

        java.lang.String getVersion()
        Gets the version of this key. Initially the version may be null.
        Returns:
        The version of the key. Initially the version may be null.
      • getAlgorithm

        java.lang.String getAlgorithm()
        Gets the algorithm of this key. By default the algorithm is null.
        Returns:
        The algorithm of the key. By default the algorithm is null.
      • setProvider

        void setProvider(java.lang.String strProviderName)
        Sets the name of the provider who implemented this particular key.
        Parameters:
        strProviderName - The provider name.
      • getProvider

        java.lang.String getProvider()
        Gets the name of the provider.
        Returns:
        The name of provider.
      • getValueAsString

        java.lang.String getValueAsString()
        Gets the current value of the key as a String.
        Returns:
        The key value.
      • getValueAsBytes

        byte[] getValueAsBytes()
        Gets the current value of the key as a byte array.
        Returns:
        The key value.
      • getEncryptedValueAsBytes

        byte[] getEncryptedValueAsBytes()
        Gets the current encrypted value of the key.
        Returns:
        The current encrypted value.
      • getEncryptedValueAsString

        java.lang.String getEncryptedValueAsString()
        Gets the current encrypted value of the key.
        Returns:
        The current encrypted value.
      • getNewValueAsString

        java.lang.String getNewValueAsString()
        Deprecated. in V7.0.0.3. Use getValueAsString() instead.
        Gets the new value of the key as a String.
        Returns:
        The new key value.
      • getNewValueAsBytes

        byte[] getNewValueAsBytes()
        Deprecated. in V7.0.0.3. Use getValueAsBytes() instead.
        Gets the new value of the key as a byte array.
        Returns:
        The new key value.
      • getNewEncryptedValueAsBytes

        byte[] getNewEncryptedValueAsBytes()
        Deprecated. in V7.0.0.3. Use getEncryptedValueAsBytes() instead.
        Gets the new encrypted value of the key.
        Returns:
        The new encrypted value.
      • getNewEncryptedValueAsString

        java.lang.String getNewEncryptedValueAsString()
        Deprecated. in V7.0.0.3. Use getEncryptedValueAsString() instead.
        Gets the new encrypted value of the key.
        Returns:
        The new encrypted value.
      • getWorkingDirectory

        java.lang.String getWorkingDirectory()
        Gets the directory, relative to which any key files will be stored. By default this is the directory where the Keys Configuration File is located.
        Returns:
        Any key files will be stored relative to this directory
      • updateValue

        void updateValue()
                  throws java.lang.Exception
        Updates the persistent store of the current key value with the new key value.
        Throws:
        java.lang.Exception - The value of the current key value cannot be updated.
      • setProperties

        void setProperties(java.util.HashMap hshProperties)
        Sets the configuration properties that may be used by this class while retrieving the value of the key.
        Parameters:
        hshProperties - The name-value pair of configuration properties.
      • getProperties

        java.util.HashMap getProperties()
        Gets the configuration data that is used during the retrieval of the key.
        Returns:
        The configuration properties.
      • initialize

        void initialize()
                 throws java.lang.Exception
        This method is called by the WCKeyRegistry class to initialize the key by reading the current and new key values from their persistent store.
        Throws:
        java.lang.Exception - The key could not be initialized.