1    /*
2     * Copyright 2009 :torweg free software group
3     *
4     * This program is free software: you can redistribute it and/or modify
5     * it under the terms of the GNU General Public License as published by
6     * the Free Software Foundation, either version 3 of the License, or
7     * (at your option) any later version.
8     * 
9     * This program is distributed in the hope that it will be useful,
10    * but WITHOUT ANY WARRANTY; without even the implied warranty of
11    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    * GNU General Public License for more details.
13    * 
14    * You should have received a copy of the GNU General Public License
15    * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16    *
17    */
18   package org.torweg.pulse.component.cms;
19   
20   import javax.xml.bind.annotation.XmlAccessOrder;
21   import javax.xml.bind.annotation.XmlAccessType;
22   import javax.xml.bind.annotation.XmlAccessorOrder;
23   import javax.xml.bind.annotation.XmlAccessorType;
24   import javax.xml.bind.annotation.XmlRootElement;
25   
26   import org.torweg.pulse.service.request.ServiceRequest;
27   
28   /**
29    * Abstract base-class to derive a data-{@code Object} for the e-mail/s
30    * being sent by {@code CMSFormProcessorMailTask}.
31    * 
32    * @param <T>
33    *            the actual implementation of the
34    *            {@code AbstractCMSFormProcessorMailTaskEmailData}
35    * 
36    * @author Daniel Dietz
37    * @version $Revision: 1464 $
38    */
39   @XmlRootElement(name = "abstract-cms-form-processor-mail-task-email-data")
40   @XmlAccessorOrder(XmlAccessOrder.UNDEFINED)
41   @XmlAccessorType(XmlAccessType.FIELD)
42   public abstract class AbstractCMSFormProcessorMailTaskEmailData<T extends AbstractCMSFormProcessorMailTaskEmailData<?>> {
43   
44       /**
45        * Factory method: returns a
46        * {@code AbstractCMSFormProcessorMailTaskEmailData}.
47        * 
48        * @param request
49        *            the current {@code ServiceRequest}
50        * 
51        * @return a {@code AbstractCMSFormProcessorMailTaskEmailData}
52        */
53       public abstract T newEmailData(final ServiceRequest request);
54   
55   }
56