|
|
|
@ -6,8 +6,14 @@ import com.fanruan.carina.annotions.FineComponent;
|
|
|
|
|
import com.fanruan.carina.annotions.Start; |
|
|
|
|
import com.fanruan.carina.annotions.Stop; |
|
|
|
|
import com.fanruan.carina.annotions.Supplemental; |
|
|
|
|
import com.fanruan.cloud.FanruanCloud; |
|
|
|
|
import com.fanruan.cloud.FinePassportServiceAdaptor; |
|
|
|
|
import com.fanruan.cloud.metadata.ConfigServiceProvider; |
|
|
|
|
import com.fanruan.cloud.site.SitesServiceProvider; |
|
|
|
|
import com.fanruan.config.bbs.FineBBSConfigProvider; |
|
|
|
|
import com.fanruan.update.base.UpdateSourceGroup; |
|
|
|
|
import com.fanruan.update.plugins.UpdatePluginConfigGroup; |
|
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
|
import com.fr.start.common.DesignerStartupContext; |
|
|
|
|
import com.fr.update.ResourceUpdateManager; |
|
|
|
|
import com.fr.update.base.DefaultSourcePath; |
|
|
|
@ -40,7 +46,33 @@ public class DesignUpdateComponent {
|
|
|
|
|
*/ |
|
|
|
|
@Start |
|
|
|
|
public void start() { |
|
|
|
|
FanruanCloud.setSitesService(new SitesServiceProvider() { |
|
|
|
|
@Override |
|
|
|
|
public boolean enabled() { |
|
|
|
|
return !CloudCenter.getInstance().isDisable(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public String acquireUrlByKind(String kind) { |
|
|
|
|
return CloudCenter.getInstance().acquireUrlByKind(kind); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
FanruanCloud.setConfigService(new ConfigServiceProvider() { |
|
|
|
|
@Override |
|
|
|
|
public boolean enabled() { |
|
|
|
|
return !CloudCenter.getInstance().isDisable(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public String acquireConf(String kind) { |
|
|
|
|
return CloudCenter.getInstance().acquireConf(kind); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public FineBBSConfigProvider getBBSConfig() { |
|
|
|
|
return Carina.config(FineBBSConfigProvider.class); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
FanruanCloud.setPassportService(new FinePassportServiceAdaptor()); |
|
|
|
|
if (DesignerStartupContext.getInstance().onWarmup()) { |
|
|
|
|
try { |
|
|
|
|
prepare4Start(); |
|
|
|
|