本文整理了Java中org.opencastproject.security.api.Organization.getServers()
方法的一些代码示例,展示了Organization.getServers()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Organization.getServers()
方法的具体详情如下:
包路径:org.opencastproject.security.api.Organization
类名称:Organization
方法名:getServers
[英]Returns the server names and the corresponding ports that have been registered with this organization.
[中]返回已在此组织中注册的服务器名称和相应端口。
代码示例来源:origin: opencast/opencast
private void refresh() {
final long now = System.currentTimeMillis();
if (now - lastRefresh > refreshInterval) {
byId.clear();
byHost.clear();
for (Organization org : persistence.getOrganizations()) {
byId.put(org.getId(), org);
// (host, port)
for (Map.Entry<String, Integer> server : org.getServers().entrySet()) {
byHost.put(tuple(server.getKey(), server.getValue()), org);
}
}
lastRefresh = now;
}
}
}
代码示例来源:origin: opencast/opencast
JpaOrganization organizationEntity = getOrganizationEntity(org.getId(), em);
if (organizationEntity == null) {
JpaOrganization organization = new JpaOrganization(org.getId(), org.getName(), org.getServers(),
org.getAdminRole(), org.getAnonymousRole(), org.getProperties());
em.persist(organization);
organizationEntity.setAdminRole(org.getAdminRole());
organizationEntity.setAnonymousRole(org.getAnonymousRole());
for (Map.Entry<String, Integer> servers : org.getServers().entrySet()) {
organizationEntity.addServer(servers.getKey(), servers.getValue());
organizationEntity.setServers(org.getServers());
organizationEntity.setProperties(org.getProperties());
em.merge(organizationEntity);
代码示例来源:origin: opencast/opencast
/**
* Constructs an organization from an organization
*
* @param org
* the organization
*/
public static JaxbOrganization fromOrganization(Organization org) {
if (org instanceof JaxbOrganization)
return (JaxbOrganization) org;
return new JaxbOrganization(org.getId(), org.getName(), org.getServers(), org.getAdminRole(),
org.getAnonymousRole(), org.getProperties());
}
内容来源于网络,如有侵权,请联系作者删除!