|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface must be implemented by all entry point handlers. Most handlers
should extend the abstract class
AbstractEntryPointHandler
which provides certain convenient methods.
Method Summary | |
boolean |
canCreateEntryPointBinding()
Queries if the entry point handler provides support for creating an entry point binding using the method createEntryPointBindingFor() . |
boolean |
canCreateEntryPointFor(java.lang.Object service)
Queries if an entry point of the kind supported by this handler can be created for the specified model object. |
boolean |
canCreateManyEntryPointBindings()
Queries if the entry point handler provides support for creating more than one binding instance for an entry point. |
org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation |
createEntryPointBindingFor(org.eclipse.stp.core.sca.EntryPoint theEntryPoint,
IUIContext callback)
Adds a binding of the kind supported by this handler to the specified EntryPoint object, based on the specified target and
interfaces in the entry point definition. |
org.eclipse.stp.core.sca.SCAObject[] |
createEntryPointFor(java.lang.Object service,
org.eclipse.core.resources.IContainer container,
IUIContext callback)
Creates an entry point with a binding of the kind supported by this handler for the specified service. |
boolean |
isInterfaceKindSupported(IInterfaceHandler interfaceHandler)
Queries if an entry point of the kind supported by this handler supports interfaces of the kind specified by the given interface handler in its interface set. |
org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation |
removeKind(org.eclipse.stp.core.sca.EntryPoint theEntryPoint)
Removes a given binding kind from the entry point. |
Methods inherited from interface org.eclipse.stp.core.saf.handler.IHandler |
getDescription, getDescriptiveKindName, getKind, getLargeIcon, getName, getSmallIcon |
Method Detail |
public boolean canCreateEntryPointFor(java.lang.Object service)
true
, the handler's
createEntryPointFor(Object, IContainer, IUIContext)
method may
be called to create an entry point for the component or external service.
This method should be quick to execute, because it may be called to populate a context menu or a user dialog.
service
- an object representing the service to be exposed
true
if the handler can create an
EntryPoint
object from the specified model object;
false
otherwisepublic org.eclipse.stp.core.sca.SCAObject[] createEntryPointFor(java.lang.Object service, org.eclipse.core.resources.IContainer container, IUIContext callback) throws SAFException, java.lang.InterruptedException, InvalidOperationException
createEntryPointBindingFor(EntryPoint, IUIContext)
instead.
Optionally, this method may create other objects required to support the
new entry point (such as a component). This method is not expected to
associate a resource with the returned EntryPoint
or supporting
object.
service
- an object representing the service being exposedcontainer
- the container that holds the module, subsystem, composite, etc.
that will use the entry point object returned by this method.
The handler could use its location as a base to place any
binding-related files that need to be generated.callback
- callback object that the handler can use to obtain additional
information needed to create the entry point.
Callers may pass in a null value.
SCAObject
containing the new entry point and
any other SCA objects generated by the handler to
support the new entry point
SAFException
- An unexpected exception occurred.
InvalidOperationException
- An entry point cannot be created from the given service
object.
java.lang.InterruptedException
- The caller did not provide a callback object needed by the
handler, or the callback request was canceled or aborted.public boolean canCreateEntryPointBinding()
createEntryPointBindingFor()
.
true
if support is provided for creating a
binding; false
otherwisepublic boolean canCreateManyEntryPointBindings()
true
if support is provided for creating more than
one binding of the supported kind; false
otherwisepublic org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation createEntryPointBindingFor(org.eclipse.stp.core.sca.EntryPoint theEntryPoint, IUIContext callback) throws SAFException, java.lang.InterruptedException, InvalidOperationException
EntryPoint
object, based on the specified target and
interfaces in the entry point definition. The handler is expected to
update the entry point definition, if necessary. If the entry point has an
existing binding, the handler can add to or replace the binding. The
handler can use the callback to query for more information from the user.
If the binding requires associated files, this method should generate
those files. In this case, this method should be aware that the files it
generates may replace some already being managed in a team environment.
The EntryPoint
object should have a resource
associated with it. The handler can use this location to generate
relative file references if needed or use the location for storing
binding-related files that need to be generated. The resource can be
retrieved by casting the EntryPoint
object to an
EObject
and calling
EObject.eResource()
.
theEntryPoint
- an existing entry point definition, which may contain
interfaces and a bindingcallback
- callback object that the handler can use to obtain additional
information needed to create the binding. Callers
may pass in a null value.
SAFException
- An unexpected exception occurred.
InvalidOperationException
- A binding cannot be created for the given entry point.
java.lang.InterruptedException
- The caller did not provide a callback object needed by the
handler, or the callback request was canceled or aborted.public boolean isInterfaceKindSupported(IInterfaceHandler interfaceHandler) throws SAFException
interfaceHandler
- the interface handler that will be used to manipulate the
interface. The implementation of this method can obtain the
interface kind by invoking IHandler.getKind()
when performing the evaluation.
true
if the entry point supports interfaces of the
specified interface kind; false
otherwise
SAFException
- An unexpected exception occurred in the handler.public org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation removeKind(org.eclipse.stp.core.sca.EntryPoint theEntryPoint) throws SAFException, InvalidOperationException
theEntryPoint
- the entry point being modified
IDataModelOperation
instance that, once executed by
the caller, resets the entry point kind
SAFException
- No handler for the specified kind is found, or the
handler throws an exception.
InvalidOperationException
- The entry point kind cannot be removed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |