
org.ow2.easywsdl.extensions.wsdl4bpel.WSDL4BPELFactoryImpl Maven / Gradle / Ivy
/**
* Copyright (c) 2008-2012 EBM WebSourcing, 2012-2016 Linagora
*
* This program/library is free software: you can redistribute it and/or modify
* it under the terms of the New BSD License (3-clause license).
*
* This program/library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the New BSD License (3-clause license)
* for more details.
*
* You should have received a copy of the New BSD License (3-clause license)
* along with this program/library; If not, see http://directory.fsf.org/wiki/License:BSD_3Clause/
* for the New BSD License (3-clause license).
*/
package org.ow2.easywsdl.extensions.wsdl4bpel;
import java.util.Map;
import org.ow2.easywsdl.extensions.wsdl4bpel.api.Description;
import org.ow2.easywsdl.extensions.wsdl4bpel.api.WSDL4BPELException;
import org.ow2.easywsdl.extensions.wsdl4bpel.api.WSDL4BPELReader;
import org.ow2.easywsdl.extensions.wsdl4bpel.api.WSDL4BPELWriter;
import org.ow2.easywsdl.extensions.wsdl4bpel.impl.converter.DescriptionConverter;
import org.ow2.easywsdl.extensions.wsdl4bpel.impl.inout.WSDL4BPELReaderImpl;
import org.ow2.easywsdl.extensions.wsdl4bpel.impl.inout.WSDL4BPELWriterImpl;
import org.ow2.easywsdl.wsdl.api.WSDLException;
import org.ow2.easywsdl.wsdl.api.WSDLReader.FeatureConstants;
import org.ow2.easywsdl.wsdl.api.abstractItf.AbsItfDescription;
/**
* This class is a concrete implementation of the abstract class WSDLFactory.
*
* Some ideas used here have been shamelessly copied from the wonderful JAXP and
* Xerces work.
*
*
* @author Nicolas Salatge - EBM WebSourcing
*/
public class WSDL4BPELFactoryImpl extends WSDL4BPELFactory {
@SuppressWarnings("unchecked")
@Override
public Description addBPELElmt2Description(final AbsItfDescription desc) throws WSDL4BPELException {
Description newDesc = null;
try {
newDesc = DescriptionConverter.getInstance().convertDescription(desc);
} catch (final WSDLException e) {
throw new WSDL4BPELException(e);
}
return newDesc;
}
@Override
public Description addExtElmt2Description(final AbsItfDescription desc) throws WSDL4BPELException {
return addBPELElmt2Description(desc);
}
@Override
public WSDL4BPELReader newWSDLReader() throws WSDL4BPELException {
return new WSDL4BPELReaderImpl();
}
@Override
public WSDL4BPELReader newWSDLReader(final Map features)
throws WSDL4BPELException {
final WSDL4BPELReader reader = new WSDL4BPELReaderImpl();
((WSDL4BPELReaderImpl) reader).setFeatures(features);
return reader;
}
@Override
public WSDL4BPELWriter newWSDLWriter() throws WSDL4BPELException {
return new WSDL4BPELWriterImpl();
}
@Override
public Class getDescriptionType() {
return Description.class;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy