org.opencastproject.security.api.Organization.getProperties()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中org.opencastproject.security.api.Organization.getProperties()方法的一些代码示例,展示了Organization.getProperties()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Organization.getProperties()方法的具体详情如下:
包路径:org.opencastproject.security.api.Organization
类名称:Organization
方法名:getProperties

Organization.getProperties介绍

[英]Returns the organizational properties
[中]返回组织属性

代码示例

代码示例来源:origin: opencast/opencast

/** Get the OAI-PMH server URL of the current organization. */
 public static Option<String> oaiPmhServerUrlOfCurrentOrganization(SecurityService secSvc) {
  return option(secSvc.getOrganization().getProperties().get(ORG_CFG_OAIPMH_SERVER_HOSTURL));
 }
}

代码示例来源:origin: opencast/opencast

/**
 * {@inheritDoc}
 *
 * @see org.opencastproject.workingfilerepository.api.WorkingFileRepository#getBaseUri()
 */
@Override
public URI getBaseUri() {
 if (securityService.getOrganization() != null) {
  Map<String, String> orgProps = securityService.getOrganization().getProperties();
  if (orgProps != null && orgProps.containsKey(OpencastConstants.WFR_URL_ORG_PROPERTY)) {
   try {
    return new URI(UrlSupport.concat(orgProps.get(OpencastConstants.WFR_URL_ORG_PROPERTY), servicePath));
   } catch (URISyntaxException ex) {
    logger.warn("Organization working file repository URL not set, fallback to server URL");
   }
  }
 }
 return URI.create(UrlSupport.concat(serverUrl, servicePath));
}

代码示例来源:origin: opencast/opencast

if (organizationEntity == null) {
 JpaOrganization organization = new JpaOrganization(org.getId(), org.getName(), org.getServers(),
     org.getAdminRole(), org.getAnonymousRole(), org.getProperties());
 em.persist(organization);
} else {
 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());
}

相关文章