Skip to content

Commit

Permalink
style(cli): rename config controller functions
Browse files Browse the repository at this point in the history
  • Loading branch information
thetric committed Apr 5, 2017
1 parent a321939 commit 208502e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ final class IliasCliController {
private IliasService createIliasService() {
try {
log.debug('check for existing config in {}', cliOptions.syncDir.toAbsolutePath())
return existingConfigCliCtrlProvider.get().start()
return existingConfigCliCtrlProvider.get().createIliasService()
} catch (NoSuchFileException settingsNotFoundEx) {
log.warn('no config found in {}', cliOptions.syncDir.toAbsolutePath())
log.catching(DEBUG, settingsNotFoundEx)
return setupCtrlProvider.get().startSetup()
return setupCtrlProvider.get().createIliasService()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class ExistingConfigCliController {
UserPreferenceService preferenceService
ConsoleService consoleService

IliasService start() {
IliasService createIliasService() {
UserPreferences prefs = preferenceService.loadUserPreferences()
IliasService iliasService = iliasProvider.apply(prefs.iliasServerURL)
promptForPassword(iliasService, prefs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class SetupController {

private final UserPreferences prefs = new UserPreferences()

IliasService startSetup() {
IliasService iliasService = createIliasService()
IliasService createIliasService() {
IliasService iliasService = createIliasServiceFromUserUrl()
log.info('Connected!')
login(iliasService)
log.info(resourceBundle.getString('login.successful'))
Expand All @@ -32,7 +32,7 @@ class SetupController {
return iliasService
}

private IliasService createIliasService() {
private IliasService createIliasServiceFromUserUrl() {
while (true) {
String serverUrl = promptForServerUrl()
try {
Expand Down

0 comments on commit 208502e

Please sign in to comment.