Class SecurityQuestionServiceImpl
- java.lang.Object
-
- org.apache.syncope.core.rest.cxf.service.AbstractService
-
- org.apache.syncope.core.rest.cxf.service.SecurityQuestionServiceImpl
-
- All Implemented Interfaces:
JAXRSService
,SecurityQuestionService
@Service public class SecurityQuestionServiceImpl extends AbstractService implements SecurityQuestionService
-
-
Field Summary
Fields Modifier and Type Field Description protected SecurityQuestionLogic
logic
-
Fields inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
LOG, messageContext, OPTIONS_ALLOW, searchContext, uriInfo
-
Fields inherited from interface org.apache.syncope.common.rest.api.service.JAXRSService
CRLF, DOUBLE_DASH, PARAM_ANYTYPE_KIND, PARAM_ANYTYPEKEY, PARAM_CONNID_PAGED_RESULTS_COOKIE, PARAM_DETAILS, PARAM_ENTITY_KEY, PARAM_FIQL, PARAM_KEYWORD, PARAM_MAX, PARAM_NOTIFICATION, PARAM_ORDERBY, PARAM_PAGE, PARAM_REALM, PARAM_RECURSIVE, PARAM_RESOURCE, PARAM_SIZE, PARAM_USER
-
-
Constructor Summary
Constructors Constructor Description SecurityQuestionServiceImpl(SecurityQuestionLogic logic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
create(SecurityQuestionTO securityQuestionTO)
Creates a new security question.void
delete(String key)
Deletes the security question matching the provided key.List<SecurityQuestionTO>
list()
Returns a list of all security questions.SecurityQuestionTO
read(String key)
Returns security question with matching key.SecurityQuestionTO
readByUser(String username)
Ask for security question configured for the user matching the given username, if any.void
update(SecurityQuestionTO securityQuestionTO)
Updates the security question matching the provided key.-
Methods inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
applyPreference, buildPagedResult, checkETag, createResponse, findActualKey, getOrderByClauses, getPreference, isNullPriorityAsync, modificationResponse
-
-
-
-
Field Detail
-
logic
protected final SecurityQuestionLogic logic
-
-
Constructor Detail
-
SecurityQuestionServiceImpl
public SecurityQuestionServiceImpl(SecurityQuestionLogic logic)
-
-
Method Detail
-
list
public List<SecurityQuestionTO> list()
Description copied from interface:SecurityQuestionService
Returns a list of all security questions.- Specified by:
list
in interfaceSecurityQuestionService
- Returns:
- list of all security questions
-
read
public SecurityQuestionTO read(String key)
Description copied from interface:SecurityQuestionService
Returns security question with matching key.- Specified by:
read
in interfaceSecurityQuestionService
- Parameters:
key
- security question key to be read- Returns:
- security question with matching key
-
create
public javax.ws.rs.core.Response create(SecurityQuestionTO securityQuestionTO)
Description copied from interface:SecurityQuestionService
Creates a new security question.- Specified by:
create
in interfaceSecurityQuestionService
- Parameters:
securityQuestionTO
- security question to be created- Returns:
- Response object featuring Location header of created security question
-
update
public void update(SecurityQuestionTO securityQuestionTO)
Description copied from interface:SecurityQuestionService
Updates the security question matching the provided key.- Specified by:
update
in interfaceSecurityQuestionService
- Parameters:
securityQuestionTO
- security question to be stored
-
delete
public void delete(String key)
Description copied from interface:SecurityQuestionService
Deletes the security question matching the provided key.- Specified by:
delete
in interfaceSecurityQuestionService
- Parameters:
key
- security question key to be deleted
-
readByUser
public SecurityQuestionTO readByUser(String username)
Description copied from interface:SecurityQuestionService
Ask for security question configured for the user matching the given username, if any.- Specified by:
readByUser
in interfaceSecurityQuestionService
- Parameters:
username
- username for which the security question is requested- Returns:
- security question, if configured for the user matching the given username
-
-