@@ -68,6 +68,92 @@ public class RepositoryInfo implements Serializable {
68
68
private boolean handleRenamedFiles ;
69
69
private boolean historyEnabled ;
70
70
71
+ public static class RepositoryInfoTO implements Serializable {
72
+ private static final long serialVersionUID = -1 ;
73
+
74
+ // same members as in RepositoryInfo except datePatterns
75
+ private String directoryNameRelative ;
76
+ private boolean working ;
77
+ private String type ;
78
+ private boolean remote ;
79
+ private String parent ;
80
+ private String branch ;
81
+ private String currentVersion ;
82
+ private boolean handleRenamedFiles ;
83
+ private boolean historyEnabled ;
84
+
85
+ public String getDirectoryNameRelative () {
86
+ return directoryNameRelative ;
87
+ }
88
+
89
+ public void setDirectoryNameRelative (String directoryNameRelative ) {
90
+ this .directoryNameRelative = directoryNameRelative ;
91
+ }
92
+
93
+ public boolean isWorking () {
94
+ return working ;
95
+ }
96
+
97
+ public void setWorking (boolean working ) {
98
+ this .working = working ;
99
+ }
100
+
101
+ public String getType () {
102
+ return type ;
103
+ }
104
+
105
+ public void setType (String type ) {
106
+ this .type = type ;
107
+ }
108
+
109
+ public boolean isRemote () {
110
+ return remote ;
111
+ }
112
+
113
+ public void setRemote (boolean remote ) {
114
+ this .remote = remote ;
115
+ }
116
+
117
+ public String getParent () {
118
+ return parent ;
119
+ }
120
+
121
+ public void setParent (String parent ) {
122
+ this .parent = parent ;
123
+ }
124
+
125
+ public String getBranch () {
126
+ return branch ;
127
+ }
128
+
129
+ public void setBranch (String branch ) {
130
+ this .branch = branch ;
131
+ }
132
+
133
+ public String getCurrentVersion () {
134
+ return currentVersion ;
135
+ }
136
+
137
+ public void setCurrentVersion (String currentVersion ) {
138
+ this .currentVersion = currentVersion ;
139
+ }
140
+
141
+ public boolean isHandleRenamedFiles () {
142
+ return handleRenamedFiles ;
143
+ }
144
+
145
+ public void setHandleRenamedFiles (boolean handleRenamedFiles ) {
146
+ this .handleRenamedFiles = handleRenamedFiles ;
147
+ }
148
+
149
+ public boolean isHistoryEnabled () {
150
+ return historyEnabled ;
151
+ }
152
+
153
+ public void setHistoryEnabled (boolean historyEnabled ) {
154
+ this .historyEnabled = historyEnabled ;
155
+ }
156
+ }
71
157
72
158
/**
73
159
* Empty constructor to support serialization.
@@ -87,6 +173,34 @@ public RepositoryInfo(RepositoryInfo orig) {
87
173
this .currentVersion = orig .currentVersion ;
88
174
}
89
175
176
+ /**
177
+ * @return Data Transfer Object for RepositoryInfo
178
+ */
179
+ public RepositoryInfoTO getRepositoryInfoData () {
180
+ return createRepositoryInfoTO ();
181
+ }
182
+
183
+ private RepositoryInfoTO createRepositoryInfoTO () {
184
+ RepositoryInfoTO ri = new RepositoryInfoTO ();
185
+
186
+ if (this .working == null ) {
187
+ ri .working = false ;
188
+ } else {
189
+ ri .working = this .working ;
190
+ }
191
+
192
+ ri .directoryNameRelative = this .directoryNameRelative ;
193
+ ri .type = this .type ;
194
+ ri .remote = this .remote ;
195
+ ri .parent = this .parent ;
196
+ ri .branch = this .branch ;
197
+ ri .currentVersion = this .currentVersion ;
198
+ ri .handleRenamedFiles = this .handleRenamedFiles ;
199
+ ri .historyEnabled = this .historyEnabled ;
200
+
201
+ return ri ;
202
+ }
203
+
90
204
/**
91
205
* @return true if the repository handles renamed files, false otherwise.
92
206
*/
@@ -193,7 +307,7 @@ public boolean isWorking() {
193
307
*
194
308
* @param working is repository working
195
309
*/
196
- public void setWorking (boolean working ) {
310
+ public void setWorking (Boolean working ) {
197
311
this .working = working ;
198
312
}
199
313
0 commit comments