コード例 #1
0
  public static ModuleArtifactRepository restoreInstance(
      IProvisioningAgent agent, File repositoryDir) throws ProvisionException {
    ModuleArtifactRepository restoredInstance =
        new ModuleArtifactRepository(
            agent, repositoryDir.toURI(), ModuleArtifactMap.restoreInstance(repositoryDir));

    restoredInstance.load();
    return restoredInstance;
  }
コード例 #2
0
  public static ModuleArtifactRepository createInstance(
      IProvisioningAgent agent, File repositoryDir) throws ProvisionException {
    ModuleArtifactRepository newInstance =
        new ModuleArtifactRepository(
            agent, repositoryDir.toURI(), createArtifactLocationMap(repositoryDir));

    // make sure p2artifacts.xml exists
    newInstance.storeOrProvisioningException();
    return newInstance;
  }