Class SDKContainer
- java.lang.Object
-
- org.libreoffice.ide.eclipse.core.model.SDKContainer
-
public class SDKContainer extends java.lang.ObjectSingleton object containing the SDK instances.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddListener(IConfigListener pListener)Add a SDK listener to the container.static voidaddSDK(ISdk pSdk)Add the SDK given in parameter to the list of the others.static voidclear()Removes all the SDK contained.static booleancontainsName(java.lang.String pName)Checks whether the corresponding SDK name already exists.static voiddelSDK(ISdk pSdk)remove the given SDK from the list.static voiddispose()Dispose the vector used.static SDKContainergetInstance()Singleton accessor, namedgetInstancein many other singleton pattern implementations.static ISdkgetSDK(java.lang.String pSdkkey)Returns the sdk that corresponds to the given sdk name and buildid.static intgetSDKCount()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 voidload()Loads the SDK already configured instances from the preferences.static voidremoveListener(IConfigListener pListener)Removes a SDK listener from the container.static voidsaveSDKs()Saves the SDK already configured instances to the preferences.static java.lang.Object[]toArray()static voidupdateSDK(java.lang.String pSdkkey, ISdk pSdk)update the ith SDK from the list with the given SDK.
-
-
-
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
-
containsName
public static boolean containsName(java.lang.String pName)
Checks whether the corresponding SDK name already exists.- Parameters:
pName- the SDK Name to check- Returns:
trueif the name is already present,falseotherwise.
-
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 updatepSdk- 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, namedgetInstancein many other singleton pattern implementations.- Returns:
- the
SDKContainersingleton 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.
-
-