use of org.apache.cxf.ws.transfer.resourcefactory.resolver.ResourceReference in project cxf by apache.
the class ResourceFactoryImpl method create.
@Override
public CreateResponse create(Create body) {
if (body.getDialect() != null && !body.getDialect().isEmpty()) {
if (dialects.containsKey(body.getDialect())) {
Dialect dialect = dialects.get(body.getDialect());
Representation representation = dialect.processCreate(body);
body.setRepresentation(representation);
} else {
throw new UnknownDialect();
}
}
ValidAndTransformHelper.validationAndTransformation(resourceTypeIdentifiers, body.getRepresentation(), null);
ResourceReference resourceReference = resourceResolver.resolve(body);
if (resourceReference.getResourceManager() != null) {
return createLocally(body, resourceReference);
}
return createRemotely(body, resourceReference);
}
Aggregations