Copyright © 2002 SAP AG. All Rights Reserved.

com.sap.security.core.server.securestorage.remote
Class RemoteSecureStorageClientContextImpl

java.lang.Object
  |
  +--javax.rmi.PortableRemoteObject
        |
        +--com.sap.security.core.server.securestorage.remote.RemoteSecureStorageSuperContextImpl
              |
              +--com.sap.security.core.server.securestorage.remote.RemoteSecureStorageClientContextImpl
All Implemented Interfaces:
java.rmi.Remote, RemoteSecureStorageClientContextInterface, java.lang.Runnable

public class RemoteSecureStorageClientContextImpl
extends RemoteSecureStorageSuperContextImpl
implements RemoteSecureStorageClientContextInterface, java.lang.Runnable


Inner classes inherited from class com.sap.security.core.server.securestorage.remote.RemoteSecureStorageSuperContextImpl
RemoteSecureStorageSuperContextImpl.AddKeyPrivilegedAction, RemoteSecureStorageSuperContextImpl.AliasesPrivilegedAction, RemoteSecureStorageSuperContextImpl.GetKeyPrivilegedAction, RemoteSecureStorageSuperContextImpl.LoadKeyStore
 
Fields inherited from class com.sap.security.core.server.securestorage.remote.RemoteSecureStorageSuperContextImpl
_constants, _J2EEEngineKeystore, _param1, _param2, _secureStorageConfigurationHandler, _serviceContext
 
Constructor Summary
RemoteSecureStorageClientContextImpl(com.sap.engine.frame.core.configuration.ConfigurationHandler secureStorageConfigurationHandler, java.lang.Object mySyncObject, com.sap.engine.frame.ApplicationServiceContext serviceContext)
          Creates a SecureStorageClient object for the specified client of the securestorage-service
RemoteSecureStorageClientContextImpl(java.lang.String clientExt, com.sap.engine.frame.core.configuration.ConfigurationHandler secureStorageConfigurationHandler, java.lang.Object mySyncObject, com.sap.engine.frame.ApplicationServiceContext serviceContext)
           
RemoteSecureStorageClientContextImpl(java.lang.String clientID, int clientType, com.sap.engine.frame.core.configuration.ConfigurationHandler secureStorageConfigurationHandler, com.sap.engine.frame.ApplicationServiceContext serviceContext)
           
 
Method Summary
 byte[] base64Decoding(byte[] objectToDecod)
           
 byte[] base64Encoding(java.io.Serializable objectToEncode)
           
 void commit()
          commits all datas of the actual ConfigurationHandler to database
 java.lang.Object decrypt(SecureStorageObject objectToDecrypt)
          Decrypts a given SecureStorageObject and returns the original object
 byte[] decryptReturnBytes(SecureStorageObject objectToDecrypt)
           
 void deleteObject(java.lang.String objectID)
          Deletes an object in the SecureStorage
 SecureStorageObject encrypt(java.io.Serializable objectToEncrypt)
          Encrypts the given object and returns a SecureStorageObject
 boolean exist(java.lang.String objectID)
           
protected  void finalize()
           
 void generateNewKey()
          Generates a new secret key for clientapplication
 java.lang.String[] getObjectIDs()
          Returns a list of all central stored objects
 boolean isSecure(java.lang.String objectID)
           
 SecureStorageObject[] reEncrypt(SecureStorageObject[] objectsToReEncrypt)
          Re-encrypts an array of already encrypted SecureStorageObjects with the latest key
 byte[] retrieveBytes(java.lang.String objectID)
           
 java.lang.Object retrieveObject(java.lang.String objectID)
          Retrieves a central stored object
 void run()
           
 void storeObject(java.io.Serializable object, java.lang.String objectID)
          Stores a given object in the SecureStorage under the given objectID
 void storeObjectWithoutCommit(java.io.Serializable object, java.lang.String objectID)
          Stores a given object in the SecureStorage under the given objectID.
 void updateObjectNoCommit(java.io.Serializable object, java.lang.String objectID)
           
 
Methods inherited from class com.sap.security.core.server.securestorage.remote.RemoteSecureStorageSuperContextImpl
checkConfiguration, checkRootConfiguration, createConfiguration, createRoot, generateSecretKey, getKey, getKeystore, getLatestKeyID, getPermissionName, getProtectedProtectionDomainStack, grantPermissions, setKeystoreReference, setNumberOfKeys, setProtectedProtectionDomainStack
 
Methods inherited from class javax.rmi.PortableRemoteObject
connect, exportObject, narrow, toStub, unexportObject
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteSecureStorageClientContextImpl

public RemoteSecureStorageClientContextImpl(com.sap.engine.frame.core.configuration.ConfigurationHandler secureStorageConfigurationHandler,
                                            java.lang.Object mySyncObject,
                                            com.sap.engine.frame.ApplicationServiceContext serviceContext)
                                     throws java.rmi.RemoteException
Creates a SecureStorageClient object for the specified client of the securestorage-service
Parameters:
clientID -  
clientType -  
secureStorageConfigurationHandler -  

RemoteSecureStorageClientContextImpl

