@@ -49,6 +49,13 @@ class RestSASServerAdapter implements ContentAdapter {
49
49
this . rootFolders = { } ;
50
50
this . fileMetadataMap = { } ;
51
51
}
52
+ addChildItem : (
53
+ childItemUri : string | undefined ,
54
+ parentItemUri : string | undefined ,
55
+ properties : AddChildItemProperties ,
56
+ ) => Promise < boolean > ;
57
+ recycleItem ?: ( item : ContentItem ) => Promise < { newUri ?: Uri ; oldUri ?: Uri } > ;
58
+ restoreItem ?: ( item : ContentItem ) => Promise < boolean > ;
52
59
53
60
public async connect ( ) : Promise < void > {
54
61
const session = getSession ( ) ;
@@ -86,8 +93,7 @@ class RestSASServerAdapter implements ContentAdapter {
86
93
}
87
94
88
95
public connected ( ) : boolean {
89
- // TODO (sas-server)
90
- return true ;
96
+ return ! ! this . sessionId ;
91
97
}
92
98
93
99
public async setup ( ) : Promise < void > {
@@ -98,16 +104,14 @@ class RestSASServerAdapter implements ContentAdapter {
98
104
await this . connect ( ) ;
99
105
}
100
106
101
- public async addChildItem (
102
- childItemUri : string | undefined ,
103
- parentItemUri : string | undefined ,
104
- properties : AddChildItemProperties ,
105
- ) : Promise < boolean > {
107
+ // TODO #417 Implement favorites
108
+ public async addItemToFavorites ( ) : Promise < boolean > {
106
109
throw new Error ( "Method not implemented." ) ;
107
110
}
108
111
109
- public async addItemToFavorites ( item : ContentItem ) : Promise < boolean > {
110
- throw new Error ( "fds Method not implemented." ) ;
112
+ // TODO #417 Implement favorites
113
+ public async removeItemFromFavorites ( ) : Promise < boolean > {
114
+ throw new Error ( "Method not implemented." ) ;
111
115
}
112
116
113
117
public async createNewFolder (
@@ -278,6 +282,7 @@ class RestSASServerAdapter implements ContentAdapter {
278
282
return this . filePropertiesToContentItem ( response . data ) ;
279
283
}
280
284
285
+ // TODO #417 Implement as part of favorites
281
286
public getRootFolder ( ) : ContentItem | undefined {
282
287
return undefined ;
283
288
}
@@ -308,6 +313,7 @@ class RestSASServerAdapter implements ContentAdapter {
308
313
}
309
314
310
315
return item . vscUri ;
316
+ // TODO #417 Implement favorites
311
317
// // If we're attempting to open a favorite, open the underlying file instead.
312
318
// try {
313
319
// return (await this.getItemOfId(item.uri)).vscUri;
@@ -341,10 +347,6 @@ class RestSASServerAdapter implements ContentAdapter {
341
347
return ! ! this . filePropertiesToContentItem ( response . data ) ;
342
348
}
343
349
344
- public async removeItemFromFavorites ( item : ContentItem ) : Promise < boolean > {
345
- throw new Error ( "Method not implemented." ) ;
346
- }
347
-
348
350
public async renameItem (
349
351
item : ContentItem ,
350
352
newName : string ,
0 commit comments