// Look if we must sync
boolean sync = WGUtils.getBooleanMapValue(options, FileSystemDesignProvider.OPTION_SYNC, false);
if (sync) {
String location = getDesignLocation(design);
_core.getLog().info("Web application " + db.getDbReference() + " synchronizes design with design directory " + location);
db.setAttribute(WGACore.DBATTRIB_DESIGNSYNC, new DesignSyncManager(design.createDesignReference(), _core, db, location, options));
}
else {
FileSystemDesignProvider designProvider = createDesignProvider(design, db, options);
_core.getLog().info("Web application " + db.getDbReference() + " uses design from design directory " + designProvider.getDesignPath());
db.setDesignProvider(designProvider);