KickJava   Java API By Example, From Geeks To Geeks.

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


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.Layout;
21 import com.blandware.atleap.persistence.exception.DeleteException;
22 import com.blandware.atleap.persistence.exception.UpdateException;
23 import com.blandware.atleap.service.exception.BeanAlreadyExistsException;
24 import com.blandware.atleap.service.exception.BeanNotFoundException;
25
26 /**
27  * <p>Business Delegate (Proxy) Interface to handle communication between web and
28  * persistence layer.
29  * </p>
30  * <p><a HREF="LayoutManager.java.htm"><i>View Source</i></a>
31  * </p>
32  *
33  * @author Sergey Zubtcovskii <a HREF="mailto:sergey.zubtcovskii@blandware.com">&lt;sergey.zubtcovskii@blandware.com&gt;</a>
34  * @version $Revision: 1.8 $ $Date: 2005/11/28 15:56:40 $
35  */

36 public interface LayoutManager extends BaseManager {
37     //~ CRUD Methods ================================================================
38

39     /**
40      * Creates new layout
41      *
42      * @param layout Layout to create
43      * @return ID of created layout
44      * @throws BeanAlreadyExistsException if layout with the same definition or name already exist
45      */

46     public Long JavaDoc createLayout(Layout layout) throws BeanAlreadyExistsException;
47
48     /**
49      * Retrieves layout with specified ID
50      *
51      * @param layoutId ID of layout to retrieve
52      * @return Layout or null if no layout with specified ID exists in database
53      */

54     public Layout retrieveLayout(Long JavaDoc layoutId);
55
56     /**
57      * Updates layout
58      *
59      * @param layout Layout to update
60      * @throws BeanAlreadyExistsException if layout with the same definition or name already exist
61      * @throws BeanNotFoundException if layout with specified ID couldn't be found
62      */

63     public void updateLayout(Layout layout) throws BeanAlreadyExistsException, BeanNotFoundException, UpdateException;
64
65
66     /**
67      * Removes layout
68      *
69      * @param layoutId ID of layout to remove
70      * @throws DeleteException if layout cannot be deleted (e.g. there is one or more content page
71      * based on it)
72      */

73     public void deleteLayout(Long JavaDoc layoutId) throws DeleteException, BeanNotFoundException;
74
75     // ~ Additional methods ================================================================
76

77     /**
78      * Retrieves filtered/sorted collection of layouts
79      *
80      * @param queryInfo Object that contains information about how to filter and sort data
81      * @return Collection of layouts
82      */

83     public PartialCollection listLayouts(QueryInfo queryInfo);
84
85     // ~ Finders ================================================================
86

87     /**
88      * Finds layout by content page URI
89      *
90      * @param contentPageUri URI of content page to find layout
91      * @return Layout or null if nothing was found
92      */

93     public Layout findLayoutByContentPageUri(String JavaDoc contentPageUri);
94
95     /**
96      * Finds layout by name of Struts tile definition name
97      *
98      * @param definitionName Name of definition to search by
99      * @return Layout or null if nothing was found
100      */

101     public Layout findLayoutByDefinition(String JavaDoc definitionName);
102
103     /**
104      * Finds layout by its name
105      *
106      * @param name Name of layout to search by
107      * @return Layout or null if nothing was found
108      */

109     public Layout findLayoutByName(String JavaDoc name);
110 }
111
Popular Tags