Search in sources :

Example 1 with Service

use of org.obeonetwork.dsl.soa.Service in project InformationSystem by ObeoNetwork.

the class WireItemProvider method getRequiredServices.

/**
 * Return the required services in a System.
 * @param system
 * @return requiredServices
 * @generated NOT
 * @added
 */
private List<Service> getRequiredServices(System system) {
    List<Service> requiredServices = new ArrayList<Service>();
    List<Component> ownedComponents = system.getOwnedComponents();
    for (Component component : ownedComponents) {
        requiredServices.addAll(component.getRequiredServices());
    }
    return requiredServices;
}
Also used : ArrayList(java.util.ArrayList) Service(org.obeonetwork.dsl.soa.Service) Component(org.obeonetwork.dsl.soa.Component)

Example 2 with Service

use of org.obeonetwork.dsl.soa.Service in project InformationSystem by ObeoNetwork.

the class InterfaceSpec method setName.

@Override
public void setName(String newName) {
    String oldName = getName();
    super.setName(newName);
    if (eContainer() != null) {
        Service service = (Service) eContainer();
        String serviceName = service.getName();
        if (serviceName != null && !serviceName.equals(newName)) {
            service.setName(newName);
        }
    }
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, SoaPackage.INTERFACE__NAME, oldName, newName));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Service(org.obeonetwork.dsl.soa.Service)

Example 3 with Service

use of org.obeonetwork.dsl.soa.Service in project InformationSystem by ObeoNetwork.

the class ServiceServicePropertiesEditionComponent method initPart.

/**
 * {@inheritDoc}
 *
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);
        final Service service = (Service) elt;
        final ServicePropertiesEditionPart servicePart = (ServicePropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(SoaViewsRepository.Service.Properties.synchronization)) {
            servicePart.initSynchronization(EEFUtils.choiceOfValues(service, SoaPackage.eINSTANCE.getService_Synchronization()), service.getSynchronization());
        }
        if (isAccessible(SoaViewsRepository.Service.Properties.kind)) {
            servicePart.initKind(EEFUtils.choiceOfValues(service, SoaPackage.eINSTANCE.getService_Kind()), service.getKind());
        }
        if (isAccessible(SoaViewsRepository.Service.Properties.name))
            servicePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, service.getName()));
        if (isAccessible(SoaViewsRepository.Service.Properties.description))
            servicePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, service.getDescription()));
    // init filters
    // init values for referenced views
    // init filters for referenced views
    }
    setInitializing(false);
}
Also used : Service(org.obeonetwork.dsl.soa.Service) ServicePropertiesEditionPart(org.obeonetwork.dsl.soa.parts.ServicePropertiesEditionPart)

Example 4 with Service

use of org.obeonetwork.dsl.soa.Service in project InformationSystem by ObeoNetwork.

the class WireItemProvider method getProvidedServices.

/**
 * Return the provided services in a System.
 * @param system
 * @return providedServices
 * @generated NOT
 * @added
 */
private List<Service> getProvidedServices(System system) {
    List<Service> providedServices = new ArrayList<Service>();
    List<Component> ownedComponents = system.getOwnedComponents();
    for (Component component : ownedComponents) {
        providedServices.addAll(component.getProvidedServices());
    }
    return providedServices;
}
Also used : ArrayList(java.util.ArrayList) Service(org.obeonetwork.dsl.soa.Service) Component(org.obeonetwork.dsl.soa.Component)

Aggregations

Service (org.obeonetwork.dsl.soa.Service)4 ArrayList (java.util.ArrayList)2 Component (org.obeonetwork.dsl.soa.Component)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 ServicePropertiesEditionPart (org.obeonetwork.dsl.soa.parts.ServicePropertiesEditionPart)1