/** * Translates user names by replacing a custom OU separator with the standard OU separator '/'. * * This is needed because either JLAN or the client cuts off the part before the slash during authentication, * so OpenCms never gets to see it. So if we want CIFS authentication for users from non-root OUs, we need to use * a different separator.<p> * * @param name the user name to translate * * @return the translated user name */ public static final String translateUser(String name) { String ouSeparator = (String)(OpenCms.getRuntimeProperty(PARAM_JLAN_OU_SEPARATOR)); if (ouSeparator == null) { ouSeparator = DEFAULT_OU_SEPARATOR; } String result = name; result = result.replace(ouSeparator, "/"); return result; }
/** * Creates an XML sitemap generator instance given a class name and the root path for the sitemap.<p> * * @param className the class name of the sitemap generator (may be null for the default * @param folderRootPath the root path of the start folder for the sitemap * @return the sitemap generator instance * * @throws CmsException if something goes wrong */ public CmsXmlSitemapGenerator createSitemapGenerator(String className, String folderRootPath) throws CmsException { if (CmsStringUtil.isEmptyOrWhitespaceOnly(className)) { className = (String)(OpenCms.getRuntimeProperty(PARAM_DEFAULT_SITEMAP_GENERATOR)); } if (CmsStringUtil.isEmptyOrWhitespaceOnly(className)) { className = CmsXmlSitemapGenerator.class.getName(); } try { Class<? extends CmsXmlSitemapGenerator> generatorClass = Class.forName(className).asSubclass( CmsXmlSitemapGenerator.class); Constructor<? extends CmsXmlSitemapGenerator> constructor = generatorClass.getConstructor(String.class); CmsXmlSitemapGenerator generator = constructor.newInstance(folderRootPath); return generator; } catch (Exception e) { LOG.error( "Could not create configured sitemap generator " + className + ", using the default class instead", e); return new CmsXmlSitemapGenerator(folderRootPath); } }
String configuredWebAppNames = (String)OpenCms.getRuntimeProperty(COMPATIBILITY_WEBAPPNAMES); if ((configuredWebAppNames != null) && (configuredWebAppNames.length() != 0)) {
String configuredWebAppNames = (String)OpenCms.getRuntimeProperty(COMPATIBILITY_WEBAPPNAMES); if ((configuredWebAppNames != null) && (configuredWebAppNames.length() != 0)) {
/** * Logs everything that has not been written to DB jet.<p> * * @param dbc the current db context * * @throws CmsDataAccessException if something goes wrong */ public void updateLog(CmsDbContext dbc) throws CmsDataAccessException { synchronized (m_publishListUpdateLock) { if (m_log.isEmpty()) { return; } List<CmsLogEntry> log = new ArrayList<CmsLogEntry>(m_log); m_log.clear(); String logTableEnabledStr = (String)OpenCms.getRuntimeProperty(PARAM_LOG_TABLE_ENABLED); if (Boolean.parseBoolean(logTableEnabledStr)) { // defaults to 'false' if value not set m_projectDriver.log(dbc, log); } CmsLogToPublishListChangeConverter converter = new CmsLogToPublishListChangeConverter(); for (CmsLogEntry entry : log) { converter.add(entry); } m_projectDriver.deleteUserPublishListEntries(dbc, converter.getPublishListDeletions()); m_projectDriver.writeUserPublishListEntries(dbc, converter.getPublishListAdditions()); } }
Object prop = OpenCms.getRuntimeProperty(info); if ((prop != null) && Boolean.valueOf(prop.toString()).booleanValue()) {