|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
NC二次开发nc.clientplugin.bs.PluginParser
插件解析器,默认解析module下的.plugin文件
public void scanPlugin() throws Exception{
String ncHome =getNCHomePath();
File moduleDir = new File(ncHome,"modules");
File[] childs = moduleDir.listFiles(new FileFilter(){
public boolean accept(File file) {
return file.isDirectory();
}
});
int count = childs == null ? 0 : childs.length;
for (int i = 0; i < count; i++) {
File moduleFile = childs;
File pluginDir = new File(moduleFile, "META-INF/clientplugins");
if(pluginDir.exists()){
scanPluginDir(pluginDir);
}
}
File extPluginFile = new File(ncHome,"extplugins");
if(extPluginFile.exists()){
scanPluginDir(extPluginFile);
}
}
nc.clientplugin.ui.ClientPluginInfoCenter
获取所有插件
<?xml version="1.0" encoding='gb2312'?>
<plugins>
<plugin type="systemAction" scope="superAdmin,accountAdmin,corpAdmin,user">
<action order="0">nc.ui.sm.sysfunc.action.LogOutAction</action>
<action order="3">nc.ui.sm.sysfunc.action.NCConsoleAction</action>
<action order="9">nc.ui.sm.sysfunc.action.HelpAction</action>
</plugin>
<plugin type="systemAction" scope="accountAdmin,corpAdmin,user">
<action order="1">nc.ui.sm.sysfunc.action.QuickLoginAction</action>
</plugin>
</plugins>
|
|