Package | Class | Deprecated
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.makumba
Class MakumbaSystem

    java.lang.Object
      org.makumba.MakumbaSystem

    public class MakumbaSystem

extends Object

The makumba runtime system. Provides starter methods to obtain `Transaction` and `DataDefinition` objects

Field Summary
`static Date` | `loadingTime` The date at which makumba is loaded

Constructor Summary
`MakumbaSystem()`

Method Summary
`static Transaction` | `findDatabase()` Deprecated. This method name is misleading since it returns a connection, not a database. Use getConnectionTo(getDefaultDatabaseName()) instead
`static Date` | `getBuildDate()` Returns build date (as recorded during building)
`static Map<String,int[]>` | `getCacheInfo()` Get information about the makumba cache sizes.
`static org.makumba.forms.html.CalendarEditorProvider` | `getCalendarProvider()` Get the default calendar editor.
`static org.makumba.forms.validation.ClientsideValidationProvider` | `getClientsideValidationProvider()` Get the default client-side validation provider.
`static Transaction` | `getConnectionTo(String name)` Deprecated. use `TransactionProvider.getConnectionTo(String)` instead
`static Transaction` | `getDatabase(String connectionFile)` Deprecated. This method name is misleading since it returns a connection, not a database. Use getConnectionTo(connectionFile) instead
`static DataDefinition` | `getDataDefinition(String typeName)` Deprecated. Use `DataDefinitionProvider.getDataDefinition(String)` instead
`static String` | `getDefaultDatabaseName()` Deprecated. Use `#getDefaultDataSourceName()` instead
`static String` | `getHibernateVersionNumber()` Returns the hibernate version used, read from the MANIFEST file of the jar containing the class file for `Hibernate`.
`static Locale` | `getLocale()` Returns the makumba system locale
`static Logger` | `getLogger()` Return a logger for use by an application.
`static Logger` | `getLogger(String suffix)` Return a logger for use by an application.
`static Logger` | `getMakumbaLogger(String suffix)` Get a logger for logging during makumba operations.
`static DataDefinition` | `getTemporaryDataDefinition(String name)` Deprecated.
`static TimeZone` | `getTimeZone()` Returns the timezone in which makumba should read/display dates from/to users, configurable by the system variable makumba.displayTimeZone
`static String` | `getVersion()` Returns a Makumba version (derived from a CVS tag)
`static org.makumba.commons.WikiFormatter` | `getWikiFormatter()`
`static FieldDefinition` | `makeFieldDefinition(String name, String definition)` Deprecated.
`static FieldDefinition` | `makeFieldOfType(String name, String type)` Deprecated.
`static FieldDefinition` | `makeFieldOfType(String name, String type, String description)` Deprecated.
`static FieldDefinition` | `makeFieldWithName(String name, FieldDefinition type)` Deprecated.
`static FieldDefinition` | `makeFieldWithName(String name, FieldDefinition type, String description)` Deprecated.
`static Vector<String>` | `mddsInDirectory(String dirInClasspath)` Discover mdds in a directory in classpath.
`static void` | `setLoggingRoot(String root)` Change the makumba logging root in this classloader.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### loadingTime

    public static final Date loadingTime

  The date at which makumba is loaded

Constructor Detail

### MakumbaSystem

    public MakumbaSystem()

Method Detail

### getCacheInfo

    public static Map<String,int[]> getCacheInfo()

  Get information about the makumba cache sizes.

  Returns:
    a `Map` with cache categories as keys and cache sizes as values
  Since:
    makumba-0.5.5.13

### getDefaultDatabaseName

    public static String getDefaultDatabaseName()

  Deprecated. Use `#getDefaultDataSourceName()` instead

  The name of the default database according to the lookup file "Makumba.conf"

  Since:
    makumba-0.5.4

