* @param mapContext information about the map projection, bounds, size, etc...
*/
public synchronized Style getStyle(@Nonnull final MfClientHttpRequestFactory clientHttpRequestFactory,
@Nonnull final MapfishMapContext mapContext) throws Exception {
if (this.styleObject == null && this.style != null) {
final StyleParserPlugin parser = new SLDParserPlugin();
try {
this.styleObject = parser.parseStyle(null, clientHttpRequestFactory, this.style, mapContext).get();
} catch (Throwable throwable) {
throw ExceptionUtils.getRuntimeException(throwable);
}
}
return this.styleObject;