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
FieldsModifier and TypeFieldDescriptionprotected final UserDataBinderprotected final EncryptorManagerprotected static final Loggerprotected final RealmDAOprotected final RuleProviderprotected final SecurityPropertiesprotected final UserDAOFields inherited from class org.apache.syncope.core.workflow.java.AbstractWorkflowAdapter
entityFactory, groupDAO, publisherFields inherited from interface org.apache.syncope.core.workflow.api.UserWorkflowAdapter
CONFIRM_PASSWORD_RESET, REQUEST_PASSWORD_RESET -
Constructor Summary
ConstructorsConstructorDescriptionAbstractUserWorkflowAdapter(UserDataBinder dataBinder, UserDAO userDAO, RealmDAO realmDAO, GroupDAO groupDAO, EntityFactory entityFactory, SecurityProperties securityProperties, RuleProvider ruleEnforcer, ApplicationEventPublisher publisher, EncryptorManager encryptorManager) -
Method Summary
Modifier and TypeMethodDescriptionActivate an user.Confirm password reset for an user.create(UserCR userCR, boolean disablePwdPolicyCheck, Boolean enabled, String creator, String context) Create an user, optionally disabling password policy check.Create an user.voidDelete an user.protected abstract UserWorkflowResult<String> doActivate(User user, String token, String updater, String context) protected abstract UserWorkflowResult<Pair<UserUR, Boolean>> protected abstract UserWorkflowResult<Pair<String, Boolean>> doCreate(UserCR userCR, boolean disablePwdPolicyCheck, Boolean enabled, String creator, String context) protected abstract voidprotected abstract UserWorkflowResult<String> doReactivate(User user, String updater, String context) protected abstract voiddoRequestPasswordReset(User user, String updater, String context) protected abstract UserWorkflowResult<String> protected abstract UserWorkflowResult<Pair<UserUR, Boolean>> enforcePolicies(User user, boolean disablePwdPolicyCheck, String clearPassword) internalSuspend(String key, String updater, String context) Suspend an user (used by internal authentication process)reactivate(String key, String updater, String context) Reactivate an user.voidrequestPasswordReset(String key, String updater, String context) Request password reset for an user.Suspend an user.Update an user.Methods inherited from class org.apache.syncope.core.workflow.java.AbstractWorkflowAdapter
metadata
-
Field Details
-
LOG
-
dataBinder
-
userDAO
-
realmDAO
-
securityProperties
-
ruleProvider
-
encryptorManager
-
-
Constructor Details
-
AbstractUserWorkflowAdapter
public AbstractUserWorkflowAdapter(UserDataBinder dataBinder, UserDAO userDAO, RealmDAO realmDAO, GroupDAO groupDAO, EntityFactory entityFactory, SecurityProperties securityProperties, RuleProvider ruleEnforcer, ApplicationEventPublisher publisher, EncryptorManager encryptorManager)
-
-
Method Details
-
getPrefix
- Specified by:
getPrefixin interfaceWorkflowAdapter- Returns:
- any string that might be interpreted as 'prefix' (say table prefix in SQL environments)
-
enforcePolicies
-
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
-
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
-
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
-
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
-
suspend
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
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
-
requestPasswordReset
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
-
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
-
doDelete
-
delete
Description copied from interface:UserWorkflowAdapterDelete an user.- Specified by:
deletein interfaceUserWorkflowAdapter- Parameters:
userKey- user to be deletederaser- username that requested this operationcontext- context information
-