public RemoteSecureStorageClientContextImpl(java.lang.String clientExt,
                                            com.sap.engine.frame.core.configuration.ConfigurationHandler secureStorageConfigurationHandler,
                                            java.lang.Object mySyncObject,
                                            com.sap.engine.frame.ApplicationServiceContext serviceContext)
                                     throws java.rmi.RemoteException

RemoteSecureStorageClientContextImpl

public RemoteSecureStorageClientContextImpl(java.lang.String clientID,
                                            int clientType,
                                            com.sap.engine.frame.core.configuration.ConfigurationHandler secureStorageConfigurationHandler,
                                            com.sap.engine.frame.ApplicationServiceContext serviceContext)
                                     throws java.rmi.RemoteException
Method Detail

encrypt

public SecureStorageObject encrypt(java.io.Serializable objectToEncrypt)
                            throws ObjectEncryptionException
Encrypts the given object and returns a SecureStorageObject
Specified by:
encrypt in interface RemoteSecureStorageClientContextInterface
Parameters:
objectToEncrypt -  
Returns:
SecureStorageObject
Throws:
ObjectEncryptionException -  

base64Encoding

public byte[] base64Encoding(java.io.Serializable objectToEncode)
                      throws ObjectEncryptionException
Specified by:
base64Encoding in interface RemoteSecureStorageClientContextInterface

reEncrypt

public SecureStorageObject[] reEncrypt(SecureStorageObject[] objectsToReEncrypt)
                                throws ObjectEncryptionException
Re-encrypts an array of already encrypted SecureStorageObjects with the latest key
Parameters:
objectsToReEncrypt -  
Returns:
SecureStorageObject[]
Throws:
ObjectEncryptionException -  

decrypt

public java.lang.Object decrypt(SecureStorageObject objectToDecrypt)
                         throws ObjectDecryptionException
Decrypts a given SecureStorageObject and returns the original object
Specified by:
decrypt in interface RemoteSecureStorageClientContextInterface
Parameters:
objectToDecrypt -  
Returns:
Object
Throws:
ObjectDecryptionException -  

decryptReturnBytes

public byte[] decryptReturnBytes(SecureStorageObject objectToDecrypt)
                          throws ObjectDecryptionException

base64Decoding

public byte[] base64Decoding(byte[] objectToDecod)
                      throws ObjectDecryptionException
Specified by:
base64Decoding in interface RemoteSecureStorageClientContextInterface

commit

public void commit()
            throws ObjectModificationException
commits all datas of the actual ConfigurationHandler to database

storeObjectWithoutCommit

public void storeObjectWithoutCommit(java.io.Serializable object,
                                     java.lang.String objectID)
                              throws ObjectStorageException
Stores a given object in the SecureStorage under the given objectID. No commit is done. To store the objects in a persistent way use method .commit() after this method or use method storeObject(Serializable object, String objectID)!!
Parameters:
object -  
objectID -  
Throws:
ObjectStorageException -  

storeObject

public void storeObject(java.io.Serializable object,
                        java.lang.String objectID)
                 throws ObjectStorageException
Stores a given object in the SecureStorage under the given objectID
Specified by:
storeObject in interface RemoteSecureStorageClientContextInterface
Parameters:
object -  
objectID -  
Throws:
ObjectStorageException -  

generateNewKey

public void generateNewKey()
                    throws KeyGenerationException
Generates a new secret key for clientapplication
Specified by:
generateNewKey in interface RemoteSecureStorageClientContextInterface
Throws:
KeyGenerationException -  

deleteObject

public void deleteObject(java.lang.String objectID)
                  throws ObjectDeletionException
Deletes an object in the SecureStorage
Specified by:
deleteObject in interface RemoteSecureStorageClientContextInterface
Parameters:
objectID -  
Throws:
ObjectDeletionException -  

retrieveObject

public java.lang.Object retrieveObject(java.lang.String objectID)
                                throws ObjectRetrievalException
Retrieves a central stored object
Specified by:
retrieveObject in interface RemoteSecureStorageClientContextInterface
Parameters:
objectID -  
Returns:
Object
Throws:
ObjectRetrievalException -  

retrieveBytes

public byte[] retrieveBytes(java.lang.String objectID)
                     throws ObjectRetrievalException
Specified by:
retrieveBytes in interface RemoteSecureStorageClientContextInterface

getObjectIDs

public java.lang.String[] getObjectIDs()
                                throws StorageLocationOpenException,
                                       ObjectRetrievalException
Returns a list of all central stored objects
Specified by:
getObjectIDs in interface RemoteSecureStorageClientContextInterface
Returns:
String[]
Throws:
StorageLocationOpenException -  

updateObjectNoCommit

public void updateObjectNoCommit(java.io.Serializable object,
                                 java.lang.String objectID)
                          throws ObjectModificationException

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object

exist

public boolean exist(java.lang.String objectID)
              throws SecureStorageException
Specified by:
exist in interface RemoteSecureStorageClientContextInterface

isSecure

public boolean isSecure(java.lang.String objectID)
                 throws ObjectModificationException
Specified by:
isSecure in interface RemoteSecureStorageClientContextInterface

run

public void run()
Specified by:
run in interface java.lang.Runnable

Copyright © 2002 SAP AG. All Rights Reserved.