argos/dmp-frontend/src/app/core/core-service.module.ts

97 lines
4.3 KiB
TypeScript
Raw Normal View History

2019-01-18 18:03:45 +01:00
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
import { CookieService } from 'ngx-cookie-service';
import { AuthGuard } from './auth-guard.service';
import { AuthService } from './services/auth/auth.service';
import { CultureService } from './services/culture/culture-service';
import { DashboardService } from './services/dashboard/dashboard.service';
import { DatasetProfileService } from './services/dataset-profile/dataset-profile.service';
import { DatasetWizardService } from './services/dataset-wizard/dataset-wizard.service';
import { DatasetExternalAutocompleteService } from './services/dataset/dataset-external-autocomplete.service';
2019-01-18 18:03:45 +01:00
import { DatasetService } from './services/dataset/dataset.service';
import { DmpInvitationService } from './services/dmp/dmp-invitation.service';
import { DmpProfileService } from './services/dmp/dmp-profile.service';
import { DmpService } from './services/dmp/dmp.service';
import { ExternalDataRepositoryService } from './services/external-sources/data-repository/extternal-data-repository.service';
import { ExternalDatasetService } from './services/external-sources/dataset/external-dataset.service';
import { ExternalSourcesConfigurationService } from './services/external-sources/external-sources-configuration.service';
import { ExternalSourcesService } from './services/external-sources/external-sources.service';
import { ExternalRegistryService } from './services/external-sources/registry/external-registry.service';
import { ExternalResearcherService } from './services/external-sources/researcher/external-researcher.service';
import { ExternalServiceService } from './services/external-sources/service/external-service.service';
import { BaseHttpService } from './services/http/base-http.service';
import { LoggingService } from './services/logging/logging-service';
import { UiNotificationService } from './services/notification/ui-notification-service';
import { ProgressIndicationService } from './services/progress-indication/progress-indication-service';
import { GrantFileUploadService } from './services/grant/grant-file-upload.service';
import { GrantService } from './services/grant/grant.service';
2019-08-20 17:32:42 +02:00
import { ProjectService } from './services/project/project.service';
2019-01-18 18:03:45 +01:00
import { SearchBarService } from './services/search-bar/search-bar.service';
import { TimezoneService } from './services/timezone/timezone-service';
import { UserService } from './services/user/user.service';
import { CollectionUtils } from './services/utilities/collection-utils.service';
import { TypeUtils } from './services/utilities/type-utils.service';
2019-03-01 16:15:25 +01:00
import { QuickWizardService } from './services/quick-wizard/quick-wizard.service';
import { OrganisationService } from './services/organisation/organisation.service';
import { EmailConfirmationService } from './services/email-confirmation/email-confirmation.service';
2019-08-20 17:32:42 +02:00
import { FunderService } from './services/funder/funder.service';
import { ContactSupportService } from './services/contact-support/contact-support.service';
2019-01-18 18:03:45 +01:00
//
//
// This is shared module that provides all the services. Its imported only once on the AppModule.
//
//
@NgModule({
})
export class CoreServiceModule {
constructor(@Optional() @SkipSelf() parentModule: CoreServiceModule) {
if (parentModule) {
throw new Error(
'CoreModule is already loaded. Import it in the AppModule only');
}
}
static forRoot(): ModuleWithProviders {
return {
ngModule: CoreServiceModule,
providers: [
AuthService,
CookieService,
BaseHttpService,
AuthGuard,
CultureService,
TimezoneService,
TypeUtils,
CollectionUtils,
UiNotificationService,
ProgressIndicationService,
LoggingService,
SearchBarService,
DashboardService,
GrantService,
2019-08-20 17:32:42 +02:00
ProjectService,
FunderService,
GrantFileUploadService,
2019-01-18 18:03:45 +01:00
DmpService,
DmpProfileService,
ExternalSourcesService,
ExternalSourcesConfigurationService,
DatasetService,
DatasetWizardService,
ExternalDatasetService,
ExternalDataRepositoryService,
ExternalRegistryService,
ExternalResearcherService,
ExternalServiceService,
DatasetProfileService,
UserService,
DmpInvitationService,
2019-03-01 16:15:25 +01:00
DatasetExternalAutocompleteService,
QuickWizardService,
OrganisationService,
EmailConfirmationService,
ContactSupportService
2019-01-18 18:03:45 +01:00
],
};
}
}