public void setAttributesForUpdateIdP(List<String> attrNames) { createAttributeDefinitions("cz.metacentrum.perun.core.impl.ExtSourceIdp", attrNames); }
public void setOidcIssuers(List<String> oidcIssuers) { for (String issuer : oidcIssuers) { String iss = getOidcIssuerProperty(issuer, "iss"); if (iss == null) continue; String extSourceName = getOidcIssuerProperty(issuer, "extsource.name"); if (extSourceName == null) continue; String extSourceType = getOidcIssuerProperty(issuer, "extsource.type"); if (extSourceType == null) continue; log.debug("registering OIDC issuer {} with extSourceName={} and extSourceType={}", iss, extSourceName, extSourceType); oidcIssuersExtsourceNames.put(iss, extSourceName); oidcIssuersExtsourceTypes.put(iss, extSourceType); } }
/** * True if DB initializator is enabled, false if not * Default is false * * @return true if enabled, false if disabled */ public static boolean initializatorEnabled() { return coreConfig.isDbInitializatorEnabled(); }
/** * Return code of native language defined in config file. * Return NULL if no native language set. * * @return String representation of native language */ public static Locale getNativeLanguage() { try { String loc = BeansUtils.getCoreConfig().getNativeLanguage().split(",")[0]; if (loc != null && loc.trim().isEmpty()) { return null; } return new Locale(loc); } catch (Exception ex) { return null; } }
/** * True if this instance of perun is read only. * False if not. * * @return true or false (readOnly or not) */ public static boolean isPerunReadOnly() { return coreConfig.isReadOnlyPerun(); }
@Override public void write(Object object) throws IllegalArgumentException, IOException, RpcException { if (object instanceof String) { String htmlText = (String) object; ITextRenderer renderer = new ITextRenderer(); if (BeansUtils.getCoreConfig() != null && BeansUtils.getCoreConfig().getPdfFontPath() != null) { try { renderer.getFontResolver().addFont(new File(BeansUtils.getCoreConfig().getPdfFontPath()).getAbsolutePath(), "CP1250",true); } catch (Exception e) { log.error("Failed to add font for PDF: {}", e); } } renderer.setDocumentFromString(htmlText); renderer.layout(); try { renderer.createPDF(outputStream); } catch (DocumentException e) { throw new IOException(e); } } }
/** * Return code of native language defined in config file. * Return NULL if no native language set. * * @return String representation of native language */ public static Locale getNativeLanguage() { try { String loc = BeansUtils.getCoreConfig().getNativeLanguage().split(",")[0]; if (loc != null && loc.trim().isEmpty()) { return null; } return new Locale(loc); } catch (Exception ex) { return null; } }
public void setAttributesForUpdateX509(List<String> attrNames) { createAttributeDefinitions("cz.metacentrum.perun.core.impl.ExtSourceX509", attrNames); }