@smartbit4all/ngx-docustore
v0.0.1
Published
1. Create a project-specific subclass from the `DocuStoreExplorerPageApi` interface and its implementation.
Downloads
2
Keywords
Readme
SmartDocuStoreExplorer
How to setup
- Create a project-specific subclass from the
DocuStoreExplorerPageApi
interface and its implementation.
public interface YourDocuExplorerPageApi extends DocuStoreExplorerPageApi {}
public class YourDocuExplorerPageApiImpl extends DocuStoreExplorerPageApiImpl
implements YourDocuExplorerPageApi{}
- Create a project-specific subclass from the
DocuStoreFolderPageApi
interface and its implementation.
public interface YourDocuFolderPageApi extends DocuStoreFolderPageApi {}
public class YourDocuFolderPageApiImpl extends DocuStoreFolderPageApiImpl
implements YourDocuFolderPageApi {
- Create project-specific view names that you provide in the
@ViewApi
annotations.
@ViewApi(value = YourViewNames.YOUR_DOCU_EXPLORER,
parent = YourViewNames.SOME_PARENT)
public interface MebitDocuExplorerPageApi extends DocuStoreExplorerPageApi {}
@ViewApi(value = YourViewNames.YOUR_DOCU_FOLDER,
parent = YourViewNames.YOUR_DOCU_EXPLORER)
public interface YourDocuFolderPageApi extends DocuStoreFolderPageApi {}
- In your project's UI configuration, use the
@Bean
annotation to define your derived interfaces and implementations.
@Bean
public DocuStoreFolderPageApi folderPageApi() {
return new YourDocuFolderPageApiImpl();
}
@Override
@Bean
public DocuStoreExplorerPageApi docuStoreExplorerPageApi() {
return new YourDocuExplorerPageApiImpl();
}
- Install the
@smartbit4all/document-explorer
npm package into your Angular project. @smartbit4all/document-explorer - In the
Pages.ts
file, specify the names of the new pages.
export enum Pages {
...
YOUR_DOCU_EXPLORER = 'YourDocuExplorer',
YOUR_DOCU_FOLDER = 'YourDocuFolder',
}
- In the
viewHandlers.ts
file, assign the URLs corresponding to the view names.
export const viewContextHandlers: SmartViewHandlerModel[] = [
...
{
name: Pages.YOUR_DOCU_EXPLORER,
route: 'your/route/for the component',
},
{
name: Pages.YOUR_DOCU_FOLDER,
route: 'your/route/for the component',
},
Configure the Angular routing according to your needs.
In the app.module.ts provide the DocuStoreExplorer viewname and the project AuthenticationService like this:
providers: [
...
{
provide: 'AuthenticationService',
useClass: AuthenticationService,
},
{
provide: 'pageName',
useValue: Pages.SUBSTANCE_DOCU_EXPLORER,
},
],