1 19 20 package org.netbeans.modules.versioning.system.cvss.ui.selectors; 21 22 import org.netbeans.lib.cvsclient.admin.AdminHandler; 23 import org.netbeans.lib.cvsclient.admin.Entry; 24 import org.netbeans.lib.cvsclient.command.GlobalOptions; 25 import org.netbeans.lib.cvsclient.CVSRoot; 26 27 import java.io.IOException ; 28 import java.io.File ; 29 import java.util.Iterator ; 30 import java.util.Set ; 31 import java.util.Collections ; 32 33 43 final class VirtualAdminHandler implements AdminHandler { 44 45 private final CVSRoot root; 46 47 private final String repositoryPath; 48 49 56 public VirtualAdminHandler(CVSRoot root, String repositoryPath) { 57 this.root = root; 58 this.repositoryPath = repositoryPath; 59 } 60 61 public void updateAdminData(String localDirectory, String repositoryPath, Entry entry, GlobalOptions globalOptions) throws IOException { 62 } 63 64 public boolean exists(File file) { 65 return false; 66 } 67 68 public Entry getEntry(File file) throws IOException { 69 return null; 70 } 71 72 public Iterator getEntries(File directory) throws IOException { 73 return Collections.EMPTY_SET.iterator(); 74 } 75 76 public void setEntry(File file, Entry entry) throws IOException { 77 } 78 79 public String getRepositoryForDirectory(String directory, String repository) throws IOException { 80 String repo = root.getRepository(); 81 assert repo.equals(repository) : "Mismatch! Expected " + repo + " but got " + repository; return repository + "/" + repositoryPath; } 84 85 public void removeEntry(File file) throws IOException { 86 } 87 88 public Set getAllFiles(File directory) throws IOException { 89 return Collections.EMPTY_SET; 90 } 91 92 public String getStickyTagForDirectory(File directory) { 93 return null; } 95 } 96 | Popular Tags |