org.springframework.extensions.webscripts
Class ScriptCredentialVault

java.lang.Object
  extended by org.springframework.extensions.webscripts.ScriptCredentialVault

public final class ScriptCredentialVault
extends Object

Represents the credential vault to the script engine This exposes credentials from the vault which are "user" managed

Author:
muzquiano

Field Summary
protected  ScriptableMap<String,Serializable> properties
           
 
Constructor Summary
ScriptCredentialVault(CredentialVault vault, User user)
          Constructs a new ScriptCredentialVault object.
 
Method Summary
 ScriptableMap<String,Serializable> getProperties()
          Returns the properties of the credential vault
 User getUser()
          Returns the user to whom this credential vault belongs
 boolean hasCredentials(String endpointId)
          Returns whether the given endpoint credentials are stored on this vault
 ScriptCredentials newCredentials(String endpointId)
          Creates new credentials and binds them into this vault.
 void removeCredentials(String endpointId)
          Removes credentials from the vault
 void save()
          Saves the credential vault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected ScriptableMap<String,Serializable> properties
Constructor Detail

ScriptCredentialVault

public ScriptCredentialVault(CredentialVault vault,
                             User user)
Constructs a new ScriptCredentialVault object.

Parameters:
vault - The credential vault instance
user - The user to whom the credential vault belongs
Method Detail

getProperties

public ScriptableMap<String,Serializable> getProperties()
Returns the properties of the credential vault


getUser

public User getUser()
Returns the user to whom this credential vault belongs


hasCredentials

public boolean hasCredentials(String endpointId)
Returns whether the given endpoint credentials are stored on this vault

Parameters:
endpointId -
Returns:

newCredentials

public ScriptCredentials newCredentials(String endpointId)
Creates new credentials and binds them into this vault. If the credentials already exist, the old ones will be returned

Parameters:
endpointId -
Returns:

removeCredentials

public void removeCredentials(String endpointId)
Removes credentials from the vault

Parameters:
endpointId -

save

public void save()
Saves the credential vault



Copyright © 2009 SpringSource, Inc. All Rights Reserved.