org.openoffice.ide.eclipse.core.model
Class SDKContainer

java.lang.Object
  extended by org.openoffice.ide.eclipse.core.model.SDKContainer

public class SDKContainer
extends java.lang.Object

Singleton object containing the SDK instances.

Author:
cedricbosdo

Method Summary
static void addListener(IConfigListener pListener)
          Add a SDK listener to the container.
static void addSDK(ISdk pSdk)
          Add the SDK given in parameter to the list of the others.
static void clear()
          Removes all the SDK contained.
static void delSDK(ISdk pSdk)
          remove the given SDK from the list.
static void dispose()
          Dispose the vector used.
static SDKContainer getInstance()
          Singleton accessor, named getInstance in many other singleton pattern implementations.
static ISdk getSDK(java.lang.String pSdkkey)
          Returns the sdk that corresponds to the given sdk name and buildid.
static int getSDKCount()
          Returns the number of SDK in the list.
static java.util.Vector<java.lang.String> getSDKKeys()
          Returns a vector containing the unique identifiers of the contained SDKs.
static void load()
          Loads the SDK already configured instances from the preferences.
static void removeListener(IConfigListener pListener)
          Removes a SDK listener from the container.
static void saveSDKs()
          Saves the SDK already configured instances to the preferences.
static java.lang.Object[] toArray()
           
static void updateSDK(java.lang.String pSdkkey, ISdk pSdk)
          update the ith SDK from the list with the given SDK.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addListener

public static void addListener(IConfigListener pListener)
Add a SDK listener to the container.

Parameters:
pListener - SDK listener to add

removeListener

public static void removeListener(IConfigListener pListener)
Removes a SDK listener from the container.

Parameters:
pListener - SDK listener to remove

toArray

public static java.lang.Object[] toArray()
Returns:
the sdks elements in an array.

addSDK

public static void addSDK(ISdk pSdk)
Add the SDK given in parameter to the list of the others. Do not use directly the private field to handle SDKs

Parameters:
pSdk - SDK to add

delSDK

public static void delSDK(ISdk pSdk)
remove the given SDK from the list. Do not use directly the private field to handle SDKs

Parameters:
pSdk - SDK to remove

clear

public static void clear()
Removes all the SDK contained.


getSDKKeys

public static java.util.Vector<java.lang.String> getSDKKeys()
Returns a vector containing the unique identifiers of the contained SDKs.

Returns:
names of the contained SDKs

updateSDK

public static void updateSDK(java.lang.String pSdkkey,
                             ISdk pSdk)
update the ith SDK from the list with the given SDK.

Parameters:
pSdkkey - position of the sdk to update
pSdk - new value for the SDK

getSDK

public static ISdk getSDK(java.lang.String pSdkkey)
Returns the sdk that corresponds to the given sdk name and buildid.

Parameters:
pSdkkey - unique identifier of the wanted sdk
Returns:
SDK which name equals the one provided

getSDKCount

public static int getSDKCount()
Returns the number of SDK in the list.

Returns:
number of SDK in the list

dispose

public static void dispose()
Dispose the vector used.


getInstance

public static SDKContainer getInstance()
Singleton accessor, named getInstance in many other singleton pattern implementations.

Returns:
the SDKContainer singleton instance.

load

public static void load()
Loads the SDK already configured instances from the preferences.


saveSDKs

public static void saveSDKs()
Saves the SDK already configured instances to the preferences.