Search in sources :

Example 1 with PatternRefinement

use of org.eclipse.winery.model.adaptation.substitution.refinement.patterns.PatternRefinement in project winery by eclipse.

the class RefinementWebSocket method onOpen.

protected void onOpen() throws IOException {
    Map<String, List<String>> requestParameterMap = this.session.getRequestParameterMap();
    List<String> refinementType = requestParameterMap.get("type");
    if (Objects.nonNull(refinementType)) {
        String type = refinementType.get(0);
        if ("patterns".equals(type)) {
            this.refinement = new PatternRefinement(this);
        } else if ("topology".equals(type)) {
            this.refinement = new TopologyFragmentRefinement(this);
        } else if ("tests".equals(type)) {
            this.refinement = new TestRefinement(this);
        } else if ("patternDetection".equals(type)) {
            this.refinement = new PatternDetection(this);
        }
        if (Objects.nonNull(this.refinement)) {
            LOGGER.info("Opened consistency check web-socket with id: " + session.getId());
            return;
        }
    }
    this.onClose(this.session);
    LOGGER.debug("Closed session due to missing or incompatible refinement type!");
}
Also used : PatternRefinement(org.eclipse.winery.model.adaptation.substitution.refinement.patterns.PatternRefinement) TestRefinement(org.eclipse.winery.model.adaptation.substitution.refinement.tests.TestRefinement) TopologyFragmentRefinement(org.eclipse.winery.model.adaptation.substitution.refinement.topologyrefinement.TopologyFragmentRefinement) PatternDetection(org.eclipse.winery.model.adaptation.substitution.patterndetection.PatternDetection) List(java.util.List)

Aggregations

List (java.util.List)1 PatternDetection (org.eclipse.winery.model.adaptation.substitution.patterndetection.PatternDetection)1 PatternRefinement (org.eclipse.winery.model.adaptation.substitution.refinement.patterns.PatternRefinement)1 TestRefinement (org.eclipse.winery.model.adaptation.substitution.refinement.tests.TestRefinement)1 TopologyFragmentRefinement (org.eclipse.winery.model.adaptation.substitution.refinement.topologyrefinement.TopologyFragmentRefinement)1