@Override public boolean canDestroy() { return !info.isLocal(); }
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 }
if (info != null && (info.isLocal() || info.isRemoteDownloadable())) { btnOK.setEnabled(false); lblValidate.setText(NbBundle.getMessage(RepositoryRegisterUI.class, "LBL_Repo_id_Error2"));
public void modify(RepositoryInfo info) { modify = true; txtRepoId.setEditable(false); txtRepoId.setText(info.getId()); txtRepoName.setText(info.getName()); comType.setSelectedItem(info.getType()); if (info.isLocal()) { jraLocal.setSelected(true); txtRepoPath.setText(info.getRepositoryPath()); jraLocalActionPerformed(null); } else if (info.isRemoteDownloadable()) { jraRemote.setSelected(true); txtRepoUrl.setText(info.getRepositoryUrl()); txtIndexUrl.setText(info.getIndexUpdateUrl()); jraRemoteActionPerformed(null); } }
public static Children createChildren(RepositoryInfo info, NBVersionInfo record) { if (info.isLocal() && !"pom".equals(record.getType())) { //NOI18N try { Artifact art = RepositoryUtil.createArtifact(record); FileObject fo = FileUtil.toFileObject(art.getFile()); if (fo != null) { DataObject dobj = DataObject.find(fo); return new FilterNode.Children(dobj.getNodeDelegate().cloneNode()); } } catch (DataObjectNotFoundException e) { } } return Children.LEAF; }
List<RepositoryInfo> slowCheck = new ArrayList<RepositoryInfo>(); for (RepositoryInfo repo : repos) { if (repo.isLocal() || repo.isRemoteDownloadable()) { boolean unload = true; try {
private void loadIndexingContext(final RepositoryInfo... repoids) throws IOException, UnsupportedExistingLuceneIndexException { assert MUTEX.isWriteAccess(); for (RepositoryInfo info : repoids) { LOGGER.finer("Loading Context :" + info.getId());//NOI18N if (info.isLocal() || info.isRemoteDownloadable()) { indexer.addIndexingContext( // info.getId(), // context id info.getId(), // repository id info.isLocal() ? new File(info.getRepositoryPath()) : null, // repository folder new File(getDefaultIndexLocation(), info.getId()), // index folder info.isRemoteDownloadable() ? info.getRepositoryUrl() : null, // repositoryUrl info.isRemoteDownloadable() ? info.getIndexUpdateUrl() : null, // index update url NB_INDEX); } } }
private Node createRootNode() { Children.Array array = new Children.Array(); List<RepositoryInfo> infos = RepositoryPreferences.getInstance().getRepositoryInfos(); for (RepositoryInfo ri : infos) { if (ri.isRemoteDownloadable() || ri.isLocal()) { array.add(new Node[]{new RepositoryNode(ri)}); } } return new AbstractNode(array); }
for (final RepositoryInfo ri : ris) { if (!ri.isRemoteDownloadable() && !ri.isLocal()) { continue;