|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--jp.gr.javacons.jim.Manager
The Manager class manages all of the DataProvider objects and DataReferenceMaintainer objects that exist within an application.
Manager performs the following functions:
(1) Dynamically maintains consistency of the relationship between the DataReferenceMaintainer objects registered to the Manager object and the DataHolder objects maintained by the DataProvider objects also registered in the Manager object, to which each of the DataReferenceMaintainer objects refers.
(2) Supports the display and user configuration of parameters for objects registered in the Manager object by way of various editors.
The same Manager object can always be acquired after invoking the getInstance method, which is a static method of Manager . The DataProvider object and the DataReferenceMaintainer object are registered to the Manager object acquired with the getInstance method.
The Manager object is a type of logical container. After a DataProvider object and a DataReferencer object have been registered in the Manager object, each of their respective operations are invoked, and the reference relation from the DataReferencer object to the DataHolder object(s) owned by the DataProvider is maintained.
For instance, provided that classes implementing DataProvider and DataReferenceMaintainer interfaces exist, an application could be implemented as follows.
Manager m = Manager.getInstance(); // creation, configuration and registration of a DataProvider object DataProvider dp = new ActualDataProvider1(); Various configuration of the ActualDataProvider1 object to be done here m.addDataProvider(dp); // creation, configuration and registration of a // DataReferenceMaintainer object DataReferenceMaintainer drm = new ActualDataUser1(); Various configuration of the ActualDataUser1 object to be done here m.addDataReferenceMaintainer(drm); // for other objects, repeat the process given above (in arbitrary // order)
If the DataProvider object or the DataReferenceMaintainer object is a subclass of java.awt.Component, the registration and deregistration of each object with the Manager object may be performed by the addNotify and removeNotify methods. If those objects are provided as JavaBeans, application development without any hand coding becomes possible using any RAD tool that supports JavaBeans.
メソッドの概要 | |
void |
addDataProvider(DataProvider dp)
This method registers the DataProvider object given by the argument, and invokes its addedAsDataProvider method. |
void |
addDataReferenceMaintainer(DataReferenceMaintainer rm)
The DataReferenceMaintainer object given by the argument is registered, and its addedAsDataReferenceMaintainer method is invoked. |
boolean |
canSetDataProviderName(DataProvider dataProvider,
String dataProviderName)
The return value indicates whether or not the character string of the second argument can be used to set dataProviderName of the DataProvider object in the first argument. |
static boolean |
containsInvalidCharacter(String name)
The return value indicates whether the argument, String name, contains invalid characters (space, etc.) for identifying an object |
DataHolder |
findDataHolder(DataProvider dp,
String dataHolderName)
|
DataHolder |
findDataHolder(String dataHolderID)
The DataHolder object corresponding to a match in the argument is returned from the DataHolder objects owned by the DataProvider object registered in the Manager object. |
DataHolder |
findDataHolder(String dataProviderName,
String dataHolderName)
The DataHolder object corresponding to a match in the arguments is returned from the DataHolder objects owned by the DataProvider object registered in the Manager object. |
DataProvider |
getDataProvider(String dataProviderName)
The DataProvider object corresponding to the argument is returned from the DataProvider objects registered in the Manager object. |
DataProvider[] |
getDataProviders()
The DataProvider objects registered in the Manager object are returned. |
String |
getDefaultDataHolderTypeString(Class dataHolderClass,
Class valueClass)
Returns a character string that expresses the DataHolder type for the arguments supplied. |
static Manager |
getInstance()
The Manager object is returned. |
void |
notifyDataHolderAvailable(DataProvider dp,
DataHolder[] dhs)
The dataHolderAvailable method is invoked for each registered DataReferenceMaintainer object. |
void |
notifyDataHolderRenamed(DataProvider dp,
DataHolder dh,
String newName,
String oldName)
The dataHolderRenamed method is invoked for each registered DataReferenceMaintainer object. |
void |
notifyDataHolderRevoked(DataProvider dp,
DataHolder[] dhs)
The dataHolderRevoked method is invoked for each registered DataReferenceMaintainer object. |
void |
notifyDataProviderRenamed(DataProvider dp,
String newName,
String oldName)
The dataProviderRenamed method is invoked for each registered DataReferenceMaintainer object. |
void |
removeDataProvider(DataProvider dp)
This method deregisters the DataProvider object given by the argument and invokes its removedAsDataProvider method. |
void |
removeDataReferenceMaintainer(DataReferenceMaintainer rm)
The DataReferenceMaintainer object given by the argument is deregistered, and its removedAsDataReferenceMaintainer method is invoked. |
クラス java.lang.Object から継承したメソッド |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
メソッドの詳細 |
public void addDataProvider(DataProvider dp)
If the DataProvider object of the argument has already been registered, an IllegalManagerMemberException is thrown.
If the dataProviderName of the DataProvider object has not been set, then the DataProvider object is registered to the Manager object as one whose dataProviderName has not been set.
If another DataProvider object has already been registered under the same dataProviderName, this method throws a DuplicatedNameException, except in the case where the dataProviderName is an empty character string.
public void addDataReferenceMaintainer(DataReferenceMaintainer rm)
If the DataReferenceMaintainer object of the argument has already been registered, an IllegalManagerMemberException is thrown.
public boolean canSetDataProviderName(DataProvider dataProvider, String dataProviderName)
public static boolean containsInvalidCharacter(String name)
public DataHolder findDataHolder(String dataHolderID)
public DataHolder findDataHolder(String dataProviderName, String dataHolderName)
public DataHolder findDataHolder(DataProvider dp, String dataHolderName)
public DataProvider getDataProvider(String dataProviderName)
public DataProvider[] getDataProviders()
public String getDefaultDataHolderTypeString(Class dataHolderClass, Class valueClass)
public static Manager getInstance()
public void notifyDataHolderAvailable(DataProvider dp, DataHolder[] dhs)
public void notifyDataHolderRenamed(DataProvider dp, DataHolder dh, String newName, String oldName)
No action occurs if the DataProvider object given by the argument is not registered as having a dataProviderName.
public void notifyDataHolderRevoked(DataProvider dp, DataHolder[] dhs)
public void notifyDataProviderRenamed(DataProvider dp, String newName, String oldName)
No action occurs if the DataProvider object given by the argument is not registered with the Manager object as having a dataProviderName.
If a new name is set for dataProviderName, to which no name was previously set, then the notifyDataProviderAvailable method is invoked instead of the above.
If another DataProvider object has already been registered under the same dataProviderName as the new dataProviderName, a DuplicatedNameException is thrown.
public void removeDataProvider(DataProvider dp)
public void removeDataReferenceMaintainer(DataReferenceMaintainer rm)
|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |