Openwings API Documentation (v1.1)

net.openwings.ui
Interface UserInterfaceBuilder


public interface UserInterfaceBuilder

This interface describes a utility that can be used to obtain a user interface for a service or even an MBean

An implementation of this interface is obtained using the UserInterfaceBuilderFactory.


Method Summary
 java.lang.Object buildUserInterface(java.lang.Class serviceInterface, java.lang.Object serviceObject, java.lang.Class desiredUserInterfaceClass, java.lang.Object[] constructorParameters)
          This method is used to build a user interface for a service object with no user interface factory specified.
 java.lang.Object buildUserInterface(java.lang.Object serviceObject, java.lang.Class desiredUserInterfaceClass, java.lang.Object[] constructorParameters, UserInterfaceFactory factory)
          This method is used to build a user interface for a service object using a specified user interface factory.
 

Method Detail

buildUserInterface

public java.lang.Object buildUserInterface(java.lang.Object serviceObject,
                                           java.lang.Class desiredUserInterfaceClass,
                                           java.lang.Object[] constructorParameters,
                                           UserInterfaceFactory factory)
                                    throws UserInterfaceException
This method is used to build a user interface for a service object using a specified user interface factory.

Parameters:
serviceObject - the service object
desiredUserInterfaceClass - Java type of user interface requested
constructorParameters - arguments to pass to factory method. These arguments correspond to the method signature of a constructor of desiredUserInterfaceClass.
factory - the user interface factory to use
Returns:
user interface, or null if the user interface could not be built
Throws:
UserInterfaceException - if there is an error building the user interface.

buildUserInterface

public java.lang.Object buildUserInterface(java.lang.Class serviceInterface,
                                           java.lang.Object serviceObject,
                                           java.lang.Class desiredUserInterfaceClass,
                                           java.lang.Object[] constructorParameters)
                                    throws UserInterfaceException
This method is used to build a user interface for a service object with no user interface factory specified. The builder will attempt to locate an appropriate factory, perhaps by using a UserInterfaceRepository service.

Parameters:
serviceInterface - interface of a service, management bean, or other remote object for which a user interface is needed.
serviceObject - the service object
desiredUserInterfaceClass - Java type of user interface requested
constructorParameters - arguments to pass to factory method. These arguments correspond to the method signature of a constructor of desiredUserInterfaceClass.
Returns:
user interface, or null if the user interface could not be built
Throws:
UserInterfaceException - if there is an error building the user interface.

Openwings API Documentation (v1.1)