public abstract class ServiceProvider extends PlatformObject implements IServiceProvider, IServiceProviderDescriptor
Modifier and Type | Field and Description |
---|---|
protected ServiceModelManager |
fManager |
Constructor and Description |
---|
ServiceProvider() |
Modifier and Type | Method and Description |
---|---|
IServiceProviderWorkingCopy |
copy() |
boolean |
equals(Object obj) |
boolean |
getBoolean(String key,
boolean defaultValue)
Returns the boolean value of the given key.
|
String |
getConfigurationString()
Returns provider specific information for the current configuration.
|
IServiceProviderDescriptor |
getDescriptor()
Get the descriptor for this service provider
|
String |
getId()
Get the ID of this service provider, or null if this is a null provider.
|
int |
getInt(String key,
int defaultValue)
Returns the int value of the given key.
|
String |
getName()
Get the name of this service provider, or null if this is a null provider.
|
Integer |
getPriority()
Get the priority for the the provider.
|
Map<String,String> |
getProperties()
Returns an unmodifiable view of the properties that apply
to this service provider.
|
String |
getServiceId()
Get the service this service provider is for.
|
String |
getString(String key,
String defaultValue)
Returns the string value of the given key.
|
int |
hashCode() |
protected void |
internalSetProperties(Map<String,String> properties) |
Set<String> |
keySet()
Returns a set of all the property keys that apply to this
service provider.
|
void |
putBoolean(String key,
boolean value)
Sets the value of the given key to the given boolean
|
void |
putInt(String key,
int value)
Sets the value of the given key to the given int
|
void |
putString(String key,
String value)
Sets the value of the given key to the given string
|
void |
restoreState(IMemento memento)
Restores the state of this provider from the given
IMemento . |
void |
saveState(IMemento memento)
Saves the state of this provider in the given
IMemento . |
void |
setDescriptor(IServiceProviderDescriptor descriptor)
Set the descriptor for this provider.
|
void |
setProperties(Map<String,String> properties)
Add the properties in the supplied map to the properties
of the service provider.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isConfigured
protected ServiceModelManager fManager
public IServiceProviderWorkingCopy copy()
copy
in interface IServiceProvider
public boolean equals(Object obj)
public boolean getBoolean(String key, boolean defaultValue)
IServiceProvider
getBoolean
in interface IServiceProvider
key
- the keydefaultValue
- The value to return if key not storedpublic String getConfigurationString()
IServiceProvider
getConfigurationString
in interface IServiceProvider
public IServiceProviderDescriptor getDescriptor()
IServiceProvider
getDescriptor
in interface IServiceProvider
public String getId()
IServiceProviderDescriptor
getId
in interface IServiceProviderDescriptor
public int getInt(String key, int defaultValue)
IServiceProvider
getInt
in interface IServiceProvider
key
- the keydefaultValue
- The value to return if key not storedpublic String getName()
IServiceProviderDescriptor
getName
in interface IServiceProviderDescriptor
public Integer getPriority()
IServiceProviderDescriptor
getPriority
in interface IServiceProviderDescriptor
public Map<String,String> getProperties()
IServiceProvider
getProperties
in interface IServiceProvider
public String getServiceId()
IServiceProviderDescriptor
getServiceId
in interface IServiceProviderDescriptor
public String getString(String key, String defaultValue)
IServiceProvider
getString
in interface IServiceProvider
key
- the keydefaultValue
- The value to return if key not storedpublic int hashCode()
public Set<String> keySet()
IServiceProvider
keySet
in interface IServiceProvider
public void putBoolean(String key, boolean value)
IServiceProvider
putBoolean
in interface IServiceProvider
key
- the keyvalue
- the valuepublic void putInt(String key, int value)
IServiceProvider
putInt
in interface IServiceProvider
key
- the keyvalue
- the valuepublic void putString(String key, String value)
IServiceProvider
putString
in interface IServiceProvider
key
- the keyvalue
- the valuepublic void restoreState(IMemento memento)
IMemento
.
NOTE: This should only be implemented if a provider wishes to override
the default behavior.memento
- for restoring the provider's state.public void saveState(IMemento memento)
IMemento
.
NOTE: This should only be implemented if a provider wishes to override
the default behavior.memento
- for saving the provider's state.public void setDescriptor(IServiceProviderDescriptor descriptor)
IServiceProvider
setDescriptor
in interface IServiceProvider
descriptor
- descriptor to setpublic void setProperties(Map<String,String> properties)
IServiceProvider
setProperties
in interface IServiceProvider
properties
- map containing the properties to be added.Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.