001/* 002 * Copyright 2010 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.plugins.newsletter.daos; 017 018import java.util.Date; 019 020 021/** 022 * This class represents a newsletter's subscriber 023 */ 024public class Subscriber 025{ 026 private String _categoryId; 027 private String _siteName; 028 private String _email; 029 private Date _subscribedAt; 030 private String _token; 031 032 /** 033 * Returns the newsletter category 034 * @return the newsletter category 035 */ 036 public String getCategoryId () 037 { 038 return _categoryId; 039 } 040 041 /** 042 * Returns the newsletter site name 043 * @return the newsletter site name 044 */ 045 public String getSiteName () 046 { 047 return _siteName; 048 } 049 050 /** 051 * Get the subscriber email 052 * @return the subscriber email 053 */ 054 public String getEmail () 055 { 056 return _email; 057 } 058 059 /** 060 * Returns the date of subscription 061 * @return the date of subscription 062 */ 063 public Date getSubscribedAt () 064 { 065 return _subscribedAt; 066 } 067 068 /** 069 * Set the subscriber email 070 * @param email The email to set 071 */ 072 public void setEmail (String email) 073 { 074 _email = email; 075 } 076 077 /** 078 * Set the site name 079 * @param siteName The site name to set 080 */ 081 public void setSiteName (String siteName) 082 { 083 _siteName = siteName; 084 } 085 086 /** 087 * The id of the category 088 * @param categoryId The category's id 089 */ 090 public void setCategoryId (String categoryId) 091 { 092 _categoryId = categoryId; 093 } 094 095 /** 096 * Set the date of subscription 097 * @param subscribedAt The date of subscription 098 */ 099 public void setSubscribedAt (Date subscribedAt) 100 { 101 _subscribedAt = subscribedAt; 102 } 103 104 /** 105 * Get the user token 106 * @return the user token 107 */ 108 public String getToken () 109 { 110 return _token; 111 } 112 113 /** 114 * Set the user token 115 * @param token the user token 116 */ 117 public void setToken (String token) 118 { 119 _token = token; 120 } 121}