1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 }