PTP
Release 7.0

org.eclipse.ptp.services.core
Class ServiceProviderWorkingCopy

java.lang.Object
  extended by PlatformObject
      extended by org.eclipse.ptp.services.core.ServiceProvider
          extended by org.eclipse.ptp.services.core.ServiceProviderWorkingCopy
All Implemented Interfaces:
IServiceProvider, IServiceProviderDescriptor, IServiceProviderWorkingCopy

public class ServiceProviderWorkingCopy
extends ServiceProvider
implements IServiceProviderWorkingCopy

A base class for service provider working copy implementations.


Field Summary
 
Fields inherited from class org.eclipse.ptp.services.core.ServiceProvider
fManager
 
Constructor Summary
ServiceProviderWorkingCopy(IServiceProvider provider)
           
 
Method Summary
 IServiceProvider getOriginal()
          Get the service provider used to create this working copy.
 boolean isConfigured()
          Test if this service provider has been configured.
 boolean isDirty()
          Check if any properties have been modified.
 void putString(String key, String value)
          Sets the value of the given key to the given string
 void save()
          Saves the modified properties.
 void setProperties(Map<String,String> properties)
          Add the properties in the supplied map to the properties of the service provider.
 
Methods inherited from class org.eclipse.ptp.services.core.ServiceProvider
copy, equals, getBoolean, getConfigurationString, getDescriptor, getId, getInt, getName, getPriority, getProperties, getServiceId, getString, hashCode, internalSetProperties, keySet, putBoolean, putInt, restoreState, saveState, setDescriptor
 
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
copy, getBoolean, getConfigurationString, getDescriptor, getInt, getProperties, getString, keySet, putBoolean, putInt, setDescriptor
 
Methods inherited from interface org.eclipse.ptp.services.core.IServiceProviderDescriptor
getId, getName, getPriority, getServiceId
 

Constructor Detail

ServiceProviderWorkingCopy

public ServiceProviderWorkingCopy(IServiceProvider provider)
Method Detail

getOriginal

public IServiceProvider getOriginal()
Description copied from interface: IServiceProviderWorkingCopy
Get the service provider used to create this working copy.

Specified by:
getOriginal in interface IServiceProviderWorkingCopy
Returns:
original service provider

isConfigured

public boolean isConfigured()
Description copied from interface: IServiceProvider
Test if this service provider has been configured.

Specified by:
isConfigured in interface IServiceProvider
Returns:
true if provider has been configured

isDirty

public boolean isDirty()
Description copied from interface: IServiceProviderWorkingCopy
Check if any properties have been modified.

Specified by:
isDirty in interface IServiceProviderWorkingCopy
Returns:
true if the properties need to be saved

putString

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

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

save

public void save()
Description copied from interface: IServiceProviderWorkingCopy
Saves the modified properties.

Specified by:
save in interface IServiceProviderWorkingCopy

setProperties

public void setProperties(Map<String,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
Overrides:
setProperties in class ServiceProvider
Parameters:
properties - map containing the properties to be added.

PTP
Release 7.0

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