Package org.cyclos.impl.system
Class ScriptStorageHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseNetworkedHandlerImpl
-
- org.cyclos.impl.system.ScriptStorageHandlerImpl
-
- All Implemented Interfaces:
ScriptStorageHandler
@Component public class ScriptStorageHandlerImpl extends BaseNetworkedHandlerImpl implements ScriptStorageHandler
Implementation forScriptStorageHandler
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description ScriptStorageHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists(String key)Returns whether the given key represents a valid storageScriptObjectStorageget(String key)Returns a storage by key with no expiration, updating an existing or creating a new one.ScriptObjectStorageget(String key, Integer timeoutInSeconds)Returns a storage by key, updating an existing one with the given timeout if needed, or creating a new oneScriptObjectStoragegetIfValid(String key)Returns a storage by key if it exists and is not expired, returning null otherwisevoidinitialize()booleanremove(String key)Removes an storage by key, returning whether something was really removedvoidsetAlwaysPersist(boolean alwaysPersist)Only used by tests, if true is setted always persist storages when "get" methods are called.-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, toDate, toDateTime, validate
-
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
-
exists
public boolean exists(String key)
Description copied from interface:ScriptStorageHandlerReturns whether the given key represents a valid storage- Specified by:
existsin interfaceScriptStorageHandler
-
get
public ScriptObjectStorage get(String key)
Description copied from interface:ScriptStorageHandlerReturns a storage by key with no expiration, updating an existing or creating a new one. Equivalent to get(key, null)- Specified by:
getin interfaceScriptStorageHandler
-
get
public ScriptObjectStorage get(String key, Integer timeoutInSeconds)
Description copied from interface:ScriptStorageHandlerReturns a storage by key, updating an existing one with the given timeout if needed, or creating a new one- Specified by:
getin interfaceScriptStorageHandler
-
getIfValid
public ScriptObjectStorage getIfValid(String key)
Description copied from interface:ScriptStorageHandlerReturns a storage by key if it exists and is not expired, returning null otherwise- Specified by:
getIfValidin interfaceScriptStorageHandler
-
initialize
@PostConstruct public void initialize()
-
remove
public boolean remove(String key)
Description copied from interface:ScriptStorageHandlerRemoves an storage by key, returning whether something was really removed- Specified by:
removein interfaceScriptStorageHandler
-
setAlwaysPersist
public void setAlwaysPersist(boolean alwaysPersist)
Description copied from interface:ScriptStorageHandlerOnly used by tests, if true is setted always persist storages when "get" methods are called.- Specified by:
setAlwaysPersistin interfaceScriptStorageHandler
-
-