KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > persistence > core > MailTemplateDAO


1 /*
2  * Copyright 2004 Blandware (http://www.blandware.com)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package com.blandware.atleap.persistence.core;
17
18 import com.blandware.atleap.common.util.PartialCollection;
19 import com.blandware.atleap.common.util.QueryInfo;
20 import com.blandware.atleap.model.core.MailTemplate;
21
22 import java.util.Map JavaDoc;
23
24 /**
25  * <p>DAO for mail message template</p>
26  * <p><a HREF="MailMailMessageTemplateDAO.java.htm"><i>View Source</i></a></p>
27  *
28  * @author Sergey Zubtcovskii <a HREF="mailto:sergey.zubtcovskii@blandware.com">&lt;sergey.zubtcovskii@blandware.com&gt;</a>
29  * @version $Revision: 1.3 $ $Date: 2005/07/29 14:12:18 $
30  */

31 public interface MailTemplateDAO extends LocalizableDAO {
32
33     // ~ CRUD methods ================================================================
34

35     /**
36      * Creates new template. Template is created without links to pages or resources.
37      *
38      * @param template Value object that represents what template must be created
39      * @return ID of created template
40      */

41     public Long JavaDoc createMailTemplate(MailTemplate template);
42
43     /**
44      * Retrieves template with specified ID
45      *
46      * @param templateId ID to search by
47      * @return Template with specified id or null if no such template could be found
48      */

49     public MailTemplate retrieveMailTemplate(Long JavaDoc templateId);
50
51     /**
52      * Updates template
53      *
54      * @param template Template to update
55      * @param linkedObjects Map of pairs <code>uri -&gt; object<code>, which link URI in the body to
56      * corresponding object (resource or page) if it exists
57      */

58     public void updateMailTemplate(MailTemplate template, Map JavaDoc linkedObjects);
59
60     /**
61      * Deletes template
62      *
63      * @param template Template to delete
64      */

65     public void deleteMailTemplate(MailTemplate template);
66
67     // ~ Additional methods ================================================================
68

69     /**
70      * Retrieves filtered/sorted collection of templates.
71      *
72      * @param queryInfo Object that contains information about how to filter and sort data
73      * @return Collection of templates
74      */

75     public PartialCollection listMailTemplates(QueryInfo queryInfo);
76
77     // ~ Finders ================================================================
78

79     /**
80      * Finds template by its identifier
81      *
82      * @param identifier Identifier of template to search by
83      * @return Template or null if nothing was found
84      */

85     public MailTemplate findMailTemplateByIdentifier(String JavaDoc identifier);
86
87 }
88
Popular Tags