### getConnectionTo

    @Deprecated
    public static Transaction getConnectionTo(String name)

  Deprecated. use `TransactionProvider.getConnectionTo(String)` instead

  Get a connection to the database described in the .properties file with the given name.

  Parameters:
    `name` - the database name, the same as the db description file but without ".properties". for example "localhost_mysql_databasename". The file should be in CLASSPATH. The operations carried out during database initialization are logged (see `Logger`, `setLoggingRoot(java.lang.String)`) in the `"db.init"` and `"db.init.tablechecking"` loggers, with `Level.INFO` (connections, checkings), `Level.SEVERE` (fatal errors) and with `Level.WARNING` logging levels.
  Since:
    makumba-0.5.4

### findDatabase

    public static Transaction findDatabase()

  Deprecated. This method name is misleading since it returns a connection, not a database. Use getConnectionTo(getDefaultDatabaseName()) instead

  Get a connection to the default database found according to Makumba.conf

  Since:
    makumba-0.5

### getDatabase

    public static Transaction getDatabase(String connectionFile)

  Deprecated. This method name is misleading since it returns a connection, not a database. Use getConnectionTo(connectionFile) instead

  Get the Database defined by the given connection file from the CLASSPATH. The file name should not include the .properties extension

  Since:
    makumba-0.5

### getDataDefinition

    @Deprecated
    public static DataDefinition getDataDefinition(String typeName)

  Deprecated. Use `DataDefinitionProvider.getDataDefinition(String)` instead

  Get the DataDefinition defined by the given type. The type a.b.C will generate a lookup for the file CLASSPATH/a/b/C.mdd and then for CLASSPATH/dataDefinitions/a/b/C.mdd

### getTemporaryDataDefinition

    @Deprecated
    public static DataDefinition getTemporaryDataDefinition(String name)

  Deprecated.

### makeFieldDefinition

    @Deprecated
    public static FieldDefinition makeFieldDefinition(String name,
                                                                 String definition)

  Deprecated.

  Make a field definition from the indicated string

### makeFieldOfType

    @Deprecated
    public static FieldDefinition makeFieldOfType(String name,
                                                             String type)

  Deprecated.

  Make a field definition with the elementary type

### makeFieldWithName

    @Deprecated
    public static FieldDefinition makeFieldWithName(String name,
                                                               FieldDefinition type)

  Deprecated.

  Make a field definition identical with the given one, except for the name

### makeFieldOfType

    @Deprecated
    public static FieldDefinition makeFieldOfType(String name,
                                                             String type,
                                                             String description)

  Deprecated.

  Make a field definition with the elementary type

### makeFieldWithName

    @Deprecated
    public static FieldDefinition makeFieldWithName(String name,
                                                               FieldDefinition type,
                                                               String description)

  Deprecated.

  Make a field definition identical with the given one, except for the name

### getVersion

    public static String getVersion()

  Returns a Makumba version (derived from a CVS tag)

### getBuildDate

    public static Date getBuildDate()

  Returns build date (as recorded during building)

