Class AbstractUserWorkflowAdapter
- java.lang.Object
-
- org.apache.syncope.core.workflow.java.AbstractWorkflowAdapter
-
- org.apache.syncope.core.workflow.java.AbstractUserWorkflowAdapter
-
- All Implemented Interfaces:
UserWorkflowAdapter,WorkflowAdapter
- Direct Known Subclasses:
DefaultUserWorkflowAdapter,FlowableUserWorkflowAdapter
@Transactional(propagation=REQUIRES_NEW, rollbackFor=java.lang.Throwable.class) public abstract class AbstractUserWorkflowAdapter extends AbstractWorkflowAdapter implements UserWorkflowAdapter
-
-
Field Summary
Fields Modifier and Type Field Description protected UserDataBinderdataBinderprotected static LoggerLOGprotected RealmDAOrealmDAOprotected RuleEnforcerruleEnforcerprotected SecurityPropertiessecurityPropertiesprotected UserDAOuserDAO-
Fields inherited from class org.apache.syncope.core.workflow.java.AbstractWorkflowAdapter
entityFactory, groupDAO, publisher
-
Fields inherited from interface org.apache.syncope.core.workflow.api.UserWorkflowAdapter
CONFIRM_PASSWORD_RESET, REQUEST_PASSWORD_RESET
-
-
Constructor Summary
Constructors Constructor Description AbstractUserWorkflowAdapter(UserDataBinder dataBinder, UserDAO userDAO, RealmDAO realmDAO, GroupDAO groupDAO, EntityFactory entityFactory, SecurityProperties securityProperties, RuleEnforcer ruleEnforcer, ApplicationEventPublisher publisher)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description UserWorkflowResult<String>activate(String key, String token, String updater, String context)Activate an user.UserWorkflowResult<Pair<UserUR,Boolean>>confirmPasswordReset(String key, String token, String password, String updater, String context)Confirm password reset for an user.UserWorkflowResult<Pair<String,Boolean>>create(UserCR userCR, boolean disablePwdPolicyCheck, Boolean enabled, String creator, String context)Create an user, optionally disabling password policy check.UserWorkflowResult<Pair<String,Boolean>>create(UserCR userCR, String creator, String context)Create an user.voiddelete(String userKey, String eraser, String context)Delete an user.protected abstract UserWorkflowResult<String>doActivate(User user, String token, String updater, String context)protected abstract UserWorkflowResult<Pair<UserUR,Boolean>>doConfirmPasswordReset(User user, String token, String password, String updater, String context)protected abstract UserWorkflowResult<Pair<String,Boolean>>doCreate(UserCR userCR, boolean disablePwdPolicyCheck, Boolean enabled, String creator, String context)protected abstract voiddoDelete(User user, String eraser, String context)protected abstract UserWorkflowResult<String>doReactivate(User user, String updater, String context)protected abstract voiddoRequestPasswordReset(User user, String updater, String context)protected abstract UserWorkflowResult<String>doSuspend(User user, String updater, String context)protected abstract UserWorkflowResult<Pair<UserUR,Boolean>>doUpdate(User user, UserUR userUR, String updater, String context)protected Pair<Boolean,Boolean>enforcePolicies(User user, boolean disablePwdPolicyCheck, String clearPassword)StringgetPrefix()Pair<UserWorkflowResult<String>,Boolean>internalSuspend(String key, String updater, String context)Suspend an user (used by internal authentication process)UserWorkflowResult<String>reactivate(String key, String updater, String context)Reactivate an user.voidrequestPasswordReset(String key, String updater, String context)Request password reset for an user.UserWorkflowResult<String>suspend(String key, String updater, String context)Suspend an user.UserWorkflowResult<Pair<UserUR,Boolean>>update(UserUR userUR, Boolean enabled, String updater, String context)Update an user.-
Methods inherited from class org.apache.syncope.core.workflow.java.AbstractWorkflowAdapter
metadata
-
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
dataBinder
protected final UserDataBinder dataBinder
-
userDAO
protected final UserDAO userDAO
-
realmDAO
protected final RealmDAO realmDAO
-
securityProperties
protected final SecurityProperties securityProperties
-
ruleEnforcer
protected final RuleEnforcer ruleEnforcer
-
-
Constructor Detail
-
AbstractUserWorkflowAdapter
public AbstractUserWorkflowAdapter(UserDataBinder dataBinder, UserDAO userDAO, RealmDAO realmDAO, GroupDAO groupDAO, EntityFactory entityFactory, SecurityProperties securityProperties, RuleEnforcer ruleEnforcer, ApplicationEventPublisher publisher)
-
-
Method Detail
-
getPrefix
public String getPrefix()
- Specified by:
getPrefixin interfaceWorkflowAdapter- Returns:
- any string that might be interpreted as 'prefix' (say table prefix in SQL environments)
-
enforcePolicies
protected Pair<Boolean,Boolean> enforcePolicies(User user, boolean disablePwdPolicyCheck, String clearPassword)
-
create
public UserWorkflowResult<Pair<String,Boolean>> create(UserCR userCR, String creator, String context)
Description copied from interface:UserWorkflowAdapterCreate an user.- Specified by:
createin interfaceUserWorkflowAdapter- Parameters:
userCR- user to be created and whether to propagate it as activecreator- username that requested this operationcontext- context information- Returns:
- user just created
-
doCreate
protected abstract UserWorkflowResult<Pair<String,Boolean>> doCreate(UserCR userCR, boolean disablePwdPolicyCheck, Boolean enabled, String creator, String context)
-
create
public UserWorkflowResult<Pair<String,Boolean>> create(UserCR userCR, boolean disablePwdPolicyCheck, Boolean enabled, String creator, String context)
Description copied from interface:UserWorkflowAdapterCreate an user, optionally disabling password policy check.- Specified by:
createin interfaceUserWorkflowAdapter- Parameters:
userCR- user to be created and whether to propagate it as activedisablePwdPolicyCheck- disable password policy check?enabled- specify true/false to force active/supended statuscreator- username that requested this operationcontext- context information- Returns:
- user just created
-
doActivate
protected abstract UserWorkflowResult<String> doActivate(User user, String token, String updater, String context)
-
activate
public UserWorkflowResult<String> activate(String key, String token, String updater, String context)
Description copied from interface:UserWorkflowAdapterActivate an user.- Specified by:
activatein interfaceUserWorkflowAdapter- Parameters:
key- user to be activatedtoken- to be verified for activationupdater- username that requested this operationcontext- context information- Returns:
- user just updated
-
doUpdate
protected abstract UserWorkflowResult<Pair<UserUR,Boolean>> doUpdate(User user, UserUR userUR, String updater, String context)
-
update
public UserWorkflowResult<Pair<UserUR,Boolean>> update(UserUR userUR, Boolean enabled, String updater, String context)
Description copied from interface:UserWorkflowAdapterUpdate an user.- Specified by:
updatein interfaceUserWorkflowAdapter- Parameters:
userUR- modification set to be performedenabled- whether status shall be changed or notupdater- username that requested this operationcontext- context information- Returns:
- user just updated and propagations to be performed
-
doSuspend
protected abstract UserWorkflowResult<String> doSuspend(User user, String updater, String context)
-
suspend
public UserWorkflowResult<String> suspend(String key, String updater, String context)
Description copied from interface:UserWorkflowAdapterSuspend an user.- Specified by:
suspendin interfaceUserWorkflowAdapter- Parameters:
key- to be suspendedupdater- username that requested this operationcontext- context information- Returns:
- user just suspended
-
internalSuspend
public Pair<UserWorkflowResult<String>,Boolean> internalSuspend(String key, String updater, String context)
Description copied from interface:UserWorkflowAdapterSuspend an user (used by internal authentication process)- Specified by:
internalSuspendin interfaceUserWorkflowAdapter- Parameters:
key- to be suspendedupdater- username that requested this operationcontext- context information- Returns:
- user just suspended and information whether to propagate suspension
-
doReactivate
protected abstract UserWorkflowResult<String> doReactivate(User user, String updater, String context)
-
reactivate
public UserWorkflowResult<String> reactivate(String key, String updater, String context)
Description copied from interface:UserWorkflowAdapterReactivate an user.- Specified by:
reactivatein interfaceUserWorkflowAdapter- Parameters:
key- user to be reactivatedupdater- username that requested this operationcontext- context information- Returns:
- user just reactivated
-
doRequestPasswordReset
protected abstract void doRequestPasswordReset(User user, String updater, String context)
-
requestPasswordReset
public void requestPasswordReset(String key, String updater, String context)
Description copied from interface:UserWorkflowAdapterRequest password reset for an user.- Specified by:
requestPasswordResetin interfaceUserWorkflowAdapter- Parameters:
key- user requesting password resetupdater- username that requested this operationcontext- context information
-
doConfirmPasswordReset
protected abstract UserWorkflowResult<Pair<UserUR,Boolean>> doConfirmPasswordReset(User user, String token, String password, String updater, String context)
-
confirmPasswordReset
public UserWorkflowResult<Pair<UserUR,Boolean>> confirmPasswordReset(String key, String token, String password, String updater, String context)
Description copied from interface:UserWorkflowAdapterConfirm password reset for an user.- Specified by:
confirmPasswordResetin interfaceUserWorkflowAdapter- Parameters:
key- user confirming password resettoken- security tokenpassword- new password valueupdater- username that requested this operationcontext- context information- Returns:
- user just updated and propagations to be performed
-
delete
public void delete(String userKey, String eraser, String context)
Description copied from interface:UserWorkflowAdapterDelete an user.- Specified by:
deletein interfaceUserWorkflowAdapter- Parameters:
userKey- user to be deletederaser- username that requested this operationcontext- context information
-
-