1 package org.apache.maven.scm.provider.accurev;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23
24 import org.apache.maven.scm.provider.accurev.util.WorkspaceUtils;
25
26
27
28
29 public class AccuRevInfo
30 {
31
32 private File basedir;
33
34 private String user;
35
36 private String workSpace;
37
38 private String basis;
39
40 private String top;
41
42 private String server;
43
44 private int port;
45
46 public int getPort()
47 {
48 return port;
49 }
50
51 public void setPort( int port )
52 {
53 this.port = port;
54 }
55
56 public String getServer()
57 {
58 return server;
59 }
60
61 public void setServer( String server )
62 {
63 this.server = server;
64 }
65
66 public String getUser()
67 {
68 return user;
69 }
70
71 public void setUser( String user )
72 {
73 this.user = user;
74 }
75
76 public String getWorkSpace()
77 {
78 return workSpace;
79 }
80
81 public void setWorkSpace( String workSpace )
82 {
83 this.workSpace = workSpace;
84 }
85
86 public String getBasis()
87 {
88 return basis;
89 }
90
91 public void setBasis( String basis )
92 {
93 this.basis = basis;
94 }
95
96 public String getTop()
97 {
98 return top;
99 }
100
101 public void setTop( String top )
102 {
103 this.top = top;
104 }
105
106 public File getBasedir()
107 {
108 return basedir;
109 }
110
111 public AccuRevInfo( File basedir )
112 {
113
114 this.basedir = basedir;
115 }
116
117 public boolean isWorkSpace()
118 {
119 return getWorkSpace() != null;
120 }
121
122
123 public boolean isLoggedIn()
124 {
125 return !( this.user == null || "(not logged in)".equals( this.user ) );
126 }
127
128 public boolean isWorkSpaceTop()
129 {
130 return WorkspaceUtils.isSameFile( this.getBasedir(), this.getTop() );
131
132 }
133
134 }