1 /* 2 StatCvs - CVS statistics generation 3 Copyright (C) 2002 Lukasz Pekacki <lukasz@pekacki.de> 4 http://statcvs.sf.net/ 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public 8 License as published by the Free Software Foundation; either 9 version 2.1 of the License, or (at your option) any later version. 10 11 This library is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Lesser General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with this library; if not, write to the Free Software 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 20 $RCSfile: WebRepositoryIntegration.java,v $ 21 $Date: 2008/04/02 11:22:15 $ 22 */ 23 package net.sf.statcvs.output; 24 25 import java.util.Set; 26 27 import net.sf.statcvs.model.Directory; 28 import net.sf.statcvs.model.Revision; 29 import net.sf.statcvs.model.VersionedFile; 30 31 /** 32 * Interface for integration of web repository browsers. Web repository 33 * browsers are dynamic web sites where you can browse the contents of 34 * a CVS repository, make diffs etc. A good example is 35 * <a href="http://viewcvs.sourceforge.net/">ViewCVS</a>. 36 * 37 * @author Richard Cyganiak 38 * @version $Id: WebRepositoryIntegration.java,v 1.7 2008/04/02 11:22:15 benoitx Exp $ 39 */ 40 public interface WebRepositoryIntegration { 41 42 /** 43 * Returns the name of the repository browser 44 * @return the name of the repository browser 45 */ 46 String getName(); 47 48 /** 49 * Returns a URL to a directory in the web repository browser 50 * @param directory the directory 51 * @return a URL to the directory in the web repository browser 52 */ 53 String getDirectoryUrl(Directory directory); 54 55 /** 56 * Returns a URL to a file in the web repository browser. The 57 * URL points to a history of all revisions of the file. 58 * @param file the file 59 * @return a URL to the file in the web repository browser 60 */ 61 String getFileHistoryUrl(VersionedFile file); 62 63 /** 64 * Returns a URL to a file in the web repository browser. The 65 * URL points to a representation of the file's current contents. 66 * @param file the file 67 * @return a URL to the file in the web repository browser 68 */ 69 String getFileViewUrl(VersionedFile file); 70 71 /** 72 * Returns a URL to a file in the web repository browser. The 73 * URL points to a representation of the specific revision given 74 * as a parameter. 75 * @param revision the revision 76 * @return a URL to the revision in the web repository browser 77 */ 78 String getFileViewUrl(Revision revision); 79 80 /** 81 * Returns a URL to a diff in the web repository browser. Both revisions 82 * must belong to the same <tt>VersionedFile</tt>. 83 * @param oldRevision the old revision 84 * @param newRevision the new revision 85 * @return a URL to a diff 86 */ 87 String getDiffUrl(Revision oldRevision, Revision newRevision); 88 89 /** 90 * Sets the files that are "in the attic", in the CVS sense. See 91 * <a href="http://www.cvshome.org/docs/manual/current/cvs_2.html#SEC15">CVS manual</a>. 92 * @param atticFileNames names of all files (<tt>String</tt>) in the attic 93 */ 94 public void setAtticFileNames(Set atticFileNames); 95 96 /** 97 * @return the base Url 98 */ 99 String getBaseUrl(); 100 }