Class SDKContainer

java.lang.Object
org.libreoffice.ide.eclipse.core.model.SDKContainer

public class SDKContainer extends Object
Singleton object containing the SDK instances.
  • Method Details

    • addListener

      public static void addListener(IConfigListener listener)
      Add a SDK listener to the container.
      Parameters:
      listener - SDK listener to add
    • removeListener

      public static void removeListener(IConfigListener listener)
      Removes a SDK listener from the container.
      Parameters:
      listener - SDK listener to remove
    • toArray

      public static 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 Vector<String> getSDKKeys()
      Returns a vector containing the unique identifiers of the contained SDKs.
      Returns:
      names of the contained SDKs
    • containsName

      public static boolean containsName(String name)
      Checks whether the corresponding SDK name already exists.
      Parameters:
      name - the SDK Name to check
      Returns:
      true if the name is already present, false otherwise.
    • updateSDK

      public static void updateSDK(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(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.