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 AccessTokenDAO
accessTokenDAO
protected UserDataBinder
binder
protected ConfParamOps
confParamOps
protected DelegationDAO
delegationDAO
protected GroupDAO
groupDAO
protected UserProvisioningManager
provisioningManager
protected ExternalResourceDAO
resourceDAO
protected RuleEnforcer
ruleEnforcer
protected AnySearchDAO
searchDAO
protected SyncopeLogic
syncopeLogic
protected UserDAO
userDAO
-
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)
void
compliance(ComplianceQuery query)
void
confirmPasswordReset(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)
UserTO
link(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)
UserTO
read(String key)
void
requestPasswordReset(String username, String securityAnswer)
protected UserTO
resolveReference(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)
UserTO
unlink(String key, Collection<String> resources)
ProvisioningResult<UserTO>
update(UserUR userUR, boolean nullPriorityAsync)
protected void
updateChecks(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:
read
in 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:
search
in 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:
update
in 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:
delete
in 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:
unlink
in classAbstractResourceAssociator<UserTO>
-
link
@PreAuthorize("hasRole(\'USER_UPDATE\')") public UserTO link(String key, Collection<String> resources)
- Specified by:
link
in classAbstractResourceAssociator<UserTO>
-
unassign
@PreAuthorize("hasRole(\'USER_UPDATE\')") public ProvisioningResult<UserTO> unassign(String key, Collection<String> resources, boolean nullPriorityAsync)
- Specified by:
unassign
in classAbstractResourceAssociator<UserTO>
-
assign
@PreAuthorize("hasRole(\'USER_UPDATE\')") public ProvisioningResult<UserTO> assign(String key, Collection<String> resources, boolean changepwd, String password, boolean nullPriorityAsync)
- Specified by:
assign
in classAbstractResourceAssociator<UserTO>
-
deprovision
@PreAuthorize("hasRole(\'USER_UPDATE\')") public ProvisioningResult<UserTO> deprovision(String key, List<String> resources, boolean nullPriorityAsync)
- Specified by:
deprovision
in classAbstractResourceAssociator<UserTO>
-
provision
@PreAuthorize("hasRole(\'USER_UPDATE\')") public ProvisioningResult<UserTO> provision(String key, List<String> resources, boolean changePwd, String password, boolean nullPriorityAsync)
- Specified by:
provision
in classAbstractResourceAssociator<UserTO>
-
resolveReference
protected UserTO resolveReference(Method method, Object... args) throws UnresolvedReferenceException
- Specified by:
resolveReference
in classAbstractLogic<UserTO>
- Throws:
UnresolvedReferenceException
-
-