Update of 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/domain
In directory 
james.mmbase.org:/tmp/cvs-serv29630/portlets-newsletter/src/java/com/finalist/newsletter/domain

Modified Files:
        Newsletter.java Tag.java Subscription.java 
Log Message:
CMSC-818 domain class update


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/domain
See also: http://www.mmbase.org/jira/browse/CMSC-818


Index: Newsletter.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/domain/Newsletter.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- Newsletter.java     18 Apr 2008 08:02:22 -0000      1.6
+++ Newsletter.java     18 Apr 2008 08:06:22 -0000      1.7
@@ -2,22 +2,33 @@
 
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 public class Newsletter {
 
    private int id;
+
    private String format;
+
    private String status;
+
    private Date interval;
-   private List<Tag> tags = new ArrayList<Tag>();
+
+       private Set<Tag> tags = new HashSet<Tag>();
+
    private String title;
 
    private int number;
-   private String replytoName;
-   private String replytoMail;
+
+       private String replyName;
+
+       private String replyAddress;
+
    private String fromName;
-   private String fromMail;
+
+       private String fromAddress;
 
    public int getId() {
       return id;
@@ -35,14 +46,6 @@
       this.number = number;
    }
 
-   public List<Tag> getTags() {
-      return tags;
-   }
-
-   public void setTags(List<Tag> tags) {
-      this.tags = tags;
-   }
-
    public String getTitle() {
       return title;
    }
@@ -75,21 +78,20 @@
       this.status = status;
    }
 
-
-   public String getReplytoName() {
-      return replytoName;
+       public String getReplyName() {
+               return replyName;
    }
 
-   public void setReplytoName(String replytoName) {
-      this.replytoName = replytoName;
+       public void setReplyName(String replyName) {
+               this.replyName = replyName;
    }
 
-   public String getReplytoMail() {
-      return replytoMail;
+       public String getReplyAddress() {
+               return replyAddress;
    }
 
-   public void setReplytoMail(String replytoMail) {
-      this.replytoMail = replytoMail;
+       public void setReplyAddress(String replyAddress) {
+               this.replyAddress = replyAddress;
    }
 
    public String getFromName() {
@@ -100,11 +102,20 @@
       this.fromName = fromName;
    }
 
-   public String getFromMail() {
-      return fromMail;
+       public String getFromAddress() {
+               return fromAddress;
    }
 
-   public void setFromMail(String fromMail) {
-      this.fromMail = fromMail;
+       public void setFromAddress(String fromAddress) {
+               this.fromAddress = fromAddress;
    }
+
+       public Set<Tag> getTags() {
+               return tags;
+       }
+
+       public void setTags(Set<Tag> tags) {
+               this.tags = tags;
+       }
+
 }


Index: Tag.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/domain/Tag.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Tag.java    10 Apr 2008 10:07:47 -0000      1.3
+++ Tag.java    18 Apr 2008 08:06:22 -0000      1.4
@@ -1,15 +1,18 @@
 package com.finalist.newsletter.domain;
 
 public class Tag {
+       private int id;
    private String name;
-   private Boolean subscription;
+       private boolean subscription = false;
 
-   public Boolean getSubscription() {
+
+
+       public boolean isSubscription() {
       return subscription;
    }
 
-   public void setSubscription(Boolean subscription) {
-      this.subscription = false;
+       public void setSubscription(boolean subscription) {
+               this.subscription = subscription;
    }
 
    public String getName() {
@@ -19,4 +22,12 @@
    public void setName(String name) {
       this.name = name;
    }
+
+       public int getId() {
+               return id;
+       }
+
+       public void setId(int id) {
+               this.id = id;
+       }
 }


Index: Subscription.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/java/com/finalist/newsletter/domain/Subscription.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Subscription.java   18 Apr 2008 08:02:22 -0000      1.3
+++ Subscription.java   18 Apr 2008 08:06:22 -0000      1.4
@@ -1,14 +1,26 @@
 package com.finalist.newsletter.domain;
 
+import java.util.HashSet;
+import java.util.Set;
+
 import com.finalist.cmsc.services.community.person.Person;
 
-public class Subscription{
+public class Subscription {
 
    private Person subscriber;
+
    private String mimeType;
-   private int id;
+       private STATUS status = STATUS.INACTIVE;
+
+       private Set<Tag> tags = new HashSet<Tag>();
    private Newsletter newsletter;
 
+       private int id;
+       
+        public enum STATUS {
+             ACTIVE, PAUSED, INACTIVE
+          }
+
    public Person getSubscriber() {
       return subscriber;
    }
@@ -34,10 +46,32 @@
    }
 
    public Newsletter getNewsletter() {
-      return newsletter;
+               return null; // To change body of created methods use File | 
Settings
+               // | File Templates.
+       }
+
+
+       public Set<Tag> getTags() {
+               return tags;
    }
 
+       public void setTags(Set<Tag> tags) {
+               this.tags = tags;
+       }
+
+       
+
    public void setNewsletter(Newsletter newsletter) {
       this.newsletter = newsletter;
    }
+
+       public STATUS getStatus() {
+               return status;
+       }
+
+       public void setStatus(STATUS status) {
+               this.status = status;
+       }
+       
+       
 }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to