KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > core > logic > DataController


1 /*
2  * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: DataController.java,v 1.7 2007/01/28 06:54:54 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21
22 package org.opensubsystems.core.logic;
23
24 import java.rmi.RemoteException JavaDoc;
25
26 import org.opensubsystems.core.data.DataObject;
27 import org.opensubsystems.core.error.OSSException;
28
29 /**
30  * Base interface for all controllers managing data objects. The primary purpose
31  * of data controller is to implement additional functionality on top of the
32  * persistence layer such as security checks, logging, etc. Every data object
33  * has to be accessible somehow to be available to the presentation tier and
34  * controller, which makes data object accessible should implement this interface.
35  *
36  * @version $Id: DataController.java,v 1.7 2007/01/28 06:54:54 bastafidli Exp $
37  * @author Miro Halas
38  * @code.reviewer Miro Halas
39  * @code.reviewed 1.4 2005/02/26 10:00:58 bastafidli
40  */

41 public interface DataController extends StatelessController
42 {
43    /**
44     * Get data object knowing just the unique id. This method will succeed only
45     * if the data object identified by specified id exists in the current
46     * domain, which is a domain identified by
47     * CallContext.getInstance().getCurrentDomainId(). If the object doesn't
48     * exist in the current domain, this method should throw an exception and
49     * shouldn't retrieve anything. If the client needs to retrieve data object
50     * in a different domain than the current one, it needs to provide for it
51     * its' own specific interface.
52     *
53     * @param iId - ID of the data object to retrieve
54     * @return DataObject - retrieved data object, null if the data object
55     * doesn't exists or if user doesn't have access to that
56     * data object granted
57     * @throws OSSException - an error has occured
58     * @throws RemoteException - required since this method can be called remotely
59     */

60    DataObject get(
61       int iId
62    ) throws OSSException,
63             RemoteException JavaDoc;
64 }
65
Popular Tags