|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.novell.ecb.secretstore.SecretStoreBean
|
+--com.novell.ecb.secretstore.UnlockSecretStore
Unlocks a locked SecretStore.
If SecretStore contains enhanced protected Secrets, it gets locked whenever eDirectory user's password is changed. in order to unlock a SecretStore, user needs to provide his/her old password for eDirectory or master password for SecretStore. If both are provided, old eDirectory password is used.
ssInstance - A SecretStoreInstance object that represents the SecretStore of the target object.
eDirPassword - User's old password for eDirectory.
masterPassword - Master password set for the SecretStore.
flags - The flags for the operation. By default, no flag is set. Currently, only REMOVE_LOCK_FROM_STORE flag
is defined for this operation. If this flag is set, none of the passwords is required
for execution of this bean. Setting this flag will result in deleting all the locked secrets from the SecretStore.
The locked secrets that are deleted cannot be recovered.
None
| Field Summary |
| Fields inherited from class com.novell.ecb.secretstore.SecretStoreBean |
MAX_BUFFER_SIZE |
| Constructor Summary | |
UnlockSecretStore()
Constructs an UnlockSecretStore command bean. |
|
UnlockSecretStore(SecretStoreInstance ssInstance)
Constructs an UnlockSecretStore command bean and sets the SecretStoreInstance to be used. |
|
| Method Summary | |
void |
execute()
Executes this command bean for unlocking a SecretStore. |
SSFlags |
getFlags()
Returns the flags set. |
boolean |
isReady()
Tests whether the required input properties are set and the bean is in "initialized" state. |
void |
reset()
Resets the output properties to the values they had before the execute method was called. |
void |
seteDirPassword(char[] password)
Sets the old eDirectory password for unlocking the locked SecretStore. |
void |
seteDirPassword(java.lang.String password)
Deprecated. Replaced by seteDirPassword(char[]). |
void |
setFlags(SSFlags flags)
Sets the flags to be used while performing the unlock operation. |
void |
setMasterPassword(char[] password)
Sets the master password of the SecretStore. |
void |
setMasterPassword(java.lang.String password)
Deprecated. Replaced by setMasterPassword(char[]). |
| Methods inherited from class com.novell.ecb.secretstore.SecretStoreBean |
getSecretStoreInstance, setSecretStoreInstance |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UnlockSecretStore()
public UnlockSecretStore(SecretStoreInstance ssInstance)
ssInstance - A SecretStoreInstance object that represents the SecretStore of the target object.| Method Detail |
public void setFlags(SSFlags flags)
No flag is set by default. Currently, only IN_REMOVE_LOCK_FROM_STORE flag is defined for this operation. If this flag is set, none of the passwords is required for execution of this bean.
flags - Flags for the operation.SSFlags.IN_REMOVE_LOCK_FROM_STOREpublic SSFlags getFlags()
public void setMasterPassword(java.lang.String password)
setMasterPassword(char[]).
password - The master password.public void setMasterPassword(char[] password)
password - The master password.public void seteDirPassword(java.lang.String password)
seteDirPassword(char[]).
password - The eDirectory password. If master password
is not set, old eDirectory password must be set. Otherwise, bean will not be in ready
state. If both are set, old eDirPassword is used.public void seteDirPassword(char[] password)
password - The eDirectory password. If master password
is not set, old eDirectory password must be set. Otherwise, bean will not be in ready
state. If both are set, old eDirPassword is used.public boolean isReady()
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.
public void reset()
There is no output property to reset.
public void execute()
throws CommandException
CommandException - Thrown if the bean fails to execute.
Example: Shows how to use UnlockSecretStore bean.
// Get the SecretStoreInstance created by the CreateSecretStoreInstance bean.
SecretStoreInstance ssi = createSSI.getSecretStoreInstance();
try
{
// Instantiate the command bean
UnlockSecretStore unlock = new UnlockSecretStore(ssi);
// Set the input properties of the command bean
unlock.setMasterPassword("masterPassword".toCharArray());
// unlock.seteDirPassword("oldPassword".toCharArray());
// For unlocking a SecretStore either master passsword or user's old
// password for eDirectory must be provided.
// None of these passwords is required if SSFlags.IN_REMOVE_LOCK_FROM_STORE
// flag is set.
// SSFlags ssf = new SSFlags(0);
// ssf.setFlag(SSFlags.IN_REMOVE_LOCK_FROM_STORE);
// unlock.setFlags(ssf);
// Call the execute method of the command bean
unlock.execute();
// There is no output property of this bean
// Do any further operations
...
...
}
catch(CommandException e)
{
// TODO: Handle exception
}
CreateSecretStoreInstance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||