KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: BasicDataController.java,v 1.7 2007/02/01 07:18:10 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  * Basic operations to perform with data objects by the application. Each data
31  * object needs to be somehow created and removed (if not for anything else
32  * at least for automated tests).
33  *
34  * @version $Id: BasicDataController.java,v 1.7 2007/02/01 07:18:10 bastafidli Exp $
35  * @author Miro Halas
36  * @code.reviewer Miro Halas
37  * @code.reviewed 1.3 2005/02/26 10:00:58 bastafidli
38  */

39 public interface BasicDataController extends DataController
40 {
41    /**
42     * Create data object.
43     *
44     * @param data - data object to create
45     * @return DataObject - newly created data object, null if user doesn't have
46     * access to that data object granted
47     * @throws OSSException - an error has occured
48     * @throws RemoteException - required since this method can be called remotely
49     */

50    DataObject create(
51       DataObject data
52    ) throws OSSException,
53             RemoteException JavaDoc;
54
55    /**
56     * Delete data object. This method will succeed only if the data object
57     * identified by specified id exists in the current domain, which is a domain
58     * identified by CallContext.getInstance().getCurrentDomainId(). If the
59     * object doesn't exist in the current domain, this method should throw an
60     * exception and shouldn't delete anything. If the client needs to delete
61     * data object in a different domain than the current one, it needs to
62     * provide for it its' own specific interface.
63     *
64     * @param iId - id of the data object to delete
65     * @throws OSSException - an error has occured
66     * @throws RemoteException - required since this method can be called remotely
67     */

68    void delete(
69       int iId
70    ) throws OSSException,
71             RemoteException JavaDoc;
72 }
73
Popular Tags