diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-07-15 16:15:35 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-07-15 16:15:35 +0300 |
commit | d75a75dfe1468a8eea96c42cccfa383119901faa (patch) | |
tree | 64d540771aac484ff543f37295b8cb4c17124964 /app/src/main/java/it/niedermann/nextcloud/deck/model | |
parent | 23a8442bb8883991b0b951cb1660599d5dc14a9d (diff) |
#573 Projects - Model access modifiers, getters & setters
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/model')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/projects/OcsProject.java | 22 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/projects/OcsProjectResource.java | 61 |
2 files changed, 75 insertions, 8 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/projects/OcsProject.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/projects/OcsProject.java index a3fa45bd0..0cbfbe77d 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/projects/OcsProject.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/projects/OcsProject.java @@ -8,7 +8,25 @@ import java.util.List; import it.niedermann.nextcloud.deck.model.interfaces.IRemoteEntity; public class OcsProject implements IRemoteEntity { - String name; + private String name; @NonNull - List<OcsProjectResource> resources = new ArrayList<>(); + private List<OcsProjectResource> resources = new ArrayList<>(); + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @NonNull + public List<OcsProjectResource> getResources() { + return resources; + } + + public void setResources(@NonNull List<OcsProjectResource> resources) { + this.resources.clear(); + this.resources.addAll(resources); + } } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/projects/OcsProjectResource.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/projects/OcsProjectResource.java index a8a29b3c0..0c8057137 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/projects/OcsProjectResource.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/projects/OcsProjectResource.java @@ -5,12 +5,61 @@ import androidx.annotation.Nullable; import it.niedermann.nextcloud.deck.model.interfaces.IRemoteEntity; public class OcsProjectResource implements IRemoteEntity { - String type; - String name; - String link; - String iconUrl; + private String type; + private String name; + private String link; + private String iconUrl; @Nullable - String mimetype; + private String mimetype; @Nullable - Boolean previewAvailable; + private Boolean previewAvailable; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLink() { + return link; + } + + public void setLink(String link) { + this.link = link; + } + + public String getIconUrl() { + return iconUrl; + } + + public void setIconUrl(String iconUrl) { + this.iconUrl = iconUrl; + } + + @Nullable + public String getMimetype() { + return mimetype; + } + + public void setMimetype(@Nullable String mimetype) { + this.mimetype = mimetype; + } + + public boolean getPreviewAvailable() { + return Boolean.TRUE.equals(previewAvailable); + } + + public void setPreviewAvailable(@Nullable Boolean previewAvailable) { + this.previewAvailable = previewAvailable; + } } |