private String[] checkRepositoryIndices(File file) { List<NBVersionInfo> lst = RepositoryQueries.findBySHA1(file); for (NBVersionInfo elem : lst) { String[] dep = new String[3]; dep[0] = elem.getGroupId(); dep[1] = elem.getArtifactId(); dep[2] = elem.getVersion(); return dep; } return null; }
public void run() { if (ri.getIndexUpdateUrl() != null) { RepositoryIndexer.indexRepo(ri); } } }, MILIS_IN_MIN * 2);
@Override public String getDisplayName() { return group.getName(); } }
private List<String> getRepoIds() { List<String> repos = new ArrayList<String>(); List<RepositoryInfo> ris = RepositoryPreferences.getInstance().getRepositoryInfos(); for (RepositoryInfo ri : ris) { if (ri.getRepositoryUrl() != null) { repos.add(ri.getRepositoryUrl()); } } return repos; }
public void run() { List<RepositoryInfo> infos = RepositoryPreferences.getInstance().getRepositoryInfos(); for (RepositoryInfo ri : infos) { RepositoryIndexer.indexRepo(ri); } SwingUtilities.invokeLater(new Runnable() { public void run() { btnIndex.setEnabled(true); } }); } });
public void run() { //TODO shall we iterate all "local" repositories?? RepositoryInfo info = RepositoryPreferences.getInstance().getRepositoryInfoById(RepositoryPreferences.LOCAL_REPO_ID); if (info != null) { RepositoryIndexer.indexRepo(info); SwingUtilities.invokeLater(new Runnable() { public void run() { btnIndex.setEnabled(true); } }); } } });
public void taskFinished(Task task2) { //reload is done in executors // ProjectURLWatcher.fireMavenProjectReload(project); RepositoryInfo info = RepositoryPreferences.getInstance().getRepositoryInfoById(RepositoryPreferences.LOCAL_REPO_ID); if (info != null) { RepositoryIndexer.updateIndexWithArtifacts(info, project.getOriginalMavenProject().getDependencyArtifacts()); } } });
@Override public String getDisplayName() { return version.getVersion()+" [ "+version.getType()+" ]"; } }
public RepositoryInfo getRepositoryInfoById(String id) { for (RepositoryInfo ri : getRepositoryInfos()) { if (ri.getId().equals(id)) { return ri; } } return null; }
public void removeRepositoryInfo(RepositoryInfo info) { if (getRepositoryInfoById(info.getId()) != null) { Preferences pref = getPreferences(); pref.remove(KEY_ID + "." + info.getId()); pref.remove(KEY_TYPE + "." + info.getId()); pref.remove(KEY_NAME + "." + info.getId()); pref.remove(KEY_PATH + "." + info.getId()); pref.remove(KEY_REPO_URL + "." + info.getId()); pref.remove(KEY_INDEX_URL + "." + info.getId()); pref.putBoolean(KEY_REMOVED + "." + info.getId(), true); } }
public RepositoryInfo(String id, String type, String name, String repositoryPath, String repositoryUrl, String indexUpdateUrl) { this.id = id; this.type = type; this.name = name; this.repositoryPath = repositoryPath; this.repositoryUrl = repositoryUrl; this.indexUpdateUrl = indexUpdateUrl; assert (isLocal() == true && isRemoteDownloadable() == true) != true : "XXXCannot have both local and remote index fields filled in."; //NOI18N }
public void run() { setKeys(RepositoryQueries.getVersions(groupId, artifactId, info)); } });
@Override public boolean canDestroy() { return !info.isLocal(); }
public static Artifact createArtifact(NBVersionInfo info) { return createArtifact(info, null); }
@Override public String getDisplayName() { return artifact.getName(); } }
public synchronized static RepositoryPreferences getInstance() { if (instance == null) { instance = new RepositoryPreferences(); //not very nice but need the repos to be inserted when not present // and to to overwrite potencial edits. // still not clear how to allow people to delete central or netbeans instance.addDefaultRepositoryInfo(LOCAL); instance.addDefaultRepositoryInfo(CENTRAL); instance.addDefaultRepositoryInfo(JAVANET); } return instance; }
public void run() { setKeys(RepositoryQueries.getArtifacts(id, info)); } });
public void run() { RepositoryIndexer.indexRepo(info); } });
public static List<NBVersionInfo> findByMD5(File file, RepositoryInfo... repos) { List<NBVersionInfo> toRet = new ArrayList<NBVersionInfo>(); try { String calculateChecksum = RepositoryUtil.calculateMD5Checksum(file); return findByMD5(calculateChecksum, repos); } catch (IOException ex) { Exceptions.printStackTrace(ex); } return toRet; }
@Override public String getShortDescription() { return nbvi.toString(); } }