Class UpdateUser
java.lang.Object
dev.getelements.elements.setup.commands.AbstractUserSetupCommand
dev.getelements.elements.setup.commands.UpdateUser
- All Implemented Interfaces:
SetupCommand
,AutoCloseable
Created by patricktwohig on 5/8/15.
-
Field Summary
Fields inherited from interface dev.getelements.elements.setup.SetupCommand
STDERR, STDIN, STDOUT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjoptsimple.OptionSpec
<String> protected User
readOptions
(joptsimple.OptionSet optionSet) Reads theOptionSet
and generates aUser
instance from the options supplied to this command.void
setUserDao
(UserDao userDao) protected void
writeUserToDatabase
(joptsimple.OptionSet optionSet) Performs the actual changes and commits them to the database.Methods inherited from class dev.getelements.elements.setup.commands.AbstractUserSetupCommand
getEmailOptionSpec, getLevelOptionSpec, getOptionParser, getPassword, getPasswordOptionSpec, getStrictOptionSpec, getUser, getUsernameOptionSpec, hasPassword, run
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.getelements.elements.setup.SetupCommand
close
-
Constructor Details
-
UpdateUser
public UpdateUser()
-
-
Method Details
-
readOptions
Description copied from class:AbstractUserSetupCommand
Reads theOptionSet
and generates aUser
instance from the options supplied to this command. The returnedUser
will be made available using subsequent calls usingAbstractUserSetupCommand.getUser()
.- Overrides:
readOptions
in classAbstractUserSetupCommand
- Parameters:
optionSet
- theOptionSet
made from the arguments passed toAbstractUserSetupCommand.run(String[])
.
-
writeUserToDatabase
protected void writeUserToDatabase(joptsimple.OptionSet optionSet) Description copied from class:AbstractUserSetupCommand
Performs the actual changes and commits them to the database.- Specified by:
writeUserToDatabase
in classAbstractUserSetupCommand
- Parameters:
optionSet
-
-
getUserDao
-
setUserDao
-
getUserIdOptionSpec
-