
org.nasdanika.html.flow.FlowActionProviderAdapterFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flow Show documentation
Show all versions of flow Show documentation
Classes for generating Flow models documentation as YAML action spec.
The newest version!
package org.nasdanika.html.flow;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.nasdanika.common.Context;
import org.nasdanika.emf.FunctionAdapterFactory;
import org.nasdanika.flow.Activity;
import org.nasdanika.flow.Artifact;
import org.nasdanika.flow.Flow;
import org.nasdanika.flow.FlowPackage;
import org.nasdanika.flow.Participant;
import org.nasdanika.flow.PseudoState;
import org.nasdanika.flow.Resource;
import org.nasdanika.flow.Service;
import org.nasdanika.html.emf.ActionProviderAdapterFactory;
import org.nasdanika.html.model.app.util.ActionProvider;
/**
* Provides adapters for the Ecore types - {@link EPackage}, {@link EClass}, {@link EStructuralFeature}, {@link EOperation}, ...
* @author Pavel
*
*/
public class FlowActionProviderAdapterFactory extends ActionProviderAdapterFactory {
public FlowActionProviderAdapterFactory(Context context) {
super(context);
// Registering adapter factories.
registerAdapterFactory(
new FunctionAdapterFactory(
FlowPackage.Literals.PACKAGE,
ActionProvider.class,
this.getClass().getClassLoader(),
e -> new PackageActionBuilder(e, context).asActionProvider()));
// Participant
registerAdapterFactory(
new FunctionAdapterFactory(
FlowPackage.Literals.PARTICIPANT,
ActionProvider.class,
this.getClass().getClassLoader(),
e -> new ParticipantActionBuilder(e, context).asActionProvider()));
// Resource
registerAdapterFactory(
new FunctionAdapterFactory(
FlowPackage.Literals.RESOURCE,
ActionProvider.class,
this.getClass().getClassLoader(),
e -> new ResourceActionBuilder(e, context).asActionProvider()));
// Artifact
registerAdapterFactory(
new FunctionAdapterFactory(
FlowPackage.Literals.ARTIFACT,
ActionProvider.class,
this.getClass().getClassLoader(),
e -> new ArtifactActionBuilder(e, context).asActionProvider()));
// Pseudo-state
registerAdapterFactory(
new FunctionAdapterFactory(
FlowPackage.Literals.PSEUDO_STATE,
ActionProvider.class,
this.getClass().getClassLoader(),
e -> new PseudoStateActionBuilder(e, context).asActionProvider()));
// Activity
registerAdapterFactory(
new FunctionAdapterFactory>(
FlowPackage.Literals.ACTIVITY,
ActionProvider.class,
this.getClass().getClassLoader(),
e -> new ActivityActionBuilder>(e, context).asActionProvider()));
// Flow
registerAdapterFactory(
new FunctionAdapterFactory(
FlowPackage.Literals.FLOW,
ActionProvider.class,
this.getClass().getClassLoader(),
e -> new FlowActionBuilder(e, context).asActionProvider()));
// Service
registerAdapterFactory(
new FunctionAdapterFactory(
FlowPackage.Literals.SERVICE,
ActionProvider.class,
this.getClass().getClassLoader(),
e -> new ServiceActionBuilder(e, context).asActionProvider()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy