Skip to content

Commit c1ad860

Browse files
Scott DoverScott Dover
Scott Dover
authored and
Scott Dover
committed
chore: adjust todos/comments
1 parent bf70043 commit c1ad860

File tree

4 files changed

+17
-20
lines changed

4 files changed

+17
-20
lines changed

client/src/components/ContentNavigator/ContentAdapterFactory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from "./types";
1111

1212
class ContentAdapterFactory {
13-
// TODO #889 Update this to return RestSASServerAdapter & ITCSASServerAdapter
13+
// TODO #889 Update this to return ITCSASServerAdapter
1414
public create(
1515
connectionType: ConnectionType,
1616
sourceType: ContentNavigatorConfig["sourceType"],

client/src/components/ContentNavigator/ContentModel.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export class ContentModel {
3434
return Object.entries(await this.contentAdapter.getRootItems())
3535
.sort(
3636
// sort the delegate folders as the order in the supportedDelegateFolders
37-
// TODO MEEEE!
3837
(a, b) =>
3938
ALL_ROOT_FOLDERS.indexOf(a[0]) - ALL_ROOT_FOLDERS.indexOf(b[0]),
4039
)

client/src/components/ContentNavigator/const.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ export const SAS_CONTENT_ROOT_FOLDERS = [
5050
"@myRecycleBin",
5151
];
5252

53-
export const SAS_SERVER_ROOT_FOLDERS = [
54-
// "@myFavorites",
55-
"@sasServerRoot",
56-
// "@myRecycleBin",
57-
];
53+
export const SAS_SERVER_ROOT_FOLDERS = ["@sasServerRoot"];
5854

5955
export const ALL_ROOT_FOLDERS = [
6056
...SAS_CONTENT_ROOT_FOLDERS,

client/src/connection/rest/RestSASServerAdapter.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ class RestSASServerAdapter implements ContentAdapter {
4949
this.rootFolders = {};
5050
this.fileMetadataMap = {};
5151
}
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>;
5259

5360
public async connect(): Promise<void> {
5461
const session = getSession();
@@ -86,8 +93,7 @@ class RestSASServerAdapter implements ContentAdapter {
8693
}
8794

8895
public connected(): boolean {
89-
// TODO (sas-server)
90-
return true;
96+
return !!this.sessionId;
9197
}
9298

9399
public async setup(): Promise<void> {
@@ -98,16 +104,14 @@ class RestSASServerAdapter implements ContentAdapter {
98104
await this.connect();
99105
}
100106

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> {
106109
throw new Error("Method not implemented.");
107110
}
108111

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.");
111115
}
112116

113117
public async createNewFolder(
@@ -278,6 +282,7 @@ class RestSASServerAdapter implements ContentAdapter {
278282
return this.filePropertiesToContentItem(response.data);
279283
}
280284

285+
// TODO #417 Implement as part of favorites
281286
public getRootFolder(): ContentItem | undefined {
282287
return undefined;
283288
}
@@ -308,6 +313,7 @@ class RestSASServerAdapter implements ContentAdapter {
308313
}
309314

310315
return item.vscUri;
316+
// TODO #417 Implement favorites
311317
// // If we're attempting to open a favorite, open the underlying file instead.
312318
// try {
313319
// return (await this.getItemOfId(item.uri)).vscUri;
@@ -341,10 +347,6 @@ class RestSASServerAdapter implements ContentAdapter {
341347
return !!this.filePropertiesToContentItem(response.data);
342348
}
343349

344-
public async removeItemFromFavorites(item: ContentItem): Promise<boolean> {
345-
throw new Error("Method not implemented.");
346-
}
347-
348350
public async renameItem(
349351
item: ContentItem,
350352
newName: string,

0 commit comments

Comments
 (0)