-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Literally just merged ICAuthenticationInfo with ICServerInfo. Had to change constructors of course * Reworked the endpoint login and connection system to work with the new AccountInfo Class. This caused a lot of change in the test code * Fixed renaming issue * Removed unused method * Removed unused method * Renamed ICAccountInfo contructor (legacy artifact) * Review Requests on #254 * Recategorization and little code beautification * name-attribut artifact replacement * Made everything use anAccountINfo instead of Dictionary Made everything use 'accountName' instead of 'name' * Fixed "Account edit" * Fixed Test Defaults
- Loading branch information
1 parent
cd402f3
commit dbba65e
Showing
162 changed files
with
429 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
An ICAccountInfo is a dataobject holding information needed to connect to a server such as server address and user credentials. It also ensures basic IMAP datatype validity. |
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/class/initialAccountName.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
initialAccountName | ||
|
||
^ String empty |
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/class/initialSsl.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
initialSsl | ||
|
||
^ true |
2 changes: 1 addition & 1 deletion
2
...cationInfo.class/class/initialPassword.st → .../ICAccountInfo.class/class/invalidHost.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
constants | ||
initialPassword | ||
invalidHost | ||
|
||
^ String empty |
2 changes: 1 addition & 1 deletion
2
...cationInfo.class/class/initialUsername.st → ...ccountInfo.class/class/invalidPassword.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
constants | ||
initialUsername | ||
invalidPassword | ||
|
||
^ String empty |
2 changes: 1 addition & 1 deletion
2
...e/ICServerInfo.class/class/defaultPort.st → .../ICAccountInfo.class/class/invalidPort.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
constants | ||
defaultPort | ||
invalidPort | ||
|
||
^ -1 |
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/class/invalidUsername.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
invalidUsername | ||
|
||
^ String empty |
9 changes: 9 additions & 0 deletions
9
packages/IMAPClient-Core.package/ICAccountInfo.class/class/newWith..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
instance creation | ||
newWith: aDataDictionary | ||
|
||
^ self newWithAccountName: (aDataDictionary at: 'accountName') | ||
host: (aDataDictionary at: 'address') | ||
port: ((aDataDictionary at: 'port') asNumber) | ||
username: (aDataDictionary at: 'username') | ||
password: (aDataDictionary at: 'password') | ||
ssl: (aDataDictionary at: 'ssl') |
10 changes: 10 additions & 0 deletions
10
....package/ICAccountInfo.class/class/newWithAccountName.host.port.username.password.ssl..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
instance creation | ||
newWithAccountName: aNameString host: aHostString port: aPortNumber username: aUsernameString password: aPasswordString ssl: aSSLBool | ||
|
||
^ self new | ||
accountName: aNameString; | ||
host: aHostString; | ||
port: aPortNumber; | ||
username: aUsernameString; | ||
password: aPasswordString; | ||
ssl: aSSLBool |
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/accountName..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
accountName: aString | ||
|
||
accountName := aString |
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/accountName.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
accountName | ||
|
||
^ accountName ifNil: [accountName := self class initialAccountName] |
14 changes: 14 additions & 0 deletions
14
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/asDictionary.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
accessing | ||
asDictionary | ||
|
||
| dict | | ||
dict := Dictionary new. | ||
dict at: 'ssl' put: self ssl; | ||
at: 'accountName' put: self accountName; | ||
at: 'address' put: self host; | ||
at: 'port' put: self port; | ||
at: 'username' put: self username; | ||
at: 'password' put: self password. | ||
|
||
^ dict | ||
|
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/hasValidServerInfo.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
validation | ||
hasValidServerInfo | ||
|
||
^ self host ~= self class invalidHost | ||
and: [self port ~= self class invalidPort] |
5 changes: 5 additions & 0 deletions
5
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/hasValidUserInfo.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
validation | ||
hasValidUserInfo | ||
|
||
^ self username ~= self class invalidUsername | ||
and: [self password ~= self class invalidPassword] |
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/host.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
host | ||
|
||
^ host ifNil: [host := self class invalidHost] |
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/isValid.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
validation | ||
isValid | ||
|
||
^ self hasValidServerInfo and: self hasValidUserInfo |
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/password.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
password | ||
|
||
^ password ifNil: [password := self class invalidPassword] |
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/port.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
port | ||
|
||
^ port ifNil: [port := self class invalidPort] |
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/printOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
printing | ||
printOn: aStream | ||
|
||
aStream nextPutAll: self accountName, ' ', self host, ' ', self port, ' ', self username, ' ', self password, ' ', self ssl |
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/ssl.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
ssl | ||
|
||
^ ssl ifNil: [ssl := self class initialSsl] |
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICAccountInfo.class/instance/username.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
username | ||
|
||
^ username ifNil: [username := self class invalidUsername]. |
File renamed without changes.
31 changes: 31 additions & 0 deletions
31
packages/IMAPClient-Core.package/ICAccountInfo.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"class" : { | ||
"initialAccountName" : "tg 7/10/2019 17:43", | ||
"initialSsl" : "tg 7/10/2019 17:43", | ||
"invalidHost" : "tg 7/10/2019 20:08", | ||
"invalidPassword" : "tg 7/10/2019 20:10", | ||
"invalidPort" : "tg 7/10/2019 20:09", | ||
"invalidUsername" : "tg 7/10/2019 20:10", | ||
"newWith:" : "tg 7/18/2019 23:08", | ||
"newWithAccountName:host:port:username:password:ssl:" : "tg 7/18/2019 23:01" }, | ||
"instance" : { | ||
"accountName" : "tg 7/10/2019 20:20", | ||
"accountName:" : "tg 7/10/2019 17:35", | ||
"asDictionary" : "tg 7/18/2019 23:07", | ||
"canConvert:" : "tg 7/10/2019 17:18", | ||
"hasValidServerInfo" : "tg 7/15/2019 12:08", | ||
"hasValidUserInfo" : "tg 7/15/2019 12:08", | ||
"host" : "tg 7/10/2019 20:06", | ||
"host:" : "tg 7/10/2019 17:11", | ||
"isValid" : "tg 7/15/2019 12:08", | ||
"password" : "tg 7/15/2019 12:11", | ||
"password:" : "tg 7/10/2019 17:18", | ||
"passwordAsIMAPString" : "tg 7/10/2019 17:18", | ||
"port" : "tg 7/10/2019 20:09", | ||
"port:" : "tg 7/10/2019 17:11", | ||
"printOn:" : "tg 7/10/2019 18:06", | ||
"ssl" : "tg 7/10/2019 20:21", | ||
"ssl:" : "tg 7/10/2019 17:34", | ||
"username" : "tg 7/15/2019 12:11", | ||
"username:" : "tg 7/10/2019 17:18", | ||
"usernameAsIMAPString" : "tg 7/10/2019 17:18" } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
packages/IMAPClient-Core.package/ICAuthenticationInfo.class/README.md
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
packages/IMAPClient-Core.package/ICAuthenticationInfo.class/class/for.using..st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/isValid.st
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/password.st
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
packages/IMAPClient-Core.package/ICAuthenticationInfo.class/instance/username.st
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
packages/IMAPClient-Core.package/ICAuthenticationInfo.class/methodProperties.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICEndPoint.class/class/defaultStreamClass.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
defaultStreamClass | ||
|
||
^ SocketStream |
2 changes: 1 addition & 1 deletion
2
...Point.class/instance/folderNameOfTrash.st → ...EndPoint.class/class/folderNameOfTrash.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
constants | ||
folderNameOfTrash | ||
|
||
^ 'Trash' |
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICEndPoint.class/instance/accountInfo..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
accountInfo: anICAccountInfo | ||
|
||
accountInfo := anICAccountInfo |
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICEndPoint.class/instance/accountInfo.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
accountInfo | ||
|
||
^ accountInfo ifNil: [accountInfo := ICAccountInfo new] |
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICEndPoint.class/instance/asAccountInfoDictionary.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
asAccountInfoDictionary | ||
|
||
^ self accountInfo asDictionary |
17 changes: 0 additions & 17 deletions
17
packages/IMAPClient-Core.package/ICEndPoint.class/instance/asDictionary.st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/IMAPClient-Core.package/ICEndPoint.class/instance/authenticationInfo..st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/IMAPClient-Core.package/ICEndPoint.class/instance/authenticationInfo.st
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkConnected.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
error handling | ||
checkConnected | ||
|
||
(self fatalErrorOccured) | ||
ifTrue: [^ false]. | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
packages/IMAPClient-Core.package/ICEndPoint.class/instance/checkForParameterError.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
connection | ||
error handling | ||
checkForParameterError | ||
|
||
(self fatalErrorOccured) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/IMAPClient-Core.package/ICEndPoint.class/instance/close.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
login | ||
connection | ||
close | ||
|
||
self stream close. | ||
|
4 changes: 4 additions & 0 deletions
4
packages/IMAPClient-Core.package/ICEndPoint.class/instance/connect.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
connection | ||
connect | ||
|
||
self connectWith: self class defaultStreamClass |
14 changes: 14 additions & 0 deletions
14
packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectAndLoginWith..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
connection | ||
connectAndLoginWith: anICAccountInfo | ||
|
||
self accountInfo: anICAccountInfo. | ||
|
||
[self | ||
connect; | ||
login] | ||
valueWithin: 2 seconds | ||
onTimeout: [ | ||
(self fatalErrorOccured) | ||
ifFalse: [ | ||
UIManager default inform: 'Connection could not be established'. | ||
self fatalErrorOccured: true]] |
4 changes: 0 additions & 4 deletions
4
packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.on..st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.on.with..st
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
packages/IMAPClient-Core.package/ICEndPoint.class/instance/connectTo.with..st
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.