com.flexive.shared.interfaces
Interface DivisionConfigurationEngine

All Superinterfaces:
GenericConfigurationEngine
All Known Subinterfaces:
DivisionConfigurationEngineLocal

public interface DivisionConfigurationEngine
extends GenericConfigurationEngine

Division configuration interface. Use this for division-specific operations and for direct manipulation of parameters in the division configuration, use the ConfigurationEngine for everything else.

Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Method Summary
 void createFlatStorage(java.lang.String name, com.flexive.core.flatstorage.FxFlatStorageInfo.Type storageType, java.lang.String description, int stringColumns, int textColumns, int bigIntColumns, int doubleColumns, int selectColumns)
          Create a flat storage
 void createFlatStorage(java.lang.String name, java.lang.String description, int stringColumns, int textColumns, int bigIntColumns, int doubleColumns, int selectColumns)
          Create a flat storage (creates both normal and "group" storages with the same settings).
 void exportDivision(java.lang.String localFileName)
          Export the current division to a file on the local application server
 java.lang.String getDatabaseDriverInfo()
          Get information about the used database jdbc driver (name and version)
 java.lang.String getDatabaseInfo()
          Get information about the used database (name and version)
 FxDivisionExportInfo getDivisionExportInfo(java.lang.String localFileName)
          Get information about a previously exported division
 java.util.List<com.flexive.core.flatstorage.FxFlatStorageInfo> getFlatStorageInfos()
          Get information about existing flat storages
 java.util.Set<java.lang.String> getResourceKeysMatching(java.lang.String keyMatch)
          Get all resource keys that match a given key prefix, but do not load the associated values.
 java.util.Set<java.lang.String> getResourceKeysMatching(java.lang.String keyMatch, java.lang.String valueMatch, long searchLanguage)
          Get all resource keys that match a given key and value prefix in a requested language, but do not load the associated values.
 FxString getResourceValue(java.lang.String key, long defaultLanguage)
          Get a resource FxString value or null if not set
 java.util.Map<java.lang.String,FxString> getResourceValues(java.lang.String keyPrefix, long defaultLanguage)
          Get all resource FxString values that match a given key prefix.
 java.util.Map<java.lang.String,FxString> getResourceValuesContains(java.lang.String keyMatch, long defaultLanguage)
          Get all resource FxString values that match a given key pattern.
 void importDivision(java.lang.String localFileName)
          Import the current division from a file on the local application server
 void installBinary(long binaryId, java.lang.String resourceName)
          Install a binary file contained in fxresources/binaries in the archive as a binary with the requested id.
 boolean isFlatStorageEnabled()
          Is the a flat storage engine enabled for this division?
 void patchDatabase()
          Perform a database patch if needed
 void removeFlatStorage(java.lang.String name)
          Remove a flat storage, only possible if no entries exist!
 void removeResourceValues(java.lang.String keyPrefix)
          Remove all resources whose key starts with keyPrefix
 void setResourceValue(java.lang.String key, FxString value)
          Set a resource value.
 
Methods inherited from interface com.flexive.shared.interfaces.GenericConfigurationEngine
get, get, get, getAll, getAll, getAllWithXStream, getKeys, put, put, remove, remove, removeAll, tryGet
 

Method Detail

installBinary

void installBinary(long binaryId,
                   java.lang.String resourceName)
                   throws FxApplicationException
Install a binary file contained in fxresources/binaries in the archive as a binary with the requested id. If an entry with the given id already exists it will be overwritten. This functionality is intended to be used by runone or startup scripts!

Parameters:
binaryId - requested binary id
resourceName - name of the resource file relative to fxresources/binaries
Throws:
FxApplicationException - on errors

patchDatabase

void patchDatabase()
                   throws FxApplicationException
Perform a database patch if needed

Throws:
FxApplicationException - on errors

getDatabaseInfo

java.lang.String getDatabaseInfo()
Get information about the used database (name and version)

Returns:
information about the used database (name and version)

getDatabaseDriverInfo

java.lang.String getDatabaseDriverInfo()
Get information about the used database jdbc driver (name and version)

Returns:
information about the used database jdbc driver (name and version)

isFlatStorageEnabled

boolean isFlatStorageEnabled()
Is the a flat storage engine enabled for this division?

Returns:
if a flat storage engine is enabled for this division
Since:
3.1

getFlatStorageInfos

java.util.List<com.flexive.core.flatstorage.FxFlatStorageInfo> getFlatStorageInfos()
                                                                                   throws FxApplicationException
Get information about existing flat storages

Returns:
List containing information about existing flat storages
Throws:
FxApplicationException - on errors
Since:
3.1

createFlatStorage

void createFlatStorage(java.lang.String name,
                       java.lang.String description,
                       int stringColumns,
                       int textColumns,
                       int bigIntColumns,
                       int doubleColumns,
                       int selectColumns)
                       throws FxApplicationException
Create a flat storage (creates both normal and "group" storages with the same settings).

Parameters:
name - name of the flat storage (table name)
description - flat storage description
stringColumns - number of String columns
textColumns - number of Text columns
bigIntColumns - number of BigInt columns
doubleColumns - number of Double columns
selectColumns - number of Select/Boolean columns
Throws:
FxApplicationException - on errors
Since:
3.1

