PTP
Release 7.0

org.eclipse.ptp.services.core
Interface IServiceProvider

All Superinterfaces:
IServiceProviderDescriptor
All Known Subinterfaces:
IServiceProviderWorkingCopy
All Known Implementing Classes:
ServiceProvider, ServiceProviderWorkingCopy

public interface IServiceProvider
extends IServiceProviderDescriptor

An IServiceProvider represents an instance of an IServiceProviderDescriptor, and there can be many instances for each IServiceProviderDescriptor. IServiceProvider contains attributes and other information for a particular service provider. 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.

See Also:
IService

Method Summary
 IServiceProviderWorkingCopy copy()
           
 boolean getBoolean(java.lang.String key, boolean defaultValue)
          Returns the boolean value of the given key.
 java.lang.String getConfigurationString()
          Deprecated.  
 IServiceProviderDescriptor getDescriptor()
          Get the descriptor for this service provider
 int getInt(java.lang.String key, int defaultValue)
          Returns the int value of the given key.
 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 getString(java.lang.String key, java.lang.String defaultValue)
          Returns the string value of the given key.
 boolean isConfigured()
          Test if this service provider has been configured.
 java.util.Set<java.lang.String> keySet()
          Deprecated. use getProperties().keySet() instead.
 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 setDescriptor(IServiceProviderDescriptor descriptor)
          Set the descriptor for this provider.
 void setProperties(java.util.Map<java.lang.String,java.lang.String> map)
          Add the properties in the supplied map to the properties of the service provider.
 
Methods inherited from interface org.eclipse.ptp.services.core.IServiceProviderDescriptor
getId, getName, getPriority, getServiceId
 

Method Detail

copy

IServiceProviderWorkingCopy copy()

getBoolean

boolean getBoolean(java.lang.String key,
                   boolean defaultValue)
Returns the boolean value of the given key.

Parameters:
key - the key
defaultValue - The value to return if key not stored
Returns:
the value or defaultValue if no value was found

getConfigurationString

java.lang.String getConfigurationString()
Deprecated. 

Returns provider specific information for the current configuration.

Returns:
information on current configuration for this provider

getDescriptor

IServiceProviderDescriptor getDescriptor()
Get the descriptor for this service provider

Returns:
service provider descriptor

getInt

int getInt(java.lang.String key,
           int defaultValue)
Returns the int value of the given key.

Parameters:
key - the key
defaultValue - The value to return if key not stored
Returns:
the value or defaultValue if no value was found

getProperties

java.util.Map<java.lang.String,java.lang.String> getProperties()
Returns an unmodifiable view of the properties that apply to this service provider.

Returns:
map containing the properties

getString

java.lang.String getString(java.lang.String key,
                           java.lang.String defaultValue)
Returns the string value of the given key.

Parameters:
key - the key
defaultValue - The value to return if key not stored
Returns:
the value or defaultValue if no value was found

isConfigured

boolean isConfigured()
Test if this service provider has been configured.

Returns:
true if provider has been configured

keySet

java.util.Set<java.lang.String> keySet()
Deprecated. use getProperties().keySet() instead.

Returns a set of all the property keys that apply to this service provider.


putBoolean

void putBoolean(java.lang.String key,
                boolean value)
Sets the value of the given key to the given boolean

Parameters:
key - the key
value - the value

putInt

void putInt(java.lang.String key,
            int value)
Sets the value of the given key to the given int

Parameters:
key - the key
value - the value

putString

void putString(java.lang.String key,
               java.lang.String value)
Sets the value of the given key to the given string

Parameters:
key - the key
value - the value

setDescriptor

void setDescriptor(IServiceProviderDescriptor descriptor)
Set the descriptor for this provider.

Parameters:
descriptor - descriptor to set

setProperties

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

Parameters:
map - map containing the properties to be added.

PTP
Release 7.0

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