KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > ipanema > transfer > TransferRegistry


1 /*
2  * Created on 20.10.2004
3  */

4 package com.nightlabs.ipanema.transfer;
5
6
7 /**
8  * This interface defines the registry which is used to manage Transfers of a certain type.
9  * One registry might manage transfers of different types as well. It is responsible for
10  * generating unique transferIDs within the context of the local organisation and dependent
11  * of the transferTypeID.
12  *
13  * @author Marco Schulze - marco at nightlabs dot de
14  */

15 public interface TransferRegistry
16 {
17     /**
18      * This method should return the local organisationID.
19      *
20      * @return Returns the organisationID of the organisation which owns the datastore.
21      */

22     public String JavaDoc getOrganisationID();
23
24     /**
25      * This method adds an instance of Transfer. In most of the cases, you don't need to call this
26      * method directly, because every Transfer does a self-registration, if it has been created
27      * by this organisation.
28      *
29      * @param transfer
30      */

31     public void addTransfer(Transfer transfer);
32
33     /**
34      * @param organisationID This is only used for avoiding problems. A TransferRegistry is only able
35      * to create IDs for its own organisation.
36      * @param transferTypeID
37      * @return
38      */

39     public long createTransferID(String JavaDoc organisationID, String JavaDoc transferTypeID);
40 }
41
Popular Tags