PTP
Release 7.0

org.eclipse.ptp.services.core
Class ServiceProvider

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.ptp.services.core.ServiceProvider
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IServiceProvider, IServiceProviderDescriptor
Direct Known Subclasses:
ServiceProviderWorkingCopy

public abstract class ServiceProvider
extends org.eclipse.core.runtime.PlatformObject
implements IServiceProvider, IServiceProviderDescriptor

An abstract base class for service provider implementations. EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the RDT team.


Field Summary
protected  ServiceModelManager fManager
           
 
Constructor Summary
ServiceProvider()
           
 
Method Summary
 IServiceProviderWorkingCopy copy()
           
 boolean equals(java.lang.Object obj)
           
 boolean getBoolean(java.lang.String key, boolean defaultValue)
          Returns the boolean value of the given key.
 java.lang.String getConfigurationString()
          Returns provider specific information for the current configuration.
 IServiceProviderDescriptor getDescriptor()
          Get the descriptor for this service provider
 java.lang.String getId()
          Get the ID of this service provider, or null if this is a null provider.
 int getInt(java.lang.String key, int defaultValue)
          Returns the int value of the given key.
 java.lang.String getName()
          Get the name of this service provider, or null if this is a null provider.
 java.lang.Integer getPriority()
          Get the priority for the the provider.
 java.util.Map<java.lang.String,java.lang.String> getProperties()
          Returns an unmodifiable view of the properties that apply to this service provider.
 java.lang.String getServiceId()
          Get the service this service provider is for.
 java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
          Returns the string value of the given key.
 int hashCode()
           
protected  void internalSetProperties(java.util.Map<java.lang.String,java.lang.String> properties)
           
 java.util.Set<java.lang.String> keySet()
          Returns a set of all the property keys that apply to this service provider.
 void putBoolean(java.lang.String key, boolean value)
          Sets the value of the given key to the given boolean
 void putInt(java.lang.String key, int value)
          Sets the value of the given key to the given int
 void putString(java.lang.String key, java.lang.String value)
          Sets the value of the given key to the given string
 void restoreState(org.eclipse.ui.IMemento memento)
          Restores the state of this provider from the given IMemento.
 void saveState(org.eclipse.ui.IMemento memento)
          Saves the state of this provider in the given IMemento.
 void setDescriptor(IServiceProviderDescriptor descriptor)
          Set the descriptor for this provider.
 void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
          Add the properties in the supplied map to the properties of the service provider.
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ptp.services.core.IServiceProvider
isConfigured
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

fManager

protected ServiceModelManager fManager
Constructor Detail

ServiceProvider

public ServiceProvider()
Method Detail

copy

public IServiceProviderWorkingCopy copy()
Specified by:
copy in interface IServiceProvider

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getBoolean

public boolean getBoolean(java.lang.String key,
                          boolean defaultValue)
Description copied from interface: IServiceProvider
Returns the boolean value of the given key.

Specified by:
getBoolean in interface IServiceProvider
Parameters:
key - the key
defaultValue - The value to return if key not stored
Returns:
the value or defaultValue if no value was found

getConfigurationString

public java.lang.String getConfigurationString()
Description copied from interface: IServiceProvider
Returns provider specific information for the current configuration.

Specified by:
getConfigurationString in interface IServiceProvider
Returns:
information on current configuration for this provider

getDescriptor

public IServiceProviderDescriptor getDescriptor()
Description copied from interface: IServiceProvider
Get the descriptor for this service provider

Specified by:
getDescriptor in interface IServiceProvider
Returns:
service provider descriptor

getId

public java.lang.String getId()
Description copied from interface: IServiceProviderDescriptor
Get the ID of this service provider, or null if this is a null provider.

Specified by:
getId in interface IServiceProviderDescriptor
Returns:
ID of this service provider

getInt

public int getInt(java.lang.String key,
                  int defaultValue)
Description copied from interface: IServiceProvider
Returns the int value of the given key.

Specified by:
getInt in interface IServiceProvider
Parameters:
key - the key
defaultValue - The value to return if key not stored
Returns:
the value or defaultValue if no value was found

getName

public java.lang.String getName()
Description copied from interface: IServiceProviderDescriptor
Get the name of this service provider, or null if this is a null provider.

Specified by:
getName in interface IServiceProviderDescriptor
Returns:
name of this service provider

getPriority

public java.lang.Integer getPriority()
Description copied from interface: IServiceProviderDescriptor
Get the priority for the the provider. Lower values have higher priority.

Specified by:
getPriority in interface IServiceProviderDescriptor
Returns:
priority

getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()
Description copied from interface: IServiceProvider
Returns an unmodifiable view of the properties that apply to this service provider.

Specified by:
getProperties in interface IServiceProvider
Returns:
map containing the properties

getServiceId

public java.lang.String getServiceId()
Description copied from interface: IServiceProviderDescriptor
Get the service this service provider is for.

Specified by:
getServiceId in interface IServiceProviderDescriptor
Returns:
service

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.String defaultValue)
Description copied from interface: IServiceProvider
Returns the string value of the given key.

Specified by:
getString in interface IServiceProvider
Parameters:
key - the key
defaultValue - The value to return if key not stored
Returns:
the value or defaultValue if no value was found

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

keySet

public java.util.Set<java.lang.String> keySet()
Description copied from interface: IServiceProvider
Returns a set of all the property keys that apply to this service provider.

Specified by:
keySet in interface IServiceProvider

putBoolean

public void putBoolean(java.lang.String key,
                       boolean value)
Description copied from interface: IServiceProvider
Sets the value of the given key to the given boolean

Specified by:
putBoolean in interface IServiceProvider
Parameters:
key - the key
value - the value

putInt

public void putInt(java.lang.String key,
                   int value)
Description copied from interface: IServiceProvider
Sets the value of the given key to the given int

Specified by:
putInt in interface IServiceProvider
Parameters:
key - the key
value - the value

putString

public void putString(java.lang.String key,
                      java.lang.String value)
Description copied from interface: IServiceProvider
Sets the value of the given key to the given string

Specified by:
putString in interface IServiceProvider
Parameters:
key - the key
value - the value

restoreState

public void restoreState(org.eclipse.ui.IMemento memento)
Restores the state of this provider from the given IMemento. NOTE: This should only be implemented if a provider wishes to override the default behavior.

Parameters:
memento - for restoring the provider's state.

saveState

public void saveState(org.eclipse.ui.IMemento memento)
Saves the state of this provider in the given IMemento. NOTE: This should only be implemented if a provider wishes to override the default behavior.

Parameters:
memento - for saving the provider's state.

setDescriptor

public void setDescriptor(IServiceProviderDescriptor descriptor)
Description copied from interface: IServiceProvider
Set the descriptor for this provider.

Specified by:
setDescriptor in interface IServiceProvider
Parameters:
descriptor - descriptor to set

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Description copied from interface: IServiceProvider
Add the properties in the supplied map to the properties of the service provider. Will replace any properties of the same name.

Specified by:
setProperties in interface IServiceProvider
Parameters:
properties - map containing the properties to be added.

internalSetProperties

protected void internalSetProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Since:
2.1

PTP
Release 7.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.