You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.6 KiB
53 lines
1.6 KiB
/* |
|
* Copyright (C), 2018-2021 |
|
* Project: starter |
|
* FileName: PluginMonitor |
|
* Author: Louis |
|
* Date: 2021/3/30 15:10 |
|
*/ |
|
package com.fr.plugin.hrjf; |
|
|
|
import com.fanruan.api.i18n.I18nKit; |
|
import com.fanruan.api.log.LogKit; |
|
import com.fr.design.widget.Appearance; |
|
import com.fr.design.widget.FormWidgetDefinePaneFactoryBase; |
|
import com.fr.plugin.context.PluginContext; |
|
import com.fr.plugin.context.PluginMarker; |
|
import com.fr.plugin.hrjf.pane.VueDateEditorFormDefinePane; |
|
import com.fr.plugin.hrjf.widget.VueDateEditor; |
|
import com.fr.plugin.manage.PluginManager; |
|
import com.fr.plugin.observer.inner.AbstractPluginLifecycleMonitor; |
|
|
|
|
|
/** |
|
* <Function Description><br> |
|
* <PluginMonitor> |
|
* |
|
* @author fr.open |
|
* @since 1.0.0 |
|
*/ |
|
public class PluginMonitor extends AbstractPluginLifecycleMonitor { |
|
|
|
public PluginMonitor() { |
|
} |
|
|
|
public static void pluginForbid(PluginMarker pluginMarker) { |
|
PluginManager.getController().forbid(pluginMarker, pluginTaskResult -> { |
|
}); |
|
LogKit.error(I18nKit.getLocText("Plugin-hrjf_Licence_Expired")); |
|
} |
|
|
|
@Override |
|
public void beforeStop(PluginContext pluginContext) { |
|
} |
|
|
|
@Override |
|
public void afterRun(PluginContext pluginContext) { |
|
if (!pluginContext.isAvailable()) { |
|
pluginForbid(pluginContext.getMarker()); |
|
return; |
|
} |
|
// FormWidget定义日期控件外观 |
|
FormWidgetDefinePaneFactoryBase.registerDefinePane(VueDateEditor.class, new Appearance(VueDateEditorFormDefinePane.class, "VueDateDefine")); |
|
} |
|
} |