Package org.cyclos.impl
Class ApplicationHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractGlobalServerComponent
-
- org.cyclos.impl.BaseGlobalHandlerImpl
-
- org.cyclos.impl.ApplicationHandlerImpl
-
- All Implemented Interfaces:
ApplicationHandler
@Component public class ApplicationHandlerImpl extends BaseGlobalHandlerImpl implements ApplicationHandler
Implementation forApplicationHandler
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractGlobalServerComponent
rawEntityManagerHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description ApplicationHandlerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdecrypt(byte[] input, byte[] mask)AES decryption using the license key, with a given mask.Stringdecrypt(String input, byte[] mask)AES decryption of a Base-64 encoded string using the license key, with a given mask.static byte[]deriveKey(byte[] key, byte[] mask)Derive an encryption key with the given maskbyte[]encrypt(String input, byte[] mask)AES encryption using the license key, with a given mask.StringencryptAsString(String input, byte[] mask)Base64-encoding of AES encryption using the license key, with a given mask.ApplicationgetApplication()Returns the Application instanceCyclosPropertiesgetCyclosProperties()Returns theCyclosPropertiesinstanceIdMaskgetIdMask()Returns theIdMaskwhich is used to mask / unmask identifiers sent to / received from clientsvoidinitialize()booleanisInitialized()Returns whether the initialization process is completed-
Methods inherited from class org.cyclos.impl.AbstractGlobalServerComponent
getBaseEntityManagerHandler, getEntityManager
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
deriveKey
public static byte[] deriveKey(byte[] key, byte[] mask)Derive an encryption key with the given mask
-
decrypt
public String decrypt(byte[] input, byte[] mask) throws DataAccessException
Description copied from interface:ApplicationHandlerAES decryption using the license key, with a given mask.- Specified by:
decryptin interfaceApplicationHandler- Throws:
DataAccessException
-
decrypt
public String decrypt(String input, byte[] mask)
Description copied from interface:ApplicationHandlerAES decryption of a Base-64 encoded string using the license key, with a given mask.- Specified by:
decryptin interfaceApplicationHandler
-
encrypt
public byte[] encrypt(String input, byte[] mask) throws DataAccessException
Description copied from interface:ApplicationHandlerAES encryption using the license key, with a given mask.- Specified by:
encryptin interfaceApplicationHandler- Throws:
DataAccessException
-
encryptAsString
public String encryptAsString(String input, byte[] mask)
Description copied from interface:ApplicationHandlerBase64-encoding of AES encryption using the license key, with a given mask.- Specified by:
encryptAsStringin interfaceApplicationHandler
-
getApplication
public Application getApplication()
Description copied from interface:ApplicationHandlerReturns the Application instance- Specified by:
getApplicationin interfaceApplicationHandler
-
getCyclosProperties
public CyclosProperties getCyclosProperties()
Description copied from interface:ApplicationHandlerReturns theCyclosPropertiesinstance- Specified by:
getCyclosPropertiesin interfaceApplicationHandler
-
getIdMask
public IdMask getIdMask()
Description copied from interface:ApplicationHandlerReturns theIdMaskwhich is used to mask / unmask identifiers sent to / received from clients- Specified by:
getIdMaskin interfaceApplicationHandler
-
initialize
@PostConstruct public void initialize()
-
isInitialized
public boolean isInitialized()
Description copied from interface:ApplicationHandlerReturns whether the initialization process is completed- Specified by:
isInitializedin interfaceApplicationHandler
-
-