Skip to content

Commit 163deac

Browse files
committed
Turned "Cloud#type" into property
1 parent 0442f72 commit 163deac

File tree

26 files changed

+35
-35
lines changed

26 files changed

+35
-35
lines changed

data/src/apiKey/java/org/cryptomator/data/cloud/dropbox/DropboxCloudContentRepositoryFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public DropboxCloudContentRepositoryFactory(Context context) {
2424

2525
@Override
2626
public boolean supports(Cloud cloud) {
27-
return cloud.type() == DROPBOX;
27+
return cloud.getType() == DROPBOX;
2828
}
2929

3030
@Override

data/src/apiKey/java/org/cryptomator/data/cloud/onedrive/OnedriveCloudContentRepositoryFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public OnedriveCloudContentRepositoryFactory(Context context) {
2424

2525
@Override
2626
public boolean supports(Cloud cloud) {
27-
return cloud.type() == ONEDRIVE;
27+
return cloud.getType() == ONEDRIVE;
2828
}
2929

3030
@Override

data/src/apiKey/java/org/cryptomator/data/cloud/pcloud/PCloudContentRepositoryFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public PCloudContentRepositoryFactory(Context context) {
2424

2525
@Override
2626
public boolean supports(Cloud cloud) {
27-
return cloud.type() == PCLOUD;
27+
return cloud.getType() == PCLOUD;
2828
}
2929

3030
@Override

data/src/apkStorePlaystore/java/org/cryptomator/data/cloud/googledrive/GoogleDriveCloudContentRepositoryFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public GoogleDriveCloudContentRepositoryFactory(Context context, GoogleDriveIdCa
2525

2626
@Override
2727
public boolean supports(Cloud cloud) {
28-
return cloud.type() == CloudType.GOOGLE_DRIVE;
28+
return cloud.getType() == CloudType.GOOGLE_DRIVE;
2929
}
3030

3131
@Override

data/src/main/java/org/cryptomator/data/cloud/crypto/CryptoCloud.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public Long id() {
2020

2121
@NotNull
2222
@Override
23-
public CloudType type() {
23+
public CloudType getType() {
2424
return CloudType.CRYPTO;
2525
}
2626

data/src/main/java/org/cryptomator/data/cloud/crypto/CryptoCloudContentRepositoryFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public CryptoCloudContentRepositoryFactory(Lazy<CloudContentRepository> cloudCon
3535

3636
@Override
3737
public boolean supports(Cloud cloud) {
38-
return cloud.type() == CRYPTO;
38+
return cloud.getType() == CRYPTO;
3939
}
4040

4141
@Override

data/src/main/java/org/cryptomator/data/cloud/local/LocalStorageContentRepositoryFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public LocalStorageContentRepositoryFactory(Context context, MimeTypes mimeTypes
3131

3232
@Override
3333
public boolean supports(Cloud cloud) {
34-
return cloud.type() == LOCAL;
34+
return cloud.getType() == LOCAL;
3535
}
3636

3737
@Override

data/src/main/java/org/cryptomator/data/cloud/s3/S3CloudContentRepositoryFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public S3CloudContentRepositoryFactory(Context context, SharedPreferencesHandler
2727

2828
@Override
2929
public boolean supports(Cloud cloud) {
30-
return cloud.type() == S3;
30+
return cloud.getType() == S3;
3131
}
3232

3333
@Override

data/src/main/java/org/cryptomator/data/cloud/webdav/WebDavCloudContentRepositoryFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class WebDavCloudContentRepositoryFactory implements CloudContentReposito
2626

2727
@Override
2828
public boolean supports(Cloud cloud) {
29-
return cloud.type() == WEBDAV;
29+
return cloud.getType() == WEBDAV;
3030
}
3131

3232
@Override

data/src/main/java/org/cryptomator/data/db/mappers/CloudEntityMapper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ public Cloud fromEntity(CloudEntity entity) {
8989
public CloudEntity toEntity(Cloud domainObject) {
9090
CloudEntity result = new CloudEntity();
9191
result.setId(domainObject.id());
92-
result.setType(domainObject.type().name());
93-
switch (domainObject.type()) {
92+
result.setType(domainObject.getType().name());
93+
switch (domainObject.getType()) {
9494
case DROPBOX:
9595
result.setAccessToken(((DropboxCloud) domainObject).accessToken());
9696
result.setUsername(((DropboxCloud) domainObject).username());
@@ -126,7 +126,7 @@ public CloudEntity toEntity(Cloud domainObject) {
126126
result.setWebdavCertificate(((WebDavCloud) domainObject).certificate());
127127
break;
128128
default:
129-
throw new IllegalStateException("Unhandled enum constant " + domainObject.type());
129+
throw new IllegalStateException("Unhandled enum constant " + domainObject.getType());
130130
}
131131
return result;
132132
}

0 commit comments

Comments
 (0)