|
13 | 13 |
|
14 | 14 | namespace CmisSync.Lib.Cmis |
15 | 15 | { |
16 | | - /// <summary> |
17 | | - /// Data object representing a CMIS server. |
18 | | - /// </summary> |
19 | | - public class CmisServer |
20 | | - { |
21 | | - /// <summary> |
22 | | - /// URL of the CMIS server. |
23 | | - /// </summary> |
24 | | - public Uri Url { get; private set; } |
25 | | - |
26 | | - /// <summary> |
27 | | - /// Repositories contained in the CMIS server. |
28 | | - /// </summary> |
29 | | - public Dictionary<string, string> Repositories { get; private set; } |
30 | | - |
31 | | - /// <summary> |
32 | | - /// Constructor. |
33 | | - /// </summary> |
34 | | - public CmisServer(Uri url, Dictionary<string, string> repositories) |
35 | | - { |
36 | | - Url = url; |
37 | | - Repositories = repositories; |
38 | | - } |
39 | | - } |
40 | | - |
41 | 16 | /// <summary> |
42 | 17 | /// Useful CMIS methods. |
43 | 18 | /// </summary> |
@@ -254,97 +229,6 @@ static public string[] GetSubfolders(string repositoryId, string path, |
254 | 229 | return result.ToArray(); |
255 | 230 | } |
256 | 231 |
|
257 | | - |
258 | | - /// <summary> |
259 | | - /// Folder tree. |
260 | | - /// </summary> |
261 | | - public class FolderTree |
262 | | - { |
263 | | - /// <summary> |
264 | | - /// Children. |
265 | | - /// </summary> |
266 | | - public List<FolderTree> Children = new List<FolderTree>(); |
267 | | - |
268 | | - /// <summary> |
269 | | - /// Folder path. |
270 | | - /// </summary> |
271 | | - public string Path; |
272 | | - |
273 | | - /// <summary> |
274 | | - /// Folder name. |
275 | | - /// </summary> |
276 | | - public string Name { get; set; } |
277 | | - |
278 | | - /// <summary> |
279 | | - /// |
280 | | - /// </summary> |
281 | | - public bool Finished { get; set; } |
282 | | - |
283 | | - /// <summary> |
284 | | - /// Constructor. |
285 | | - /// </summary> |
286 | | - public FolderTree(IList<ITree<IFileableCmisObject>> trees, IFolder folder, int depth) |
287 | | - { |
288 | | - this.Path = folder.Path; |
289 | | - this.Name = folder.Name; |
290 | | - if (depth == 0) |
291 | | - { |
292 | | - this.Finished = false; |
293 | | - } |
294 | | - else |
295 | | - { |
296 | | - this.Finished = true; |
297 | | - } |
298 | | - |
299 | | - if (trees != null) |
300 | | - { |
301 | | - foreach (ITree<IFileableCmisObject> tree in trees) |
302 | | - { |
303 | | - Folder f = tree.Item as Folder; |
304 | | - if (f != null) |
305 | | - this.Children.Add(new FolderTree(tree.Children, f, depth - 1)); |
306 | | - } |
307 | | - } |
308 | | - } |
309 | | - } |
310 | | - |
311 | | - ///// <summary> |
312 | | - ///// Get the sub-folders of a particular CMIS folder. |
313 | | - ///// </summary> |
314 | | - ///// <returns>Full path of each sub-folder, including leading slash.</returns> |
315 | | - //static public FolderTree GetSubfolderTree( CmisRepoCredentials credentials, string path, int depth) |
316 | | - //{ |
317 | | - // // Connect to the CMIS repository. |
318 | | - // ISession session = Auth.Auth.GetCmisSession(credentials.Address.ToString(), credentials.UserName, credentials.Password.ToString(), credentials.RepoId); |
319 | | - |
320 | | - // // Get the folder. |
321 | | - // IFolder folder; |
322 | | - // try |
323 | | - // { |
324 | | - // folder = (IFolder)session.GetObjectByPath(path); |
325 | | - // } |
326 | | - // catch (Exception ex) |
327 | | - // { |
328 | | - // Logger.Warn(String.Format("CmisUtils | exception when session GetObjectByPath for {0}", path), ex); |
329 | | - // throw; |
330 | | - // } |
331 | | - |
332 | | - // // Debug the properties count, which allows to check whether a particular CMIS implementation is compliant or not. |
333 | | - // // For instance, IBM Connections is known to send an illegal count. |
334 | | - // Logger.Info("CmisUtils | folder.Properties.Count:" + folder.Properties.Count.ToString()); |
335 | | - // try |
336 | | - // { |
337 | | - // IList<ITree<IFileableCmisObject>> trees = folder.GetFolderTree(depth); |
338 | | - // return new FolderTree(trees, folder, depth); |
339 | | - // } |
340 | | - // catch (Exception e) |
341 | | - // { |
342 | | - // Logger.Info("CmisUtils getSubFolderTree | Exception " + e.Message, e); |
343 | | - // throw; |
344 | | - // } |
345 | | - //} |
346 | | - |
347 | | - |
348 | 232 | /// <summary> |
349 | 233 | /// Guess the web address where files can be seen using a browser. |
350 | 234 | /// Not bulletproof. It depends on the server, and on some servers there is no web UI at all. |
|
0 commit comments