blob: 2fe5abef3cef22f124eab179a9a01f562a6d78e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
package org.openecomp.sdc.asdctool.impl.validator.executers;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
import org.openecomp.sdc.be.model.Component;
import org.openecomp.sdc.be.model.LifecycleStateEnum;
public class ServiceToscaArtifactsValidatorExecutor extends ArtifactValidatorExecuter implements IArtifactValidatorExecuter{
public ServiceToscaArtifactsValidatorExecutor() {
setName("SERVICE_TOSCA_ARTIFACTS");
}
@Override
public boolean executeValidations() {
Map<GraphPropertyEnum, Object> hasProps = new HashMap<>();
hasProps.put(GraphPropertyEnum.COMPONENT_TYPE, ComponentTypeEnum.SERVICE.name());
hasProps.put(GraphPropertyEnum.STATE, LifecycleStateEnum.CERTIFIED.name());
Map<String, List<Component>> vertices = getVerticesToValidate(VertexTypeEnum.TOPOLOGY_TEMPLATE, hasProps);
return validate(vertices);
}
@Override
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|