com.novell.ecb.secretstore
Class RemoveSecret

java.lang.Object
  |
  +--com.novell.ecb.secretstore.SecretBean
        |
        +--com.novell.ecb.secretstore.RemoveSecret
All Implemented Interfaces:
Command, java.io.Serializable

public class RemoveSecret
extends SecretBean

Removes a Secret from the SecretStore.

Required Input Properties:
SecretInstance - A SecretInstance object that represents the Secret to be removed.
 
Optional Input Properties:
flags - The flags for the operation. Currently, no flag is defined for this operation. Property is provided here for future use.
Output Property:
None

Version:
1.0
See Also:
Serialized Form

Constructor Summary
RemoveSecret()
          Constructs a RemoveSecret command bean.
RemoveSecret(SecretInstance secretInstance)
          Constructs a RemoveSecret command bean and sets the SecretInstance to be used.
 
Method Summary
 void execute()
          Executes this command bean for removing a Secret from the SecretStore.
 SSFlags getFlags()
          Returns the flags set.
 boolean isReady()
          Tests whether the required input properties are set and the bean is in the "initialized" state.
 void reset()
          Resets the output properties to the values they had before the execute method was called.
 void setFlags(SSFlags flags)
          Sets the flags to be used while deleting the Secret.
 
Methods inherited from class com.novell.ecb.secretstore.SecretBean
getSecretInstance, setSecretInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoveSecret

public RemoveSecret()
Constructs a RemoveSecret command bean.


RemoveSecret

public RemoveSecret(SecretInstance secretInstance)
Constructs a RemoveSecret command bean and sets the SecretInstance to be used.

Parameters:
secretInstance - A SecretInstance object that represents the Secret to be removed.
Method Detail

setFlags

public void setFlags(SSFlags flags)
Sets the flags to be used while deleting the Secret.

Parameters:
flags - Flags for the operation. Currently, no flag is defined for this operation. This property is provided for future use.

getFlags

public SSFlags getFlags()
Returns the flags set.

Returns:
SSFlags The flags set.

isReady

public boolean isReady()
Tests whether the required input properties are set and the bean is in the "initialized" state.

If the user does not set a value for optional input property, default value is used. Therefore, these properties do not affect the readiness of the bean. However, bean will not be in ready state if any of the required input properties is not set.

Returns:
boolean True if the bean is in initialized state; else, returns False.

reset

public void reset()
Resets the output properties to the values they had before the execute method was called.

There is no output property to reset.


execute

public void execute()
             throws CommandException
Executes this command bean for removing a Secret from the SecretStore.

Throws:
CommandException - Thrown if the bean fails to execute.

Example: Shows how to use RemoveSecret bean.


     // Get the SecretInstance from GetSecretInstance or EnumerateSecrets bean.
   SecretInstance si = getSI.getSecretInstance();
   try
     {
         // Instantiate the command bean
       RemoveSecret remove = new RemoveSecret(si);
         // SecretInstance is the only input property of this bean
         // Call the execute method of the command bean
       remove.execute();
         // There is no output property of this bean
         // Do any further operation
       ..
       ..
     }
     catch(CommandException e)
      {
         // TODO: Handle exception
      }
 
See Also:
GetSecretInstance, EnumerateSecrets


Copyright © 2001-2003 Novell, Inc. All Rights Reserved.