Package org.apache.syncope.core.logic
Class UserLogic
- java.lang.Object
-
- org.apache.syncope.core.logic.AbstractLogic<A>
-
- org.apache.syncope.core.logic.AbstractResourceAssociator<TO>
-
- org.apache.syncope.core.logic.AbstractAnyLogic<UserTO,UserCR,UserUR>
-
- org.apache.syncope.core.logic.UserLogic
-
public class UserLogic extends AbstractAnyLogic<UserTO,UserCR,UserUR>
Note that this controller does not extendAbstractTransactionalLogic, hence does not provide any Spring's Transactional logic at class level.
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessTokenDAOaccessTokenDAOprotected UserDataBinderbinderprotected ConfParamOpsconfParamOpsprotected DelegationDAOdelegationDAOprotected GroupDAOgroupDAOprotected UserProvisioningManagerprovisioningManagerprotected ExternalResourceDAOresourceDAOprotected RuleEnforcerruleEnforcerprotected AnySearchDAOsearchDAOprotected SyncopeLogicsyncopeLogicprotected UserDAOuserDAO-
Fields inherited from class org.apache.syncope.core.logic.AbstractAnyLogic
anyTypeDAO, perContextActions, realmDAO, REST_CONTEXT, templateUtils
-
Fields inherited from class org.apache.syncope.core.logic.AbstractLogic
LOG
-
-
Constructor Summary
Constructors Constructor Description UserLogic(RealmDAO realmDAO, AnyTypeDAO anyTypeDAO, TemplateUtils templateUtils, UserDAO userDAO, GroupDAO groupDAO, AnySearchDAO searchDAO, ExternalResourceDAO resourceDAO, AccessTokenDAO accessTokenDAO, DelegationDAO delegationDAO, ConfParamOps confParamOps, UserDataBinder binder, UserProvisioningManager provisioningManager, SyncopeLogic syncopeLogic, RuleEnforcer ruleEnforcer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProvisioningResult<UserTO>assign(String key, Collection<String> resources, boolean changepwd, String password, boolean nullPriorityAsync)voidcompliance(ComplianceQuery query)voidconfirmPasswordReset(String token, String password)ProvisioningResult<UserTO>create(UserCR createReq, boolean nullPriorityAsync)ProvisioningResult<UserTO>delete(String key, boolean nullPriorityAsync)ProvisioningResult<UserTO>deprovision(String key, List<String> resources, boolean nullPriorityAsync)protected ProvisioningResult<UserTO>doCreate(UserCR userCR, boolean self, boolean nullPriorityAsync)protected ProvisioningResult<UserTO>doDelete(UserTO userTO, boolean self, boolean nullPriorityAsync)protected ProvisioningResult<UserTO>doUpdate(UserUR userUR, boolean self, boolean nullPriorityAsync)protected Set<String>groups(UserTO userTO)UserTOlink(String key, Collection<String> resources)ProvisioningResult<UserTO>mustChangePassword(PasswordPatch password, boolean nullPriorityAsync)ProvisioningResult<UserTO>provision(String key, List<String> resources, boolean changePwd, String password, boolean nullPriorityAsync)UserTOread(String key)voidrequestPasswordReset(String username, String securityAnswer)protected UserTOresolveReference(Method method, Object... args)Pair<Integer,List<UserTO>>search(SearchCond searchCond, int page, int size, List<OrderByClause> orderBy, String realm, boolean recursive, boolean details)ProvisioningResult<UserTO>selfCreate(UserCR createReq, boolean nullPriorityAsync)ProvisioningResult<UserTO>selfDelete(boolean nullPriorityAsync)Triple<String,String,UserTO>selfRead()ProvisioningResult<UserTO>selfStatus(StatusR statusR, boolean nullPriorityAsync)ProvisioningResult<UserTO>selfUpdate(UserUR userUR, boolean nullPriorityAsync)protected Pair<String,List<PropagationStatus>>setStatusOnWfAdapter(StatusR statusR, boolean nullPriorityAsync)ProvisioningResult<UserTO>status(StatusR statusR, boolean nullPriorityAsync)ProvisioningResult<UserTO>unassign(String key, Collection<String> resources, boolean nullPriorityAsync)UserTOunlink(String key, Collection<String> resources)ProvisioningResult<UserTO>update(UserUR userUR, boolean nullPriorityAsync)protected voidupdateChecks(String key)-
Methods inherited from class org.apache.syncope.core.logic.AbstractAnyLogic
afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, getActions
-
Methods inherited from class org.apache.syncope.core.logic.AbstractLogic
resolveBeanReference
-
-
-
-
Field Detail
-
userDAO
protected final UserDAO userDAO
-
groupDAO
protected final GroupDAO groupDAO
-
searchDAO
protected final AnySearchDAO searchDAO
-
resourceDAO
protected final ExternalResourceDAO resourceDAO
-
accessTokenDAO
protected final AccessTokenDAO accessTokenDAO
-
delegationDAO
protected final DelegationDAO delegationDAO
-
confParamOps
protected final ConfParamOps confParamOps
-
binder
protected final UserDataBinder binder
-
provisioningManager
protected final UserProvisioningManager provisioningManager
-
syncopeLogic
protected final SyncopeLogic syncopeLogic
-
ruleEnforcer
protected final RuleEnforcer ruleEnforcer
-
-
Constructor Detail
-
UserLogic
public UserLogic(RealmDAO realmDAO, AnyTypeDAO anyTypeDAO, TemplateUtils templateUtils, UserDAO userDAO, GroupDAO groupDAO, AnySearchDAO searchDAO, ExternalResourceDAO resourceDAO, AccessTokenDAO accessTokenDAO, DelegationDAO delegationDAO, ConfParamOps confParamOps, UserDataBinder binder, UserProvisioningManager provisioningManager, SyncopeLogic syncopeLogic, RuleEnforcer ruleEnforcer)
-
-
Method Detail
-
selfRead
@PreAuthorize("isAuthenticated() and not(hasRole(\'MUST_CHANGE_PASSWORD\'))") @Transactional(readOnly=true) public Triple<String,String,UserTO> selfRead()
-
read
@PreAuthorize("hasRole(\'USER_READ\')") @Transactional(readOnly=true) public UserTO read(String key)
- Specified by:
readin classAbstractAnyLogic<UserTO,UserCR,UserUR>
-
search
@PreAuthorize("hasRole(\'USER_SEARCH\')") @Transactional(readOnly=true) public Pair<Integer,List<UserTO>> search(SearchCond searchCond, int page, int size, List<OrderByClause> orderBy, String realm, boolean recursive, boolean details)
- Specified by:
searchin classAbstractAnyLogic<UserTO,UserCR,UserUR>
-
selfCreate
@PreAuthorize("hasRole(\'ANONYMOUS\')") public ProvisioningResult<UserTO> selfCreate(UserCR createReq, boolean nullPriorityAsync)
-
create
@PreAuthorize("hasRole(\'USER_CREATE\')") public ProvisioningResult<UserTO> create(UserCR createReq, boolean nullPriorityAsync)
-
doCreate
protected ProvisioningResult<UserTO> doCreate(UserCR userCR, boolean self, boolean nullPriorityAsync)
-
selfUpdate
@PreAuthorize("isAuthenticated() and not(hasRole(\'ANONYMOUS\')) and not(hasRole(\'MUST_CHANGE_PASSWORD\'))") public ProvisioningResult<UserTO> selfUpdate(UserUR userUR, boolean nullPriorityAsync)
-
update
@PreAuthorize("hasRole(\'USER_UPDATE\')") public ProvisioningResult<UserTO> update(UserUR userUR, boolean nullPriorityAsync)
- Specified by:
updatein classAbstractAnyLogic<UserTO,UserCR,UserUR>
-
doUpdate
protected ProvisioningResult<UserTO> doUpdate(UserUR userUR, boolean self, boolean nullPriorityAsync)
-
setStatusOnWfAdapter
protected Pair<String,List<PropagationStatus>> setStatusOnWfAdapter(StatusR statusR, boolean nullPriorityAsync)
-
status
@PreAuthorize("hasRole(\'USER_UPDATE\')") public ProvisioningResult<UserTO> status(StatusR statusR, boolean nullPriorityAsync)
-
selfStatus
@PreAuthorize("isAuthenticated() and not(hasRole(\'MUST_CHANGE_PASSWORD\'))") public ProvisioningResult<UserTO> selfStatus(StatusR statusR, boolean nullPriorityAsync)
-
mustChangePassword
@PreAuthorize("hasRole(\'MUST_CHANGE_PASSWORD\')") public ProvisioningResult<UserTO> mustChangePassword(PasswordPatch password, boolean nullPriorityAsync)
-
compliance
@PreAuthorize("hasRole(\'ANONYMOUS\')") @Transactional(readOnly=true) public void compliance(ComplianceQuery query)
-
requestPasswordReset
@PreAuthorize("hasRole(\'ANONYMOUS\')") @Transactional public void requestPasswordReset(String username, String securityAnswer)
-
confirmPasswordReset
@PreAuthorize("hasRole(\'ANONYMOUS\')") @Transactional public void confirmPasswordReset(String token, String password)
-
selfDelete
@PreAuthorize("isAuthenticated() and not(hasRole(\'ANONYMOUS\')) and not(hasRole(\'MUST_CHANGE_PASSWORD\'))") public ProvisioningResult<UserTO> selfDelete(boolean nullPriorityAsync)
-
delete
@PreAuthorize("hasRole(\'USER_DELETE\')") public ProvisioningResult<UserTO> delete(String key, boolean nullPriorityAsync)
- Specified by:
deletein classAbstractAnyLogic<UserTO,UserCR,UserUR>
-
doDelete
protected ProvisioningResult<UserTO> doDelete(UserTO userTO, boolean self, boolean nullPriorityAsync)
-
updateChecks
protected void updateChecks(String key)
-
unlink
@PreAuthorize("hasRole(\'USER_UPDATE\')") public UserTO unlink(String key, Collection<String> resources)
- Specified by:
unlinkin classAbstractResourceAssociator<UserTO>
-
link
@PreAuthorize("hasRole(\'USER_UPDATE\')") public UserTO link(String key, Collection<String> resources)
- Specified by:
linkin classAbstractResourceAssociator<UserTO>
-
unassign
@PreAuthorize("hasRole(\'USER_UPDATE\')") public ProvisioningResult<UserTO> unassign(String key, Collection<String> resources, boolean nullPriorityAsync)
- Specified by:
unassignin classAbstractResourceAssociator<UserTO>
-
assign
@PreAuthorize("hasRole(\'USER_UPDATE\')") public ProvisioningResult<UserTO> assign(String key, Collection<String> resources, boolean changepwd, String password, boolean nullPriorityAsync)
- Specified by:
assignin classAbstractResourceAssociator<UserTO>
-
deprovision
@PreAuthorize("hasRole(\'USER_UPDATE\')") public ProvisioningResult<UserTO> deprovision(String key, List<String> resources, boolean nullPriorityAsync)
- Specified by:
deprovisionin classAbstractResourceAssociator<UserTO>
-
provision
@PreAuthorize("hasRole(\'USER_UPDATE\')") public ProvisioningResult<UserTO> provision(String key, List<String> resources, boolean changePwd, String password, boolean nullPriorityAsync)
- Specified by:
provisionin classAbstractResourceAssociator<UserTO>
-
resolveReference
protected UserTO resolveReference(Method method, Object... args) throws UnresolvedReferenceException
- Specified by:
resolveReferencein classAbstractLogic<UserTO>- Throws:
UnresolvedReferenceException
-
-