2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 /// <reference path="../../../../references"/>
21 module Sdc.ViewModels {
24 export interface IManagementWorkflowViewModelScope extends IWorkspaceViewModelScope {
25 vendorModel:VendorModel;
28 export class VendorModel {
29 artifacts: Models.ArtifactGroupModel;
35 participants:Array<participant>;
37 constructor(artifacts: Models.ArtifactGroupModel, serviceID:string, readonly:boolean, sessionID:string,
38 requestID:string, diagramType:string, participants:Array<participant>){
39 this.artifacts = artifacts;
40 this.serviceID = serviceID;
41 this.readonly = readonly;
42 this.sessionID = sessionID;
43 this.requestID = requestID;
44 this.diagramType = diagramType;
45 this.participants = participants;
49 export class ManagementWorkflowViewModel {
56 constructor(private $scope:IManagementWorkflowViewModelScope,
60 this.$scope.updateSelectedMenuItem();
64 private static getParticipants():Array<participant> {
75 "name": "Infrastructure"
113 private initScope():void {
114 this.$scope.vendorModel = new VendorModel(
115 this.$scope.component.artifacts.filteredByType(Utils.Constants.ArtifactType.THIRD_PARTY_RESERVED_TYPES.WORKFLOW),
116 this.$scope.component.uniqueId,
117 this.$scope.isViewMode(),
118 this.$scope.user.userId,
119 this.uuid4.generate(),
120 Utils.Constants.ArtifactType.THIRD_PARTY_RESERVED_TYPES.WORKFLOW,
121 ManagementWorkflowViewModel.getParticipants()
124 this.$scope.thirdParty = true;
125 this.$scope.setValidState(true);