发帖    主题    评论    推荐    标签    作者    订阅    查搜    注册   登陆   关注
 
面向对象 设计模式 领域驱动设计 企业架构 框架 开发教程 微服务 CQRS 扩展性 并发编程 事件溯源 分布式 SOA

test jive

2003-07-24 15:13
赞助商链接

mopker5w4i5Et57E.jpg

<B>来了,测试jive论坛</B><br>来了,测试jive论坛



摩托车论坛

2003-07-24 15:14

2003-07-24 15:27




package com.jivesoftware.base;

import com.jivesoftware.jdom.JDOMException;
import com.jivesoftware.util.StringUtils;
import java.io.*;
import java.security.KeyFactory;
import java.security.Signature;
import java.security.spec.X509EncodedKeySpec;
import java.util.*;

// Referenced classes of package com.jivesoftware.base:
// License, LicenseException, LicenseWrapper, JiveGlobals,
// Log

public final class LicenseManager
{

private static List licenses = null;

private LicenseManager()
{
}

public static void validateLicense(String product, String version)
throws LicenseException
{
loadLicenses();

}

public static void reloadLicenses()
{
if(licenses != null)
{
licenses.clear();
}
licenses = null;
loadLicenses();
}

public static Iterator getLicenses()
{
if(licenses == null)
{
return Collections.EMPTY_LIST.iterator();
}
List licenseProxies = new ArrayList();
for(int i = 0; i < licenses.size(); i++)
{
licenseProxies.add(new LicenseWrapper((License)licenses.get(i)));
}

return licenseProxies.iterator();
}

public static int getNumClusterMembers()
{
int allowedMembers = 1;
for(Iterator licenses = getLicenses(); licenses.hasNext();)
{
LicenseWrapper licenseWrapper = (LicenseWrapper)licenses.next();
if(licenseWrapper.getNumClusterMembers() < allowedMembers)
{
allowedMembers = licenseWrapper.getNumClusterMembers();
}
if(allowedMembers == 1)
{
allowedMembers = licenseWrapper.getNumClusterMembers();
}
}

return allowedMembers;
}

static boolean validate(License license)
throws Exception
{

return true;
}

private static synchronized void loadLicenses()
{
licenses = new ArrayList();
License license = new License(0xbc614eL,
"Jive Forums Professional", "3.1.2", License.LicenseType.COMMERCIAL);
license.setCompany(
"365do.com");
license.setCreationDate(new Date());
license.setName(
"365do.com");
license.setNumClusterMembers(9999);
license.setNumCopies(9999);
license.setURL(
"http://www.365do.com/");
licenses.add(license);
return;
}

private static boolean isValidProduct(String product, License license)
{
return true;
}

}

赞助商链接

赞助商链接

返回顶部

移动版 关于本站 使用帮助 联系反馈 最佳分辨率1366x768
OpenSource JIVEJDON Powered by JdonFramework Code © 2002-20 jdon.com