© 2005 BEA Systems, Inc.

com.beasys.commerce.ebusiness.security
Class EncryptorImpl

java.lang.Object
  extended bycom.beasys.commerce.foundation.SessionImpl
      extended bycom.beasys.commerce.ebusiness.security.EncryptorImpl
All Implemented Interfaces:
EnterpriseBean, Serializable, SessionBean

public class EncryptorImpl
extends SessionImpl

The EncryptorImpl is the implementation used by the Encryptor service.
Encryption does not require that the server be in a consistent state. This ensures that data gets encrypted and stored and in turn orders go through by default.

See Also:
Encryptor, EncryptorHome, Serialized Form

Field Summary
 
Fields inherited from class com.beasys.commerce.foundation.SessionImpl
_ctx, _environmentNamingContext, _environmentPropertyCache, _isDirty
 
Constructor Summary
EncryptorImpl()
           
 
Method Summary
 void ejbActivate()
          ejbActivate method.
 void ejbCreate()
          ejbCreate method.
 void ejbPassivate()
          ejbPassivate method.
 void ejbPostCreate()
          ejbPostCreate method.
 void ejbRemove()
          ejbRemove method.
 String encrypt(String dataToEncrypt)
          Takes string of data to encrypt and returns a string of encrypted data.
 void setSessionContext(SessionContext ctx)
          setSessionContext method.
 
Methods inherited from class com.beasys.commerce.foundation.SessionImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, getEnvironmentNamingContext, getEnvironmentProperty, getEnvironmentProperty, getEnvironmentPropertyCache, getPersistenceHelperPlugin, getSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncryptorImpl

public EncryptorImpl()
Method Detail

ejbActivate

public void ejbActivate()
                 throws EJBException
Description copied from class: SessionImpl
ejbActivate method.

Specified by:
ejbActivate in interface SessionBean
Overrides:
ejbActivate in class SessionImpl
Throws:
EJBException

ejbCreate

public void ejbCreate()
               throws CreateException
Description copied from class: SessionImpl
ejbCreate method.

Overrides:
ejbCreate in class SessionImpl
Throws:
CreateException

ejbPassivate

public void ejbPassivate()
                  throws EJBException
Description copied from class: SessionImpl
ejbPassivate method.

Specified by:
ejbPassivate in interface SessionBean
Overrides:
ejbPassivate in class SessionImpl
Throws:
EJBException

ejbPostCreate

public void ejbPostCreate()
                   throws CreateException
Description copied from class: SessionImpl
ejbPostCreate method.

Overrides:
ejbPostCreate in class SessionImpl
Throws:
CreateException

ejbRemove

public void ejbRemove()
               throws EJBException
Description copied from class: SessionImpl
ejbRemove method.

Specified by:
ejbRemove in interface SessionBean
Overrides:
ejbRemove in class SessionImpl
Throws:
EJBException

encrypt

public String encrypt(String dataToEncrypt)
               throws InconsistentStateException
Takes string of data to encrypt and returns a string of encrypted data.
The encryption process involves getting an instance of the KeyFactory and retrieving the public key from it. The encrypted data, which is really a sequence of bytes is then base-64 encoded to convert it to a byte sequence that can be easily persisted.

Returns:
s string of decrypted data.
Throws:
InconsistentStateException - if the server is not initialized with decryption password.

setSessionContext

public void setSessionContext(SessionContext ctx)
                       throws EJBException
Description copied from class: SessionImpl
setSessionContext method.

Specified by:
setSessionContext in interface SessionBean
Overrides:
setSessionContext in class SessionImpl
Throws:
EJBException

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved