Search in sources :

Example 1 with ResourceDemandingSEFF

use of org.palladiosimulator.pcm.seff.ResourceDemandingSEFF in project Palladio-Editors-Sirius by PalladioSimulator.

the class AddSEFF method execute.

@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
    ResourceDemandingSEFF seff = (ResourceDemandingSEFF) parameters.get("instance");
    Signature signature = getSignature(seff);
    for (ServiceEffectSpecification s : seff.getBasicComponent_ServiceEffectSpecification().getServiceEffectSpecifications__BasicComponent()) {
        if (s.getDescribedService__SEFF() != null && s.getDescribedService__SEFF().equals(signature))
            // do nothing if the chosen signature already has a corresponding SEFF
            return;
    }
    seff.setDescribedService__SEFF(signature);
}
Also used : ResourceDemandingSEFF(org.palladiosimulator.pcm.seff.ResourceDemandingSEFF) Signature(org.palladiosimulator.pcm.repository.Signature) ServiceEffectSpecification(org.palladiosimulator.pcm.seff.ServiceEffectSpecification)

Aggregations

Signature (org.palladiosimulator.pcm.repository.Signature)1 ResourceDemandingSEFF (org.palladiosimulator.pcm.seff.ResourceDemandingSEFF)1 ServiceEffectSpecification (org.palladiosimulator.pcm.seff.ServiceEffectSpecification)1