KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > service > core > ContentLocaleManager


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.service.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.ContentLocale;
21 import com.blandware.atleap.persistence.exception.DeleteException;
22 import com.blandware.atleap.service.exception.BeanAlreadyExistsException;
23 import com.blandware.atleap.service.exception.BeanNotFoundException;
24
25 import java.util.List JavaDoc;
26
27 /**
28  * <p>Business Delegate (Proxy) Interface to handle communication between web and
29  * persistence layer. Caches list of all available locales, active locales and default one
30  * </p>
31  * <p><a HREF="ContentLocaleManager.java.htm"><i>View Source</i></a>
32  * </p>
33  *
34  * @author Sergey Zubtcovskii <a HREF="mailto:sergey.zubtcovskii@blandware.com">&lt;sergey.zubtcovskii@blandware.com&gt;</a>
35  * @version $Revision: 1.10 $ $Date: 2005/08/02 14:53:39 $
36  */

37 public interface ContentLocaleManager extends BaseManager {
38
39     /**
40      * Performs initialization of manager
41      */

42     public void initialize();
43
44     //~ CRUD Methods ================================================================
45

46     /**
47      * Creates new content locale
48      *
49      * @param contentLocale Content locale to create
50      * @throws BeanAlreadyExistsException if locale with the same identifier already exists
51      */

52     public void createContentLocale(ContentLocale contentLocale) throws BeanAlreadyExistsException;
53
54     /**
55      * Retrieves content locale with specified identifier
56      *
57      * @param localeIdentifier
58      * @return Content locale or null if no content locale with specified identifier exists in database
59      */

60     public ContentLocale retrieveContentLocale(String JavaDoc localeIdentifier);
61
62     /**
63      * Updates content locale
64      *
65      * @param contentLocale content locale to update
66      */

67     public void updateContentLocale(ContentLocale contentLocale);
68
69
70     /**
71      * Removes content locale
72      *
73      * @param localeIdentifier Identifier of content locale to remove
74      * @throws DeleteException if locale cannot be deleted (e.g. one or more content field values are associated with it)
75      */

76     public void deleteContentLocale(String JavaDoc localeIdentifier) throws DeleteException, BeanNotFoundException;
77
78     // ~ Additional methods ================================================================
79

80     /**
81      * Retrieves filtered/sorted collection of content locales
82      *
83      * @param queryInfo Object that contains information about how to filter and sort data
84      * @return Collection of content locales
85      */

86     public PartialCollection listContentLocales(QueryInfo queryInfo);
87
88     /**
89      * Finds default content locale.
90      *
91      * @return Default content locale or null if nothing was found
92      */

93     public ContentLocale getDefaultLocale();
94
95     /**
96      * Returns list of locales, available in system
97      *
98      * @return All avaialble locales
99      */

100     public List JavaDoc getAvailableLocales();
101
102     /**
103      * Returns list of active locales
104      *
105      * @return List of active locales
106      */

107     public List JavaDoc getActiveLocales();
108
109     // ~ Finders ================================================================
110

111 }
112
Popular Tags