diff options
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/model/workflow')
8 files changed, 149 insertions, 0 deletions
diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/end-event.ts b/sdc-workflow-designer-ui/src/app/model/workflow/end-event.ts new file mode 100644 index 00000000..300af898 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/end-event.ts @@ -0,0 +1,15 @@ +import {WorkflowNode} from './workflow-node'; +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ + +export class EndEvent extends WorkflowNode { +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/node-type.enum.ts b/sdc-workflow-designer-ui/src/app/model/workflow/node-type.enum.ts new file mode 100644 index 00000000..994b3b67 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/node-type.enum.ts @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + *******************************************************************************/ + +export enum NodeType { + startEvent, + endEvent, + toscaNodeManagementTask, + restTask, + exclusiveGateway, + parallelGateway, + subProcess, + intermediateCatchEvent, +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/parameter.ts b/sdc-workflow-designer-ui/src/app/model/workflow/parameter.ts new file mode 100644 index 00000000..cc87a6fa --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/parameter.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ + +import { ValueSource } from '../value-source.enum'; +import { ValueType } from '../value-type.enum'; + +export class Parameter { + constructor(public name: string, public value: string, public valueSource: string, + public type: string = ValueType[ValueType.String]) { + } +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/position.ts b/sdc-workflow-designer-ui/src/app/model/workflow/position.ts new file mode 100644 index 00000000..b690f4d6 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/position.ts @@ -0,0 +1,21 @@ +/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+
+import { Injectable } from '@angular/core';
+
+/**
+ * Position
+ * Workflow node position
+ */
+export class Position {
+ constructor(public top: number, public left: number, public width?: number, public height?: number) { }
+}
diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/sequence-flow.ts b/sdc-workflow-designer-ui/src/app/model/workflow/sequence-flow.ts new file mode 100644 index 00000000..492cc84d --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/sequence-flow.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ + +export class SequenceFlow { + + constructor(public sourceRef: string, public targetRef: string, public name?: string, public condition?:string) { } +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/start-event.ts b/sdc-workflow-designer-ui/src/app/model/workflow/start-event.ts new file mode 100644 index 00000000..d609f7ca --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/start-event.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ +import { Parameter } from './parameter'; +import { WorkflowNode } from './workflow-node'; + +export class StartEvent extends WorkflowNode { + public parameters: Parameter[] = []; +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/workflow-node.ts b/sdc-workflow-designer-ui/src/app/model/workflow/workflow-node.ts new file mode 100644 index 00000000..9e54be13 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/workflow-node.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ +import { Position } from './position'; +import { SequenceFlow } from './sequence-flow'; + +export class WorkflowNode { + public constructor(public id: string, public name: string, public type: string, public position: Position, public sequenceFlows: SequenceFlow[]) {} +} diff --git a/sdc-workflow-designer-ui/src/app/model/workflow/workflow.ts b/sdc-workflow-designer-ui/src/app/model/workflow/workflow.ts new file mode 100644 index 00000000..672396cf --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/model/workflow/workflow.ts @@ -0,0 +1,21 @@ +/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+
+import { Injectable } from '@angular/core';
+import { WorkflowNode } from "./workflow-node";
+
+/**
+ * Workflow
+ */
+export class Workflow {
+ constructor(public id: string, public name: string, public nodes: WorkflowNode[]) {}
+}
|