/** * Returns the location of the <code>home</code> directory. * * @return the location of the home dir. */ public static String getHomeDirectory() { if (openfireProperties == null) { loadOpenfireProperties(); } return home; }
/** * Return all property names as a list of strings, or an empty list if jiveHome has not been loaded. * * @return all child property for the given parent. */ public static List<String> getXMLPropertyNames() { if (openfireProperties == null) { loadOpenfireProperties(); } return openfireProperties.getAllPropertyNames(); }
/** * Deletes a locale property. If the property doesn't exist, the method * does nothing. * * @param name the name of the property to delete. */ public static void deleteXMLProperty(String name) { if (openfireProperties == null) { loadOpenfireProperties(); } openfireProperties.deleteProperty(name); }
/** * Returns a local property. Local properties are stored in the file defined in * <tt>JIVE_CONFIG_FILENAME</tt> that exists in the <tt>home</tt> directory. * Properties are always specified as "foo.bar.prop", which would map to * the following entry in the XML file: * <pre> * <foo> * <bar> * <prop>some value</prop> * </bar> * </foo> * </pre> * * @param name the name of the property to return. * @return the property value specified by name. */ public static String getXMLProperty(String name) { if (openfireProperties == null) { loadOpenfireProperties(); } return openfireProperties.getProperty(name); }
/** * Sets multiple local properties at once. If a property doesn't already exists, a new * one will be created. Local properties are stored in the file defined in * <tt>JIVE_CONFIG_FILENAME</tt> that exists in the <tt>home</tt> directory. * Properties are always specified as "foo.bar.prop", which would map to * the following entry in the XML file: * <pre> * <foo> * <bar> * <prop>some value</prop> * </bar> * </foo> * </pre> * * @param propertyMap a map of properties, keyed on property name. */ public static void setXMLProperties(Map<String, String> propertyMap) { if (openfireProperties == null) { loadOpenfireProperties(); } openfireProperties.setProperties(propertyMap); }
/** * Returns a local property. Local properties are stored in the file defined in * <tt>JIVE_CONFIG_FILENAME</tt> that exists in the <tt>home</tt> directory. * Properties are always specified as "foo.bar.prop", which would map to * the following entry in the XML file: * <pre> * <foo> * <bar> * <prop>some value</prop> * </bar> * </foo> * </pre> * * If the specified property can't be found, the <tt>defaultValue</tt> will be returned. * * @param name the name of the property to return. * @param defaultValue the default value for the property. * @return the property value specified by name. */ public static String getXMLProperty(String name, String defaultValue) { if (openfireProperties == null) { loadOpenfireProperties(); } String value = openfireProperties.getProperty(name); if (value == null) { value = defaultValue; } return value; }
/** * Sets a local property. If the property doesn't already exists, a new * one will be created. Local properties are stored in the file defined in * <tt>JIVE_CONFIG_FILENAME</tt> that exists in the <tt>home</tt> directory. * Properties are always specified as "foo.bar.prop", which would map to * the following entry in the XML file: * <pre> * <foo> * <bar> * <prop>some value</prop> * </bar> * </foo> * </pre> * * @param name the name of the property being set. * @param value the value of the property being set. * @return {@code true} if the property was correctly saved to file, otherwise {@code false} */ public static boolean setXMLProperty(String name, String value) { if (openfireProperties == null) { loadOpenfireProperties(); } return openfireProperties.setProperty(name, value); }
/** * Convenience routine to migrate an XML property into the database * storage method. Will check for the XML property being null before * migrating. * * @param name the name of the property to migrate. */ public static void migrateProperty(String name) { if (isSetupMode()) { return; } if (openfireProperties == null) { loadOpenfireProperties(); } openfireProperties.migrateProperty(name); }
/** * Convenience routine to migrate a tree of XML propertis into the database * storage method. * * @param name the name of the base property to migrate. */ public static void migratePropertyTree(String name) { if (isSetupMode()) { return; } if (openfireProperties == null) { loadOpenfireProperties(); } final String[] children = openfireProperties.getChildrenProperties( name ); if ( children != null ) { for ( final String child : children ) { migratePropertyTree( name + "." + child ); } } openfireProperties.migrateProperty(name); }
static void clearXMLPropertyEncryptionEntry(String name) { if (isSetupMode()) { return; } if (securityProperties == null) { loadSecurityProperties(); } if (openfireProperties == null) { loadOpenfireProperties(); } // Note; only remove the encryption indicator from XML file if the (encrypted) property is not also defined in the XML file if (JiveGlobals.isXMLPropertyEncrypted(name) && openfireProperties.getProperty(name) == null) { securityProperties.removeFromList(ENCRYPTED_PROPERTY_NAMES, name); } }
/** * Returns the location of the <code>home</code> directory. * * @return the location of the home dir. */ public static String getHomeDirectory() { if (openfireProperties == null) { loadOpenfireProperties(); } return home; }
/** * Return all property names as a list of strings, or an empty list if jiveHome has not been loaded. * * @return all child property for the given parent. */ public static List<String> getXMLPropertyNames() { if (openfireProperties == null) { loadOpenfireProperties(); } return openfireProperties.getAllPropertyNames(); }
/** * Deletes a locale property. If the property doesn't exist, the method * does nothing. * * @param name the name of the property to delete. */ public static void deleteXMLProperty(String name) { if (openfireProperties == null) { loadOpenfireProperties(); } openfireProperties.deleteProperty(name); }
/** * Sets multiple local properties at once. If a property doesn't already exists, a new * one will be created. Local properties are stored in the file defined in * <tt>JIVE_CONFIG_FILENAME</tt> that exists in the <tt>home</tt> directory. * Properties are always specified as "foo.bar.prop", which would map to * the following entry in the XML file: * <pre> * <foo> * <bar> * <prop>some value</prop> * </bar> * </foo> * </pre> * * @param propertyMap a map of properties, keyed on property name. */ public static void setXMLProperties(Map<String, String> propertyMap) { if (openfireProperties == null) { loadOpenfireProperties(); } openfireProperties.setProperties(propertyMap); }
/** * Returns a local property. Local properties are stored in the file defined in * <tt>JIVE_CONFIG_FILENAME</tt> that exists in the <tt>home</tt> directory. * Properties are always specified as "foo.bar.prop", which would map to * the following entry in the XML file: * <pre> * <foo> * <bar> * <prop>some value</prop> * </bar> * </foo> * </pre> * * @param name the name of the property to return. * @return the property value specified by name. */ public static String getXMLProperty(String name) { if (openfireProperties == null) { loadOpenfireProperties(); } return openfireProperties.getProperty(name); }
/** * Sets a local property. If the property doesn't already exists, a new * one will be created. Local properties are stored in the file defined in * <tt>JIVE_CONFIG_FILENAME</tt> that exists in the <tt>home</tt> directory. * Properties are always specified as "foo.bar.prop", which would map to * the following entry in the XML file: * <pre> * <foo> * <bar> * <prop>some value</prop> * </bar> * </foo> * </pre> * * @param name the name of the property being set. * @param value the value of the property being set. */ public static void setXMLProperty(String name, String value) { if (openfireProperties == null) { loadOpenfireProperties(); } openfireProperties.setProperty(name, value); }
/** * Returns a local property. Local properties are stored in the file defined in * <tt>JIVE_CONFIG_FILENAME</tt> that exists in the <tt>home</tt> directory. * Properties are always specified as "foo.bar.prop", which would map to * the following entry in the XML file: * <pre> * <foo> * <bar> * <prop>some value</prop> * </bar> * </foo> * </pre> * * If the specified property can't be found, the <tt>defaultValue</tt> will be returned. * * @param name the name of the property to return. * @param defaultValue the default value for the property. * @return the property value specified by name. */ public static String getXMLProperty(String name, String defaultValue) { if (openfireProperties == null) { loadOpenfireProperties(); } String value = openfireProperties.getProperty(name); if (value == null) { value = defaultValue; } return value; }
/** * Convenience routine to migrate an XML property into the database * storage method. Will check for the XML property being null before * migrating. * * @param name the name of the property to migrate. */ public static void migrateProperty(String name) { if (isSetupMode()) { return; } if (openfireProperties == null) { loadOpenfireProperties(); } openfireProperties.migrateProperty(name); }
static void clearXMLPropertyEncryptionEntry(String name) { if (isSetupMode()) { return; } if (securityProperties == null) { loadSecurityProperties(); } if (openfireProperties == null) { loadOpenfireProperties(); } // Note; only remove the encryption indicator from XML file if the (encrypted) property is not also defined in the XML file if (JiveGlobals.isXMLPropertyEncrypted(name) && openfireProperties.getProperty(name) == null) { securityProperties.removeFromList(ENCRYPTED_PROPERTY_NAMES, name); } }