コード例 #1
0
  /**
   * lookup a PackageName object based on it's name, If one does not exist, create a new one and
   * return it.
   *
   * @param pn the package name
   * @return a PackageName object that has a matching name
   */
  public static synchronized PackageName lookupOrCreatePackageByName(String pn) {
    PackageName returned = lookupPackageName(pn);

    if (returned == null) {
      PackageName newName = new PackageName();
      newName.setName(pn);
      singleton.saveObject(newName);
      return newName;
    }
    return returned;
  }
コード例 #2
0
 /**
  * Store the package delta.
  *
  * @param delta The object we are commiting.
  */
 public static void save(PackageDelta delta) {
   singleton.saveObject(delta);
 }
コード例 #3
0
 /**
  * Store the package provider.
  *
  * @param prov The object we are commiting.
  */
 public static void save(PackageProvider prov) {
   singleton.saveObject(prov);
 }