【仅供内部供应商使用,不提供对外解答和培训】

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
title主题示例实现
collapsetrue
@Authorize(callSignKey = Constants.PLUING_ID)
public class ThemeGreen extends AbstractThemeVariousProvider {

    @Override
    public String name() {
        return "AcrossGreen";
    }

    @Override
    public String text() {
        return "横向目录";
    }

    @Override
    public String coverPath() {
        return "/com/fr/solution/theme/green/files/cover.png";
    }

    @Override
    public String scriptPath() {
        PluginLicense pluginLicense = PluginLicenseManager.getInstance().getPluginLicenseByID(MongoConstants.PLUGIN_ID);
        if (pluginLicense.isAvailable()) {
            return "/com/fr/solution/theme/green/files/theme.js";
        } else {
            return "";
        }
    }

    @Override
    public String stylePath() {
        PluginLicense pluginLicense = PluginLicenseManager.getInstance().getPluginLicenseByID(MongoConstants.PLUGIN_ID);
        if (pluginLicense.isAvailable()) {
            return "/com/fr/solution/theme/green/files/style.css";
        } else {
            return "";
        }
    }
}

其中callSignKey的值就是插件的ID,是需要和plugin上述示例中,callSignKey的值就是插件的ID,是需要和plugin.xml中的id字段一致的。xml中的id字段一致的,如果插件试用期已过,那么就会返回空的路径,导致这个插件的并不会起作用了,当然,也可以使用其他更多的方式进行购买提醒。

注意事项

Authorize注解只应该加在除extra-designer标签以外的接入点实现类上。

...