All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jresearch.flexess.client.impl.DefaultCheckerFlow Maven / Gradle / Ivy

The newest version!
package org.jresearch.flexess.client.impl;

import org.eclipse.emf.ecore.EObject;
import org.jresearch.flexess.client.UamClientException;
import org.jresearch.flexess.client.mappers.IInstanceMapper;
import org.jresearch.flexess.client.mappers.impl.DefaultMapper;
import org.jresearch.flexess.core.model.uam.PObject;

public class DefaultCheckerFlow implements ICheckerFlow {

	private final Class aClass;

	public DefaultCheckerFlow(Class aCl) {
		aClass = aCl;

	}

	@Override
	public EObject getPOInstance(PObject po) {
		EObject eObject = null;
		try {
			IInstanceMapper mapper = new DefaultMapper();
			eObject = mapper.createPObjectInstance(null, po);
		} catch (Exception e) {
			throw new UamClientException("Unable to create EObject", e);
		}
		return eObject;
	}

	@Override
	public Class getObjectClass() {
		return aClass;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy