/** * Returns the default secret key that connection managers should present while trying to * establish a new connection. * * @return the default secret key that connection managers should present while trying to * establish a new connection. */ public static String getDefaultSecret() { return JiveGlobals.getProperty("xmpp.multiplex.defaultSecret"); }
/** * Returns the host of the proxy to use to connect to igniterealtime.org or <tt>null</tt> * if no proxy is used. * * @return the host of the proxy or null if no proxy is used. */ public String getProxyHost() { return JiveGlobals.getProperty("update.proxy.host", ""); }
/** * Returns the default secret key to use for those external components that don't have an * individual configuration. * * @return the default secret key to use for those external components that don't have an * individual configuration. */ public static String getDefaultSecret() { return JiveGlobals.getProperty("xmpp.component.defaultSecret"); }
@Override public String get(Object key) { return JiveGlobals.getProperty((String)key); }
/** * Returns the domain associated with this AuthToken. * * @return the domain associated with this AuthToken. * @deprecated As Openfire serves only one domain, there's no need for a domain-specific token. Use {@link XMPPServerInfo#getXMPPDomain()} instead. */ @Deprecated public String getDomain() { return JiveGlobals.getProperty("xmpp.domain"); }
/** * Returns a boolean value Jive property. * * @param name the name of the property to return. * @return true if the property value exists and is set to <tt>"true"</tt> (ignoring case). * Otherwise <tt>false</tt> is returned. */ public static boolean getBooleanProperty(String name) { return Boolean.valueOf(getProperty(name)); }
public DefaultAuthorizationMapping() { approvedRealms = new Vector<>(); String realmList = JiveGlobals.getProperty("sasl.approvedRealms"); if(realmList != null) { StringTokenizer st = new StringTokenizer(realmList, " ,\t\n\r\f"); while(st.hasMoreTokens()) { approvedRealms.add(st.nextToken()); } } }
public static void setCacheTypeProperty(String cacheName, String type) { cacheName = cacheName.replaceAll(" ", ""); if ( !type.equals( JiveGlobals.getProperty( "cache." + cacheName + ".type" ) )) { JiveGlobals.setProperty( "cache." + cacheName + ".type", type ); } }
/** * Constructs a new EmailService instance. */ private EmailService() { host = JiveGlobals.getProperty("mail.smtp.host", "localhost"); port = JiveGlobals.getIntProperty("mail.smtp.port", 25); username = JiveGlobals.getProperty("mail.smtp.username"); password = JiveGlobals.getProperty("mail.smtp.password"); sslEnabled = JiveGlobals.getBooleanProperty("mail.smtp.ssl"); debugEnabled = JiveGlobals.getBooleanProperty("mail.debug"); }
@Override public String getXMPPDomain() { return JiveGlobals.getProperty("xmpp.domain", getHostname() ).toLowerCase(); }
public static void setMinCacheSize(String cacheName, long size) { cacheName = cacheName.replaceAll(" ", ""); if ( !Long.toString( size ).equals( JiveGlobals.getProperty( "cache." + cacheName + ".min" ) )) { JiveGlobals.setProperty( "cache." + cacheName + ".min", Long.toString( size ) ); } }
public DefaultAuthorizationPolicy() { approvedRealms = new Vector<>(); proxyAuth = false; String realmList = JiveGlobals.getProperty("sasl.approvedRealms"); if(realmList != null) { StringTokenizer st = new StringTokenizer(realmList, " ,\t\n\r\f"); while(st.hasMoreTokens()) { approvedRealms.add(st.nextToken()); } } proxyAuth = JiveGlobals.getBooleanProperty("sasl.proxyAuth", false); }
/** * Sets a local property which overrides the maximum cache entry lifetime * for the supplied cache name. * @param cacheName the name of the cache to store a value for. * @param lifetime the maximum cache entry lifetime. */ public static void setMaxLifetimeProperty(String cacheName, long lifetime) { cacheName = cacheName.replaceAll(" ", ""); if ( !Long.toString( lifetime ).equals( JiveGlobals.getProperty( "cache." + cacheName + ".maxLifetime" ) )) { JiveGlobals.setProperty( ( "cache." + cacheName + ".maxLifetime" ), Long.toString( lifetime ) ); } }
public CrowdUserProvider() { String propertyValue = JiveGlobals.getProperty(JIVE_CROWD_USERS_CACHE_TTL_SECS); int ttl = (propertyValue == null || propertyValue.trim().length() == 0) ? CACHE_TTL : Integer.parseInt(propertyValue); crowdUserSync.scheduleAtFixedRate(new UserSynch(this), 0, ttl, TimeUnit.SECONDS); JiveGlobals.setProperty(JIVE_CROWD_USERS_CACHE_TTL_SECS, String.valueOf(ttl)); // workaround to load the sync of groups with crowd new CrowdGroupProvider(); }
static boolean isCompressionEnabled() { return JiveGlobals.getProperty( ConnectionSettings.Client.COMPRESSION_SETTINGS, Connection.CompressionPolicy.optional.toString()) .equalsIgnoreCase(Connection.CompressionPolicy.optional.toString()); }
protected String getEncryptionCipherSuitesCommaSeparated() { final String propertyName = type.getPrefix() + "ciphersuites"; final String defaultValue = ""; if ( type.getFallback() == null ) { return JiveGlobals.getProperty( propertyName, defaultValue ); } else { return JiveGlobals.getProperty( propertyName, getConnectionListener( type.getFallback() ).getEncryptionCipherSuitesCommaSeparated() ); } }
public LdapAuthorizationPolicy() { // Convert XML based provider setup to Database based JiveGlobals.migrateProperty("ldap.authorizeField"); manager = LdapManager.getInstance(); usernameField = manager.getUsernameField(); authorizeField = JiveGlobals.getProperty("ldap.authorizeField", "k5login"); }
public ProxyConnectionManager(FileTransferManager manager) { String cacheName = "File Transfer"; connectionMap = CacheFactory.createCache(cacheName); className = JiveGlobals.getProperty("provider.transfer.proxy", "org.jivesoftware.openfire.filetransfer.proxy.DefaultProxyTransfer"); transferManager = manager; StatisticsManager.getInstance().addStatistic(proxyTransferRate, new ProxyTracker()); }
public CrowdGroupProvider() { String propertyValue = JiveGlobals.getProperty(JIVE_CROWD_GROUPS_CACHE_TTL_SECS); int ttl = (propertyValue == null || propertyValue.trim().length() == 0) ? CACHE_TTL : Integer.parseInt(propertyValue); Cache<String, ArrayList<JID>> groupMembershipCache = CacheFactory.createLocalCache(GROUP_MEMBERSHIP_CACHE_NAME); groupMembershipCache.setMaxCacheSize(-1); groupMembershipCache.setMaxLifetime(ttl * 1000); // msecs instead of sec - see Cache API Cache<JID, ArrayList<String>> userMembershipCache = CacheFactory.createLocalCache(USER_MEMBERSHIP_CACHE_NAME); userMembershipCache.setMaxCacheSize(-1); userMembershipCache.setMaxLifetime(ttl * 1000); // msecs instead of sec - see Cache API Cache<String, org.jivesoftware.openfire.crowd.jaxb.Group> groupCache = CacheFactory.createLocalCache(GROUP_CACHE_NAME); groupCache.setMaxCacheSize(-1); groupCache.setMaxLifetime(ttl * 1000); // msecs instead of sec - see Cache API }
@Override public void initialize( XMPPServer server ) { super.initialize(server); proxyServiceName = JiveGlobals.getProperty("xmpp.proxy.service", "proxy"); routingTable = server.getRoutingTable(); router = server.getPacketRouter(); connectionManager = new ProxyConnectionManager(getFileTransferManager(server)); }