public interface IServiceModelManager
extends org.eclipse.core.runtime.IAdaptable
| Modifier and Type | Method and Description |
|---|---|
void |
addConfiguration(org.eclipse.core.resources.IProject project,
IServiceConfiguration conf)
Associate the service configuration with a project.
|
void |
addConfiguration(IServiceConfiguration conf)
Adds the given service configuration to the model without explicitly
associating it with a particular project.
|
void |
addEventListener(IServiceModelEventListener listener,
int type)
Adds the given listener for service model events.
|
boolean |
exportConfigurations(java.lang.String filename,
IServiceConfiguration[] configs)
Export a set of service configurations to a file.
|
IServiceConfiguration |
getActiveConfiguration()
Get the global "active" service configuration.
|
IServiceConfiguration |
getActiveConfiguration(org.eclipse.core.resources.IProject project)
Get the configuration that is currently active for the project.
|
java.util.Set<IServiceCategory> |
getCategories()
Returns all the service categories that have been registered with
the system.
|
IServiceConfiguration |
getConfiguration(org.eclipse.core.resources.IProject project,
java.lang.String name)
Get the named configuration for this project.
|
IServiceConfiguration |
getConfiguration(java.lang.String id)
Get the configuration with the specified ID.
|
java.util.Set<IServiceConfiguration> |
getConfigurations()
Get all configurations available in the workspace.
|
java.util.Set<IServiceConfiguration> |
getConfigurations(org.eclipse.core.resources.IProject project)
Get all the configurations that are known by the project
|
java.util.Set<org.eclipse.core.resources.IProject> |
getProjectsForConfiguration(IServiceConfiguration serviceConfiguration)
Get the set of projects which use the specified service configuration
|
IService |
getService(java.lang.String id)
Retrieves the service corresponding to a given id.
|
IServiceProvider |
getServiceProvider(IServiceProviderDescriptor desc)
Return a new instance of a service provider based on the descriptor.
|
java.util.Set<IService> |
getServices()
Get all the services that have been registered with the system.
|
java.util.Set<IService> |
getServices(org.eclipse.core.resources.IProject project)
Get all the services that are used by a particular project.
|
java.util.Set<IService> |
getServices(java.lang.String natureID)
Get all the services that are associated with a project nature.
|
IServiceConfiguration[] |
importConfigurations(java.lang.String filename)
Import a set of service configurations from a file.
|
boolean |
isConfigured(org.eclipse.core.resources.IProject project)
Returns true if the given project has a configuration.
|
boolean |
isValidConfigurationFile(java.lang.String filename)
Validate a set of service configurations in a file
|
IServiceConfiguration |
newServiceConfiguration(java.lang.String name)
Obtain a new service configuration with name 'name'.
|
void |
remap(org.eclipse.core.resources.IProject removedProject,
org.eclipse.core.resources.IProject addedProject)
Remaps all the configurations and services associated to the removed project to the added project.
|
void |
remove(org.eclipse.core.resources.IProject project)
Removes all the configurations and services associated to the given project.
|
void |
remove(IServiceConfiguration conf)
Removes the service configuration.
|
void |
removeConfiguration(org.eclipse.core.resources.IProject project,
IServiceConfiguration conf)
TODO What happens if you try to remove the active configuration?
|
void |
removeEventListener(IServiceModelEventListener listener)
Removes the given listener for service model events.
|
void |
setActiveConfiguration(org.eclipse.core.resources.IProject project,
IServiceConfiguration configuration)
Set the active configuration for a project.
|
void |
setActiveConfiguration(IServiceConfiguration config)
Set the global "active" service configuration.
|
void addConfiguration(org.eclipse.core.resources.IProject project,
IServiceConfiguration conf)
project - the projectconf - the configurationjava.lang.NullPointerException - if project or conf is nullvoid addConfiguration(IServiceConfiguration conf)
project - the projectconf - the configurationjava.lang.NullPointerException - if conf is nullvoid addEventListener(IServiceModelEventListener listener, int type)
Listeners can listen for several types of event as defined in
IServiceModelEvent. Clients are free to register for
any number of event types. Clients are guaranteed to only receive
event types for which they are registered.
listener - the listenereventMask - the bit-wise OR of all event types of interest to the
listenerIServiceModelEventListener,
IServiceModelEvent,
removeEventListener(IServiceModelEventListener)boolean exportConfigurations(java.lang.String filename,
IServiceConfiguration[] configs)
throws java.lang.reflect.InvocationTargetException
file - file name used to save the configurationjava.lang.reflect.InvocationTargetException - wraps any exceptions thrown during exportIServiceConfiguration getActiveConfiguration()
IServiceConfiguration getActiveConfiguration(org.eclipse.core.resources.IProject project)
project - project for which the configuration will be obtainedjava.lang.NullPointerException - if project is nullProjectNotConfiguredException - if the project has not been configuredjava.util.Set<IServiceCategory> getCategories()
IServiceConfiguration getConfiguration(org.eclipse.core.resources.IProject project, java.lang.String name)
project - project for which the configuration will be obtainedname - name of the configurationjava.lang.NullPointerException - if project is nullProjectNotConfiguredException - if the project has not been configuredIServiceConfiguration getConfiguration(java.lang.String id)
id - ID of the configurationjava.util.Set<IServiceConfiguration> getConfigurations()
java.util.Set<IServiceConfiguration> getConfigurations(org.eclipse.core.resources.IProject project)
project - project containing the configurationsjava.lang.NullPointerException - if project is nullProjectNotConfiguredException - if the project has not been configuredjava.util.Set<org.eclipse.core.resources.IProject> getProjectsForConfiguration(IServiceConfiguration serviceConfiguration)
serviceConfiguration - Service configuration to query set of projects using itIService getService(java.lang.String id)
id - The unique id of the service to retrieve.IServiceProvider getServiceProvider(IServiceProviderDescriptor desc)
desc - extension descriptionjava.util.Set<IService> getServices()
java.util.Set<IService> getServices(org.eclipse.core.resources.IProject project)
project - project using the servicesjava.lang.NullPointerException - if project is nullProjectNotConfiguredException - if the project has not been configuredjava.util.Set<IService> getServices(java.lang.String natureID)
nature - project natureIServiceConfiguration[] importConfigurations(java.lang.String filename) throws java.lang.reflect.InvocationTargetException
addConfiguration(IServiceConfiguration)
before they can be used. No model events will be generated while loading
the configurations.file - file name containing the configurationjava.lang.reflect.InvocationTargetException - wraps any exceptions thrown during importboolean isConfigured(org.eclipse.core.resources.IProject project)
boolean isValidConfigurationFile(java.lang.String filename)
file - file name of the file containing the configurationsIServiceConfiguration newServiceConfiguration(java.lang.String name)
name - name of service configurationvoid remap(org.eclipse.core.resources.IProject removedProject,
org.eclipse.core.resources.IProject addedProject)
removedProject - project removed from workspaceaddedProject - project added to workspacevoid remove(org.eclipse.core.resources.IProject project)
java.lang.NullPointerException - if project is nullvoid remove(IServiceConfiguration conf)
conf - the configurationvoid removeConfiguration(org.eclipse.core.resources.IProject project,
IServiceConfiguration conf)
project - the projectconf - the configurationjava.lang.NullPointerException - if project or conf is nullProjectNotConfiguredException - if the project has not been configuredvoid removeEventListener(IServiceModelEventListener listener)
listener - the listenerIServiceModelEventListener,
IServiceModelEvent,
#addEventListener(IServiceModelEventListener)void setActiveConfiguration(org.eclipse.core.resources.IProject project,
IServiceConfiguration configuration)
project - project for which the configuration will be obtainedconfiguration - configuration to set as active for this projectjava.lang.NullPointerException - if project or configuration is nullProjectNotConfiguredException - if the project has not been configured yetjava.lang.IllegalArgumentException - if the configuration was not part of the projectvoid setActiveConfiguration(IServiceConfiguration config)
config - the service configuration to select as activeCopyright (c) 2011 IBM Corporation and others. All Rights Reserved.