diff --git a/core/src/main/groovy/com/muwire/core/filefeeds/UIFeedConfigurationEvent.groovy b/core/src/main/groovy/com/muwire/core/filefeeds/UIFeedConfigurationEvent.groovy new file mode 100644 index 00000000..9917c30c --- /dev/null +++ b/core/src/main/groovy/com/muwire/core/filefeeds/UIFeedConfigurationEvent.groovy @@ -0,0 +1,11 @@ +package com.muwire.core.filefeeds + +import com.muwire.core.Event + +/** + * Emitted when configuration of a feed changes. + * The object should already contain the updated values. + */ +class UIFeedConfigurationEvent extends Event { + Feed feed +} diff --git a/core/src/main/java/com/muwire/core/filefeeds/Feed.java b/core/src/main/java/com/muwire/core/filefeeds/Feed.java new file mode 100644 index 00000000..610dbb5a --- /dev/null +++ b/core/src/main/java/com/muwire/core/filefeeds/Feed.java @@ -0,0 +1,54 @@ +package com.muwire.core.filefeeds; + +import com.muwire.core.Persona; + +public class Feed { + + private final Persona publisher; + + private int updateInterval; + private long lastUpdated; + private int itemsToKeep; + private boolean autoDownload; + + public Feed(Persona publisher) { + this.publisher = publisher; + } + + public int getUpdateInterval() { + return updateInterval; + } + + public void setUpdateInterval(int updateInterval) { + this.updateInterval = updateInterval; + } + + public long getLastUpdated() { + return lastUpdated; + } + + public void setLastUpdated(long lastUpdated) { + this.lastUpdated = lastUpdated; + } + + public int getItemsToKeep() { + return itemsToKeep; + } + + public void setItemsToKeep(int itemsToKeep) { + this.itemsToKeep = itemsToKeep; + } + + public boolean isAutoDownload() { + return autoDownload; + } + + public void setAutoDownload(boolean autoDownload) { + this.autoDownload = autoDownload; + } + + public Persona getPublisher() { + return publisher; + } + +}