-
Notifications
You must be signed in to change notification settings - Fork 88
[PM-14360] Import Batching #703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
1249419
80b863d
c25d4be
e08ef3d
c7cde29
d0f260d
3b0d3c1
c26431b
79cf720
dfb54b7
6c0506e
87f4cb2
47f564b
53a0d56
c160e50
27583e3
73cdfb2
2bb7f2d
ac210f8
f3a682a
9349c12
e96581c
7d7623e
a48335c
9d8fbf0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
eliykat marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { DirectoryType } from "@/src/enums/directoryType"; | ||
import { IDirectoryService } from "@/src/services/directory.service"; | ||
|
||
export abstract class DirectoryFactoryService { | ||
abstract createService(type: DirectoryType): IDirectoryService; | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,9 +1,9 @@ | ||||||
import { OrganizationImportRequest } from "@/jslib/common/src/models/request/organizationImportRequest"; | ||||||
|
||||||
import { GroupEntry } from "@/src/models/groupEntry"; | ||||||
import { UserEntry } from "@/src/models/userEntry"; | ||||||
|
||||||
import { OrganizationImportRequest } from "../models/request/organizationImportRequest"; | ||||||
|
||||||
export abstract class RequestBuilderAbstratction { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(then your names should be good!) |
||||||
buildRequest: ( | ||||||
groups: GroupEntry[], | ||||||
users: UserEntry[], | ||||||
|
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You've duplicated this file instead of renaming it (there is now a |
eliykat marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
import { DirectoryFactoryAbstraction } from "@/jslib/common/src/abstractions/directory-factory.service"; | ||
import { I18nService } from "@/jslib/common/src/abstractions/i18n.service"; | ||
import { LogService } from "@/jslib/common/src/abstractions/log.service"; | ||
|
||
import { DirectoryFactoryService } from "../abstractions/directory-factory.service"; | ||
import { StateService } from "../abstractions/state.service"; | ||
import { DirectoryType } from "../enums/directoryType"; | ||
|
||
import { AzureDirectoryService } from "./azure-directory.service"; | ||
import { GSuiteDirectoryService } from "./gsuite-directory.service"; | ||
import { LdapDirectoryService } from "./ldap-directory.service"; | ||
import { OktaDirectoryService } from "./okta-directory.service"; | ||
import { OneLoginDirectoryService } from "./onelogin-directory.service"; | ||
|
||
export class DirectoryFactoryService implements DirectoryFactoryAbstraction { | ||
createService( | ||
directoryType: DirectoryType, | ||
logService: LogService, | ||
i18nService: I18nService, | ||
stateService: StateService, | ||
) { | ||
export class DefaultDirectoryFactoryService implements DirectoryFactoryService { | ||
constructor( | ||
private logService: LogService, | ||
private i18nService: I18nService, | ||
private stateService: StateService, | ||
) {} | ||
|
||
createService(directoryType: DirectoryType) { | ||
switch (directoryType) { | ||
case DirectoryType.GSuite: | ||
return new GSuiteDirectoryService(logService, i18nService, stateService); | ||
return new GSuiteDirectoryService(this.logService, this.i18nService, this.stateService); | ||
case DirectoryType.AzureActiveDirectory: | ||
return new AzureDirectoryService(logService, i18nService, stateService); | ||
return new AzureDirectoryService(this.logService, this.i18nService, this.stateService); | ||
case DirectoryType.Ldap: | ||
return new LdapDirectoryService(logService, i18nService, stateService); | ||
return new LdapDirectoryService(this.logService, this.i18nService, this.stateService); | ||
case DirectoryType.Okta: | ||
return new OktaDirectoryService(logService, i18nService, stateService); | ||
return new OktaDirectoryService(this.logService, this.i18nService, this.stateService); | ||
case DirectoryType.OneLogin: | ||
return new OneLoginDirectoryService(logService, i18nService, stateService); | ||
return new OneLoginDirectoryService(this.logService, this.i18nService, this.stateService); | ||
default: | ||
return null; | ||
throw new Error("Invalid Directory Type"); | ||
} | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.