Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.sdk
Class ManagedSDK

java.lang.Object
  extended by org.eclipse.mtj.core.sdk.ManagedSDK
All Implemented Interfaces:
ISDK

public abstract class ManagedSDK
extends Object
implements ISDK

Abstract implementaion of an ISDK that provides a device list by routing the call to an SDK provided by an ISDKProvider. This implementation also requires that a ManagedSDK provide access to its ISDKProvider and allows for the duplication of a device and the deletion of a duplicated device.

Since:
1.1

Constructor Summary
ManagedSDK()
           
 
Method Summary
abstract  void deleteDuplicateDevice(IManagedDevice device)
          Delete a duplicated device.
abstract  IDevice duplicateDevice(IManagedDevice device, String newName)
          Cause a managed device to be duplicated.
 List<IDevice> getDeviceList()
          This method supports the legacy getDeviceList() for imported SDKs by routing the call to getProvidedDeviceList().
protected abstract  List<IManagedDevice> getProvidedDeviceList()
          Return a list of devices provided by this SDK.
abstract  ISDKProvider getSDKProvider()
          Obtain a reference to the SDK provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.mtj.core.sdk.ISDK
getDescription, getIdentifier, getName, getVersion
 

Constructor Detail

ManagedSDK

public ManagedSDK()
Method Detail

getDeviceList

public List<IDevice> getDeviceList()
                            throws CoreException
This method supports the legacy getDeviceList() for imported SDKs by routing the call to getProvidedDeviceList().

Specified by:
getDeviceList in interface ISDK
Returns:
the list of devices in this SDK
Throws:
CoreException - thrown if an error occur while retrieving the device list.

getProvidedDeviceList

protected abstract List<IManagedDevice> getProvidedDeviceList()
                                                       throws CoreException
Return a list of devices provided by this SDK.

Throws:
CoreException

getSDKProvider

public abstract ISDKProvider getSDKProvider()
Obtain a reference to the SDK provider.


deleteDuplicateDevice

public abstract void deleteDuplicateDevice(IManagedDevice device)
Delete a duplicated device. For SDK providers, only devices that were duplicated by the user may be deleted.

Parameters:
device - The IManagedDevice to be deleted.

duplicateDevice

public abstract IDevice duplicateDevice(IManagedDevice device,
                                        String newName)
Cause a managed device to be duplicated. Duplicated devices are stored by the SDK provider and not by MTJ.

Parameters:
device - The IManagedDevice to be duplicated.
newName - The new name for the duplicate. The name is generated by MTJ and must be unique.
Returns:
The duplicated IDevice.

Mobile Tools for Java
Release 1.0