Statistics
| Revision:

root / branches / modelio3.7.x / src / main / java / org / modelio / togaf / profile / businessarchitecture / model / TogafActor.java @ 237

History | View | Annotate | Download (2.02 KB)

1
/** 
2
 * Licensed to the Apache Software Foundation (ASF) under one 
3
 * or more contributor license agreements.  See the NOTICE file 
4
 * distributed with this work for additional information 
5
 * regarding copyright ownership.  The ASF licenses this file 
6
 * to you under the Apache License, Version 2.0 (the 
7
 * "License"); you may not use this file except in compliance 
8
 * with the License.  You may obtain a copy of the License at 
9
 * 
10
 *        http://www.apache.org/licenses/LICENSE-2.0 
11
 * 
12
 *        Unless required by applicable law or agreed to in writing, 
13
 *        software distributed under the License is distributed on an 
14
 *        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
15
 *        KIND, either express or implied.  See the License for the 
16
 *        specific language governing permissions and limitations 
17
 *        under the License. 
18
 * 
19
 * 
20
 * @package    org.modelio.togaf. 
21
 * @author     Modelio 
22
 * @license    http://www.apache.org/licenses/LICENSE-2.0 
23
 * @version  1.0.00 
24
 **/
25
package org.modelio.togaf.profile.businessarchitecture.model;
26

    
27
import java.util.List;
28

    
29
import org.modelio.metamodel.uml.behavior.usecaseModel.Actor;
30
import org.modelio.metamodel.uml.infrastructure.Dependency;
31
import org.modelio.togaf.impl.TogafArchitectModule;
32
import org.modelio.togaf.profile.utils.ModelUtils;
33
import org.modelio.togaf.profile.utils.ResourceManager;
34

    
35
public class TogafActor extends OrganizationParticipant {
36

    
37
        public TogafActor() {
38
                super(TogafArchitectModule.getInstance().getModuleContext().getModelingSession().getModel().createActor());
39
                ModelUtils.setStereotype(this.element, "TogafArchitect","TogafActor");
40
                this.element.setName(ResourceManager.getName("TogafActor"));
41
        }
42

    
43
        public TogafActor(Actor element) {
44
                super(element);
45
        }
46

    
47
        public List<Assumes> getAssumes() {
48
                List<Assumes> res = new java.util.ArrayList<>();
49
                for (Dependency model_element : this.element.getDependsOnDependency()) {
50
                        res.add(new Assumes(model_element));
51
                }
52
                return res;
53
        }
54

    
55
        public void addAssumes(Assumes model) {
56
                this.element.getDependsOnDependency().add(model.getElement());
57
        }
58

    
59
}