-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #243 from netgrif/NAE-1946
[NAE-1946] Remote file connector to S3
- Loading branch information
Showing
40 changed files
with
952 additions
and
329 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
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
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
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
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
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
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
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
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
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
17 changes: 17 additions & 0 deletions
17
src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/MinIoStorage.groovy
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,17 @@ | ||
package com.netgrif.application.engine.petrinet.domain.dataset; | ||
|
||
class MinIoStorage extends Storage { | ||
private String bucket | ||
|
||
MinIoStorage() { | ||
super(StorageType.MINIO) | ||
} | ||
|
||
String getBucket() { | ||
return bucket | ||
} | ||
|
||
void setBucket(String bucket) { | ||
this.bucket = bucket | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/Storage.groovy
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,45 @@ | ||
package com.netgrif.application.engine.petrinet.domain.dataset | ||
|
||
import com.querydsl.core.annotations.PropertyType | ||
import com.querydsl.core.annotations.QueryType | ||
|
||
class Storage { | ||
private StorageType type | ||
private String host | ||
|
||
Storage() { | ||
this.type = StorageType.LOCAL | ||
} | ||
|
||
Storage(StorageType type) { | ||
this() | ||
this.type = type | ||
} | ||
|
||
Storage(StorageType type, String host) { | ||
this(type) | ||
this.host = host | ||
} | ||
|
||
StorageType getType() { | ||
return type | ||
} | ||
|
||
void setType(StorageType type) { | ||
this.type = type | ||
} | ||
|
||
String getHost() { | ||
return host | ||
} | ||
|
||
void setHost(String host) { | ||
this.host = host | ||
} | ||
|
||
@Override | ||
@QueryType(PropertyType.NONE) | ||
MetaClass getMetaClass() { | ||
return this.metaClass | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/StorageField.groovy
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,29 @@ | ||
package com.netgrif.application.engine.petrinet.domain.dataset | ||
|
||
abstract class StorageField<T> extends Field<T> { | ||
static final long serialVersionUID = -9172755427378929924L | ||
private Storage storage | ||
|
||
StorageField() { | ||
super() | ||
} | ||
|
||
StorageType getStorageType() { | ||
if (storage == null) { | ||
return StorageType.LOCAL | ||
} | ||
return storage.getType() | ||
} | ||
|
||
void setStorageType(StorageType storageType) { | ||
this.storage.setType(storageType) | ||
} | ||
|
||
Storage getStorage() { | ||
return storage | ||
} | ||
|
||
void setStorage(Storage storage) { | ||
this.storage = storage | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/StorageType.groovy
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,6 @@ | ||
package com.netgrif.application.engine.petrinet.domain.dataset | ||
|
||
enum StorageType { | ||
LOCAL, | ||
MINIO; | ||
} |
Oops, something went wrong.