use of org.jboss.metadata.javaee.jboss.StubPropertyMetaData in project wildfly by wildfly.
the class WSRefUtils method getUnifiedPortComponentRefMetaData.
private static UnifiedPortComponentRefMetaData getUnifiedPortComponentRefMetaData(final PortComponentRef portComponentMD) {
final UnifiedPortComponentRefMetaDataBuilder builder = new UnifiedPortComponentRefMetaDataBuilder();
// propagate service endpoint interface
builder.setServiceEndpointInterface(portComponentMD.getServiceEndpointInterface());
// propagate MTOM properties
builder.setMtomEnabled(portComponentMD.isEnableMtom());
builder.setMtomThreshold(portComponentMD.getMtomThreshold());
// propagate addressing properties
final Addressing addressingMD = portComponentMD.getAddressing();
if (addressingMD != null) {
builder.setAddressingAnnotationSpecified(true);
builder.setAddressingEnabled(addressingMD.isEnabled());
builder.setAddressingRequired(addressingMD.isRequired());
builder.setAddressingResponses(addressingMD.getResponses());
}
// propagate respect binding properties
if (portComponentMD.getRespectBinding() != null) {
builder.setRespectBindingAnnotationSpecified(true);
builder.setRespectBindingEnabled(true);
}
// propagate link
builder.setPortComponentLink(portComponentMD.getPortComponentLink());
// propagate jboss specific MD
if (portComponentMD instanceof JBossPortComponentRef) {
final JBossPortComponentRef jbossPortComponentMD = (JBossPortComponentRef) portComponentMD;
// propagate port QName
builder.setPortQName(jbossPortComponentMD.getPortQname());
// propagate configuration properties
builder.setConfigName(jbossPortComponentMD.getConfigName());
builder.setConfigFile(jbossPortComponentMD.getConfigFile());
// propagate stub properties
final List<StubPropertyMetaData> stubPropertiesMD = jbossPortComponentMD.getStubProperties();
if (stubPropertiesMD != null) {
for (final StubPropertyMetaData stubPropertyMD : stubPropertiesMD) {
builder.addStubProperty(new UnifiedStubPropertyMetaData(stubPropertyMD.getPropName(), stubPropertyMD.getPropValue()));
}
}
}
return builder.build();
}
Aggregations