- requires user with access key id and secret.
amplify init
import { BusinessActionBase } from './business-action-base'; | |
import { StringIsNotNullEmptyRange, IsNotNullOrUndefined } from '@buildmotion/rules-engine'; | |
import { Severity } from '@buildmotion/logging'; | |
// tslint:disable-next-line:nx-enforce-module-boundaries | |
import { ContactDto, EmailAddressFormatIsValidRule } from '@buildmotion/quicken/domain/common'; | |
/** | |
* Use this action to perform business logic with validation and business rules. | |
*/ | |
export class AddContactAction<T> extends BusinessActionBase<T> { |
this.validationContext | |
.withSource(this.actionName) | |
.addRule(new rules.AreEqual('ThingsAreEqual', 'The things are not equal.', 'this', 'that', false)) | |
.addRule(new rules.IsTrue('ThisIsTrue', 'This is not true', this.isDone, true)) | |
.addRule(new rules.IsTrue('Really?', 'Is it really true?', false)) | |
.addRule(new rules.StringIsNotNullEmptyRange('StringIsGood', 'The string is not valid.', 'Hi', 3, 10)); |
export class ValidationContext implements IValidationContext { | |
state: ValidationContextState = ValidationContextState.NotEvaluated; | |
results: Array<RuleResult> = new Array<RuleResult>(); | |
rules: Array<RulePolicy> = new Array<RulePolicy>(); | |
source: string; | |
/** | |
* Use this method to add a new rule to the ValidationContext. | |
*/ | |
addRule(rule: RulePolicy) { |
import { ValidationContext } from '@buildmotion/rules-engine'; | |
import { ValidationContextState } from '@buildmotion/rules-engine'; | |
... | |
export class myClass { | |
validationContext: ValidationContext = new ValidationContext(); | |
// implementation details here; | |
} |
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { RouterModule, Routes } from '@angular/router'; | |
// DO NOT IMPORT - IMPORTED VIA THE LAZY-LOAD PROCESS BELOW!!!! | |
// import { SecurityAppModule } from '@lazy/security-app' | |
const routes: Routes = [ | |
{ | |
// lazy-load the library application here; | |
path: '', | |
loadChildren: () => import(`@lazy/security-app`).then(m => m.SecurityAppModule), |
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { AppRoutingModule } from './app-routing/app-routing.module'; | |
import { LoginComponent } from './login/login.component'; | |
@NgModule({ | |
declarations: [ | |
LoginComponent | |
], | |
imports: [ | |
AppRoutingModule, |
import { NgModule, Component } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { RouterModule, Routes } from '@angular/router'; | |
import { LoginComponent } from '../login/login.component'; | |
const routes: Routes = [ | |
{ | |
path: '', // default route for the security application. | |
component: LoginComponent | |
} | |
]; |
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { RouterModule, Routes } from '@angular/router'; | |
const routes: Routes = [ | |
{ | |
// lazy-load the library application here; | |
} | |
]; | |
@NgModule({ | |
declarations: [], |