Package org.cyclos.security.system
Class CaptchaServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.system.CaptchaServiceSecurity
-
- All Implemented Interfaces:
Service,CaptchaService
@Security public class CaptchaServiceSecurity extends BaseServiceSecurity implements CaptchaService
Security layer forCaptchaService
-
-
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 CaptchaServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringgenerate(String previousChallenge)Generates a new internal captcha challenge, returning it's identifierbooleanisValid(String id, String text)Returns whether the given internal captcha challenge is validSerializableInputStreamreadImage(String id, BasicGroupVO basicGroupVO, DimensionsDTO dimensions)Returns the image which corresponds to the given internal captcha id and using the background defined for the specified groupvoidremove(String id)Removes the given internal captcha challenge with the given idprotected EntityCheck<?>resolveEntityCheck()Must be implemented in order to return theEntityCheckmanaged by this security component, or null if none-
Methods inherited from class org.cyclos.security.BaseServiceSecurity
checkGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkScope, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initialize
-
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, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
generate
public String generate(String previousChallenge) throws FrameworkException
Description copied from interface:CaptchaServiceGenerates a new internal captcha challenge, returning it's identifier- Specified by:
generatein interfaceCaptchaService- Throws:
FrameworkException
-
isValid
public boolean isValid(String id, String text) throws FrameworkException
Description copied from interface:CaptchaServiceReturns whether the given internal captcha challenge is valid- Specified by:
isValidin interfaceCaptchaService- Throws:
FrameworkException
-
readImage
public SerializableInputStream readImage(String id, BasicGroupVO basicGroupVO, DimensionsDTO dimensions) throws FrameworkException
Description copied from interface:CaptchaServiceReturns the image which corresponds to the given internal captcha id and using the background defined for the specified group- Specified by:
readImagein interfaceCaptchaService- Throws:
FrameworkException
-
remove
public void remove(String id)
Description copied from interface:CaptchaServiceRemoves the given internal captcha challenge with the given id- Specified by:
removein interfaceCaptchaService
-
resolveEntityCheck
protected EntityCheck<?> resolveEntityCheck()
Description copied from class:BaseServiceSecurityMust be implemented in order to return theEntityCheckmanaged by this security component, or null if none- Specified by:
resolveEntityCheckin classBaseServiceSecurity
-
-