### getMakumbaLogger

    public static Logger getMakumbaLogger(String suffix)

  Get a logger for logging during makumba operations. See `Logger`, `setLoggingRoot(java.lang.String)`. This method is mostly used by makumba code. From application code, use `getLogger(java.lang.String)` or `getLogger()`.

  The table below describes when makumba logging occurs and at what logging `Level` (note also that `Level.SEVERE` and `Level.WARNING` logging is done in makumba when fatal errors or warnings occur).

  The logging levels below tell the programmer how to configure logging so that some parts of the makumba logging become visible. For example, details on database update performance are not normally visible on the log, since they are at `Level.FINE` logging level, and `Level.INFO` is default. To view them, one needs to add the following line in `logging.properties`(see `LogManager` for explanations of logger configuration)

  > `org.makumba.update.performance.level=FINE`

  The programmer could just as well decide that all makumba logging at or over the level FINE should be visible, except for the one on taglib performance:

  > `org.makumba.level=FINE`
  > `org.makumba.taglib.performance.level=INFO`

  Operation | Log name | Logging details | Logging level
  application operations | loggingRoot + `apps`+ the parameter to `getLogger(java.lang.String)` | logging level used by applications that call `getLogger(java.lang.String)` and `getLogger()` | any, as required by the application
  database opening | loggingRoot + `db.init`, `db.init.tablechecking` | see `getConnectionTo(java.lang.String)` | `Level.INFO`
  connection pooling | loggingRoot + `util.pool` | infomrmation on the size of the database connection pool | `Level.FINE`
  database administration | loggingRoot + `db.admin.copy`, `db.admin.delete` | see `copy._copy(java.lang.String, java.lang.String, java.lang.String[], boolean)`, `HtmlTableImporter._delete(java.lang.String, java.lang.String, java.lang.String[], boolean)` | `Level.INFO`
  database querying | loggingRoot + `db.query.compilation`, `db.query.execution`, `db.query.performance` | see `Transaction.executeQuery(java.lang.String, java.lang.Object)`, `Transaction.read(org.makumba.Pointer, java.lang.Object)` | `Level.FINE`
  database query grouping | loggingRoot + `db.query.grouping` | grouping used during simulated left joins, e.g. in executing embedded <mak:list> JSP tags | `Level.FINE`
  taglib performace | loggingRoot + `taglib.performance` | performance info needed to fine-tune <mak:list> and other makumba JSP tags | `Level.FINE`
  database updating | loggingRoot + `db.update.execution`, `db.update.performance` | see `Transaction`, all insert, delete, and update operations | `Level.FINE`
  business logic discovery | loggingRoot + `controller` | The steps taken when finding business logic classes | `Level.INFO`
  errors during business logic calls | loggingRoot + `controller.logicError` | Runtime (probably involuntary) errors produced by the business logic programmer | `Level.INFO`
  swaping of large content to disk | loggingRoot + `util.longContent` | tells when large content in `Text` or large content produced by a mak:list tag are swapped to disk | `Level.FINE`

  Since:
    makumba-0.5.5.3

### getLogger

    public static Logger getLogger(String suffix)

  Return a logger for use by an application.

  Returns:
    the logging root + "apps" + the indicated suffix
  Since:
    makumba-0.5.5.3
  See Also:
    `setLoggingRoot(java.lang.String)`

### getLogger

    public static Logger getLogger()

  Return a logger for use by an application.

  Returns:
    the logging root plus "apps"
  Since:
    makumba-0.5.5.3
  See Also:
    `setLoggingRoot(java.lang.String)`

### setLoggingRoot

    public static void setLoggingRoot(String root)

  Change the makumba logging root in this classloader. The default logging root is `"org.makumba"` so loggers would look like `org.makumba.db.init.tableckecking`

  Since:
    makumba-0.5.5.3

### getTimeZone

    public static TimeZone getTimeZone()

  Returns the timezone in which makumba should read/display dates from/to users, configurable by the system variable makumba.displayTimeZone

### getWikiFormatter

    public static org.makumba.commons.WikiFormatter getWikiFormatter()

  Returns:
    the system's default wiki formatter.

### getLocale

    public static Locale getLocale()

  Returns the makumba system locale

### mddsInDirectory

    public static Vector<String> mddsInDirectory(String dirInClasspath)

  Discover mdds in a directory in classpath.

  Returns:
    filenames as Vector of Strings.

### getCalendarProvider

    public static org.makumba.forms.html.CalendarEditorProvider getCalendarProvider()

  Get the default calendar editor. FIXME: read this from some config, or so.

### getClientsideValidationProvider

    public static org.makumba.forms.validation.ClientsideValidationProvider getClientsideValidationProvider()

  Get the default client-side validation provider.

### getHibernateVersionNumber

    public static String getHibernateVersionNumber()

  Returns the hibernate version used, read from the MANIFEST file of the jar containing the class file for `Hibernate`.

Package | Class | Deprecated
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Docs generated on 2009-02-25 14:20