createFlatStorage

void createFlatStorage(java.lang.String name,
                       com.flexive.core.flatstorage.FxFlatStorageInfo.Type storageType,
                       java.lang.String description,
                       int stringColumns,
                       int textColumns,
                       int bigIntColumns,
                       int doubleColumns,
                       int selectColumns)
                       throws FxApplicationException
Create a flat storage

Parameters:
name - name of the flat storage (table name)
storageType - storage table type (normal or group storage)
description - flat storage description
stringColumns - number of String columns
textColumns - number of Text columns
bigIntColumns - number of BigInt columns
doubleColumns - number of Double columns
selectColumns - number of Select/Boolean columns
Throws:
FxApplicationException - on errors
Since:
3.2.0

removeFlatStorage

void removeFlatStorage(java.lang.String name)
                       throws FxApplicationException
Remove a flat storage, only possible if no entries exist!

Parameters:
name - name of the flat storage
Throws:
FxApplicationException - on errors
Since:
3.1

exportDivision

void exportDivision(java.lang.String localFileName)
                    throws FxApplicationException
Export the current division to a file on the local application server

Parameters:
localFileName - name (and path) of the file on the local application server
Throws:
FxApplicationException - on errors

getDivisionExportInfo

FxDivisionExportInfo getDivisionExportInfo(java.lang.String localFileName)
                                           throws FxApplicationException
Get information about a previously exported division

Parameters:
localFileName - name (and path) of the file on the local application server
Returns:
FxDivisionExportInfo
Throws:
FxApplicationException - on errors

importDivision

void importDivision(java.lang.String localFileName)
                    throws FxApplicationException
Import the current division from a file on the local application server

Parameters:
localFileName - name (and path) of the file on the local application server
Throws:
FxApplicationException - on errors

setResourceValue

void setResourceValue(java.lang.String key,
                      FxString value)
                      throws FxApplicationException
Set a resource value. If the passed value is empty or null the entry will be removed

Parameters:
key - unique key
value - FxString value
Throws:
FxApplicationException - on errors
Since:
3.1.4

removeResourceValues

void removeResourceValues(java.lang.String keyPrefix)
                          throws FxApplicationException
Remove all resources whose key starts with keyPrefix

Parameters:
keyPrefix - requested key prefix
Throws:
FxApplicationException - on errors
Since:
3.1.4

getResourceValue

FxString getResourceValue(java.lang.String key,
                          long defaultLanguage)
                          throws FxApplicationException
Get a resource FxString value or null if not set

Parameters:
key - unique key
defaultLanguage - default language to set in the returned FxString, if not available the first found translation is the default language
Returns:
FxString value or null if not set
Throws:
FxApplicationException - on errors
Since:
3.1.4

getResourceValues

java.util.Map<java.lang.String,FxString> getResourceValues(java.lang.String keyPrefix,
                                                           long defaultLanguage)
                                                           throws FxApplicationException
Get all resource FxString values that match a given key prefix. e.g. if keys "test.1", "test.2" and "test.3" exist, a key prefix "test." will return these 3 entries

Parameters:
keyPrefix - requested key prefix
defaultLanguage - default language to set in the returned FxString, if not available the first found translation is the default language
Returns:
an ordered (in regards to keys) map containing all found keys and FxString values
Throws:
FxApplicationException - on errors
Since:
3.1.4

getResourceValuesContains

java.util.Map<java.lang.String,FxString> getResourceValuesContains(java.lang.String keyMatch,
                                                                   long defaultLanguage)
                                                                   throws FxApplicationException
Get all resource FxString values that match a given key pattern. e.g. if keys "test.cat.1", "test.cat.2" and "test.cat.3" exist, a key pattern ".cat." will return these 3 entries

Parameters:
keyMatch - requested part of the key that has to match
defaultLanguage - default language to set in the returned FxString, if not available the first found translation is the default language
Returns:
an ordered (in regards to keys) map containing all found keys and FxString values
Throws:
FxApplicationException - on errors
Since:
3.1.6

getResourceKeysMatching

java.util.Set<java.lang.String> getResourceKeysMatching(java.lang.String keyMatch)
                                                        throws FxApplicationException
Get all resource keys that match a given key prefix, but do not load the associated values.

Parameters:
keyMatch - the key prefix, or, if a wildcard ('%') is contained, the exact query string
Returns:
all resource keys that match the prefix
Throws:
FxApplicationException - on errors
Since:
3.1.6

getResourceKeysMatching

java.util.Set<java.lang.String> getResourceKeysMatching(java.lang.String keyMatch,
                                                        java.lang.String valueMatch,
                                                        long searchLanguage)
                                                        throws FxApplicationException
Get all resource keys that match a given key and value prefix in a requested language, but do not load the associated values.

Parameters:
keyMatch - the key prefix, or, if a wildcard ('%') is contained, the exact query string
valueMatch - the key prefix, or, if a wildcard ('%') is contained, the exact query string
searchLanguage - language to search values
Returns:
all resource keys that match the prefix
Throws:
FxApplicationException - on errors
Since:
3.1.6