public class XFSetup extends Object implements Serializable
| Constructor and Description | 
|---|
XFSetup()  | 
| Modifier and Type | Method and Description | 
|---|---|
static FCMessage | 
createMandant(IEntityContext ec,
             Mandant client,
             MandantMailData mailData,
             MandantLdapData ldapData,
             Benutzer user)
Creats an client with the current  
IClientCreator and current IClientCreateData | 
static IClientCreateData | 
getDefaultMandantData()  | 
static String | 
getMacAddress()  | 
static Mandant | 
getMandantByFilterCriterion(IEntityContext ec,
                           String filterCriterion,
                           String filterValue)
Method to read an client with the given filter-criterion 
 | 
static IClientCreator | 
getMandantCreator()  | 
static Boolean | 
isDbConfigured(UserContext uc)
Checks if the database is configured and accessible 
 | 
static boolean | 
migrateProperties(File backupDir,
                 boolean isOverwrite)
Method to migrate the location and layout of old property-files to the new one 
 | 
static void | 
setCustomMandantCreator(IClientCreator customCreator)  | 
static void | 
setDefaultMandantData(IClientCreateData defaultData)  | 
static void | 
setMandantCreator(IClientCreator mandantCreator)  | 
static void | 
storeDBSettings(DBConnectionData data,
               boolean supressAllListener)
Method to store the db-settings in the correct properties-file 
 | 
static void | 
storeDBSettings(DBConnectionData data,
               boolean suppressOpenListener,
               boolean suppressCloseListener)
Method to store the db-settings in the correct properties-file 
 | 
static void | 
uploadLicense(InputStream input)
Uploads the license-file to the correct path 
 | 
public static void storeDBSettings(DBConnectionData data, boolean suppressOpenListener, boolean suppressCloseListener) throws IOException, org.apache.commons.configuration.ConfigurationException
data - DBConnectionData the data to storesuppressOpenListener - true if the entity-manager-factory open-listener should be suppressed,
 false otherwisesuppressCloseListener - true if the entity-manager-factory close-listener should be suppressed,
 false otherwiseIOException - on i/o-errorsorg.apache.commons.configuration.ConfigurationException - on errors while saving the configurationpublic static void storeDBSettings(DBConnectionData data, boolean supressAllListener) throws IOException, org.apache.commons.configuration.ConfigurationException
data - DBConnectionData the data to storesupressAllListener - true if the entity-manager-factory listeners should be suppressed,
 false otherwiseIOException - on i/o-errorsorg.apache.commons.configuration.ConfigurationException - on errors while saving the configurationpublic static void uploadLicense(InputStream input) throws IOException, FileNotFoundException, Exception
input - InputStream the source-stream of the license-fileIOException - on i/o-errorsFileNotFoundException - if the file could not be foundException - on errorspublic static Mandant getMandantByFilterCriterion(IEntityContext ec, String filterCriterion, String filterValue)
ec - IEntityContext for db-transationsfilterCriterion - String the key to filter forfilterValue - String the value to filter forMandant the found client or nullpublic static String getMacAddress() throws SocketException
SocketException - on errors while reading the mac-addresspublic static Boolean isDbConfigured(UserContext uc)
uc - UserContextBoolean if the database is accessiblepublic static FCMessage createMandant(IEntityContext ec, Mandant client, MandantMailData mailData, MandantLdapData ldapData, Benutzer user)
IClientCreator and current IClientCreateDataec - IEntityContext for database-transactionsclient - Mandant the client to createuser - Benutzer the admin-user for the clientFCMessage as result of the creationpublic static boolean migrateProperties(File backupDir, boolean isOverwrite) throws org.apache.commons.configuration.ConfigurationException
backupDir - File to backup-folder to migrate the property-files fromisOverwrite - true if existing properties should be overridden, false otherwisetrue if the migration was successful, false otherwiseorg.apache.commons.configuration.ConfigurationException - on errors while creating the configuration-filespublic static void setCustomMandantCreator(IClientCreator customCreator)
customCreator - IClientCreator the client-creator to set. null will be ignored.public static void setMandantCreator(IClientCreator mandantCreator)
mandantCreator - IClientCreator the client-creator to set. null will not be
 ignored.public static IClientCreator getMandantCreator()
IClientCreator the current client-creator. If not set, a new DefaultClientCreator-instance
 will be returned.public static IClientCreateData getDefaultMandantData()
IClientCreateData. null will be ignored. If not set, a new
 DefaultClientData-instance will be returned.public static void setDefaultMandantData(IClientCreateData defaultData)
defaultData - IClientCreateData the client-create-date to set. null will not be
 ignored.Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.