}
public void applyDesign(WGDatabase db, ContentStore cs) {
try {
Design designConfig = cs.getDesign();
DesignReference ref = new DesignReference(designConfig.getSource(), designConfig.getName());
WGADesign design = resolveDesignReference(ref);
if (design == null) {
_core.getLog().error("Unknown design: " + new DesignReference(designConfig).toString());
return;
}
// Look if we have an overlay: If so use special overlay design provider
Design overlayConfig = cs.getOverlay();
if (overlayConfig != null) {
ref = new DesignReference(overlayConfig.getSource(), overlayConfig.getName());
WGADesign overlay = resolveDesignReference(ref);
if (overlay != null) {
OverlayDesignProvider.applyOverlayDesign(_core, db, design, designConfig.getOptions(), overlay, overlayConfig.getOptions());
return;
}
else {
_core.getLog().error("Cannot resolve design overlay: " + new DesignReference(overlayConfig).toString());
}