/** * 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"); }
/** * Sets the password that will be used when connecting to the SMTP * server. The default is <tt>null</tt>, or no password. * * @param password the SMTP password. */ public void setPassword(String password) { this.password = password; if (password == null) { JiveGlobals.deleteProperty("mail.smtp.password"); } else { JiveGlobals.setProperty("mail.smtp.password", password); } session = null; }
@Override public void setHostname( String fqdn ) { if ( fqdn == null || fqdn.isEmpty() ) { JiveGlobals.deleteXMLProperty( "fqdn" ); } else { JiveGlobals.setXMLProperty( "fqdn", fqdn.toLowerCase() ); } }
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 ); } }
private void initialize() throws FileNotFoundException { locateOpenfire(); if ("true".equals(JiveGlobals.getXMLProperty("setup"))) { setupMode = false; JiveGlobals.migrateProperty("xmpp.domain"); JiveGlobals.migrateProperty(Log.LOG_DEBUG_ENABLED); Log.setDebugEnabled(JiveGlobals.getBooleanProperty(Log.LOG_DEBUG_ENABLED, false)); Log.setDebugEnabled(JiveGlobals.getBooleanProperty(Log.LOG_TRACE_ENABLED, false)); if (setupMode && "true".equals(JiveGlobals.getXMLProperty("autosetup.run"))) { this.runAutoSetup(); JiveGlobals.deleteXMLProperty("autosetup"); JiveGlobals.deleteProperty("autosetup"); final String hostNameFromDatabase = JiveGlobals.getProperty("xmpp.fqdn", ""); final String hostNameFromXML = JiveGlobals.getXMLProperty("fqdn", ""); if (!hostNameFromDatabase.isEmpty() && hostNameFromXML.isEmpty()) { final String hostname; hostname = hostNameFromDatabase; JiveGlobals.setXMLProperty("fqdn", hostname); JiveGlobals.deleteProperty("xmpp.fqdn");
@Override public void initialize(XMPPServer server) { super.initialize(server); enabled = JiveGlobals.getBooleanProperty("xmpp.audit.active"); auditMessage = JiveGlobals.getBooleanProperty("xmpp.audit.message"); auditPresence = JiveGlobals.getBooleanProperty("xmpp.audit.presence"); auditIQ = JiveGlobals.getBooleanProperty("xmpp.audit.iq"); auditXPath = JiveGlobals.getBooleanProperty("xmpp.audit.xpath"); maxTotalSize = JiveGlobals.getIntProperty("xmpp.audit.totalsize", MAX_TOTAL_SIZE); maxFileSize = JiveGlobals.getIntProperty("xmpp.audit.filesize", MAX_FILE_SIZE); maxDays = JiveGlobals.getIntProperty("xmpp.audit.days", MAX_DAYS); logTimeout = JiveGlobals.getIntProperty("xmpp.audit.logtimeout", DEFAULT_LOG_TIMEOUT); logDir = JiveGlobals.getProperty("xmpp.audit.logdir", JiveGlobals.getHomeDirectory() + File.separator + "logs"); processIgnoreString(JiveGlobals.getProperty("xmpp.audit.ignore", ""));
/** * Returns true if shared secret authentication is enabled. Shared secret authentication creates an anonymous * session, but requires that the authenticating entity know a shared secret key. The client sends a digest of the * secret key, which is compared against a digest of the local shared key. * * @return true if shared secret authentication is enabled. */ public static boolean isSharedSecretAllowed() { return JiveGlobals.getBooleanProperty( "xmpp.auth.sharedSecretEnabled" ); }
/** * 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"); }
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); }
private void initialize() throws FileNotFoundException { locateOpenfire(); if ("true".equals(JiveGlobals.getXMLProperty("setup"))) { setupMode = false; JiveGlobals.migrateProperty("xmpp.domain"); JiveGlobals.migrateProperty("xmpp.fqdn"); JiveGlobals.migrateProperty(Log.LOG_DEBUG_ENABLED); Log.setDebugEnabled(JiveGlobals.getBooleanProperty(Log.LOG_DEBUG_ENABLED, false)); if (setupMode && "true".equals(JiveGlobals.getXMLProperty("autosetup.run"))) { this.runAutoSetup(); JiveGlobals.deleteXMLProperty("autosetup"); JiveGlobals.deleteProperty("autosetup");
final int processingThreads = JiveGlobals.getIntProperty(HTTP_BIND_THREADS, HTTP_BIND_THREADS_DEFAULT); if ( JiveGlobals.getBooleanProperty( "jetty.temp-file-toucher.enabled", true ) ) { tempFileToucherTask = new TempFileToucherTask( httpBindServer ); final long period = JiveGlobals.getLongProperty( "jetty.temp-file-toucher.period", JiveConstants.DAY ); TaskEngine.getInstance().schedule( tempFileToucherTask, period, period );
interval = Long.parseLong(JiveGlobals.getProperty("ofmeet.planner.check.interval", "900000")); scheduler.start(); List<String> properties = JiveGlobals.getPropertyNames(); List<String> deletes = new ArrayList<String>(); String trigger = JiveGlobals.getProperty(propertyName); String key = propertyName.substring(12); Bookmark bookmark = BookmarkManager.getBookmark(Long.parseLong(key)); JiveGlobals.deleteProperty(propertyName);
@Override public UserProvider getUserProvider( String username ) { for ( final Map.Entry<String, UserProvider> entry : providersByPrefix.entrySet() ) { final String usersProperty = JiveGlobals.getProperty( entry.getKey() + ".members.propertyName" ); if ( usersProperty != null ) { final List<String> usersInSet = JiveGlobals.getListProperty( usersProperty, Collections.<String>emptyList() ); if ( usersInSet.contains( username ) ) { return entry.getValue(); } } } return fallbackProvider; }
@Override int getMaxIdleTime() { return JiveGlobals.getIntProperty( "xmpp.server.idle", 6 * 60 * 1000 ) / 1000; } }
/** * Sets the SMTP host (e.g. mail.example.com). The default value is "localhost". * * @param host the SMTP host. */ public void setHost(String host) { this.host = host; JiveGlobals.setProperty("mail.smtp.host", host); session = null; }
public SessionManager() { super("Session Manager"); if (JiveGlobals.getBooleanProperty("xmpp.audit.active")) { streamIDFactory = new AuditStreamIDFactory(); } else { streamIDFactory = new BasicStreamIDFactory(); } localSessionManager = new LocalSessionManager(); conflictLimit = JiveGlobals.getIntProperty("xmpp.session.conflict-limit", 0); }
setMaxTotal( JiveGlobals.getIntProperty( "sms.smpp.connections.maxAmount", 1 ) ); setNumTestsPerEvictionRun( getMaxTotal() ); setMinEvictableIdleTimeMillis( JiveGlobals.getLongProperty( "sms.smpp.connections.idleMillis", 1000 * 60 * 2 ) ); if ( getMinEvictableIdleTimeMillis() > 0 )
public String getHomeDirectory() { return JiveGlobals.getHomeDirectory(); }
/** * Return all immediate children property values of a parent Jive property as a list of strings, * or an empty list if there are no children. For example, given * the properties <tt>X.Y.A</tt>, <tt>X.Y.B</tt>, <tt>X.Y.C</tt> and <tt>X.Y.C.D</tt>, then * the immediate child properties of <tt>X.Y</tt> are <tt>X.Y.A</tt>, <tt>X.Y.B</tt>, and * <tt>X.Y.C</tt> (the value of <tt>X.Y.C.D</tt> would not be returned using this method).<p> * * @param parent the name of the parent property to return the children for. * @return all child property values for the given parent. */ public static List<String> getProperties( String parent ) { return getListProperty( parent, new ArrayList<>() ); }
JiveGlobals.setProperty("update.lastCheck", String.valueOf(now)); if (now != JiveGlobals.getLongProperty("update.lastCheck", 0)) { Log.error("Error: update service check did not save correctly. " + "Stopping update service.");