Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.collab
Class CollaborationManager

    java.lang.Object
      com.compoze.collab.CollaborationManager

    public class CollaborationManager

extends Object

Maintains a registry of API providers and related information.
Default `Locale`s can be set for the API using this class. By default, the value of `Locale.getDefault()` is used unless there is no translation available for this locale, in which case `Locale.US` is used.

Method Summary
`void` | `addDefaultLogListener(ILogListener listener)` Adds a log listener that is used by default on every session on which the log listeners have not been changed.
`Map` | `getAllCapabilities()` Gets all of the capabilities defined that a provider can choose to support.
`String` | `getAllProvidersString()` Gets all of the providers in the provider registry as a comma separated list.
`static Locale` | `getDefaultAdminLocale()` Gets the default `Locale` for administrators.
`LogLevel` | `getDefaultLogLevel()` Gets the default log level.
`static Locale` | `getDefaultProgrammerLocale()` Gets the default `Locale` for programmers.
`static Locale` | `getDefaultUserLocale()` Gets the default `Locale` for users.
`Locale[]` | `getLocales()` Gets the list of locales that API translations are available for.
`IProvider` | `getProvider(String sInternalName)` Gets a provider by its internal name.
`IProvider[]` | `getProviders()` Gets all of the providers.
`IProvider[]` | `getProviders(Locale locale)` Gets all of the providers that have translations for the specified locale.
`IProvider[]` | `getProviders(String sSchema)` Gets all of the providers that support the specified schema.
`Schema` | `getSchema(String sInternalName)` Gets a schema by its internal name.
`Schema[]` | `getSchemas()` Gets all of the schemas.
`static CollaborationManager` | `i()` Gets the singleton instance of this class.
`static void` | `main(String[] args)` Main.
`boolean` | `removeDefaultLogListener(ILogListener listener)` Removes a log listener from every session.
`void` | `setDefaultAdminLocale(Locale locale)` Sets the default `Locale` for administrators.
`void` | `setDefaultLogLevel(LogLevel level)` Sets the log level that is used by all sessions that use the default log level.
`void` | `setDefaultProgrammerLocale(Locale locale)` Sets the default `Locale` for programmers.
`void` | `setDefaultUserLocale(Locale locale)` Sets the default `Locale` for users.

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

Method Detail

### setDefaultLogLevel

    public void setDefaultLogLevel(LogLevel level)

  Sets the log level that is used by all sessions that use the default log level. Sessions use the default log level until `Logger.setLogLevel(LogLevel)` is called on the logger on the session.

  Parameters
    `level` - the default log level (not `null`)
  See Also
    `Logger.setDefaultLogLevel(LogLevel)`

### getDefaultLogLevel

    public LogLevel getDefaultLogLevel()

  Gets the default log level.

  Returns
    the default log level (not `null`)
  See Also
    `Logger.getDefaultLogLevel()`

### addDefaultLogListener

    public void addDefaultLogListener(ILogListener listener)

  Adds a log listener that is used by default on every session on which the log listeners have not been changed.

  Parameters
    `listener` - the listener to add (not `null`)

### removeDefaultLogListener

    public boolean removeDefaultLogListener(ILogListener listener)

  Removes a log listener from every session.

  Parameters
    `listener` - the listener to remove
  Returns
    `true` if the listener was removed, or `false` if it did not exist in the list

### setDefaultUserLocale

    public void setDefaultUserLocale(Locale locale)
                              throws CollaborationException

  Sets the default `Locale` for users. When a new `Session` is instantiated and no `Locale` is supplied for the user, this is the one that is used.

  Parameters
    `locale` - the default user locale (if `null`, then the `Locale.US` (US/English) locale is used)
  Throws
    `CollaborationException` - if there is no API translation available for the supplied locale (use `getLocales()` to get a list of available locales for the API)

### getDefaultUserLocale

    public static Locale getDefaultUserLocale()

  Gets the default `Locale` for users.

  Returns
    the user locale (never `null`)

### setDefaultAdminLocale

    public void setDefaultAdminLocale(Locale locale)
                               throws CollaborationException

  Sets the default `Locale` for administrators. When a new `Session` is instantiated and no `Locale` is supplied for the administrator, this is the one that is used.

  Parameters
    `locale` - the default admin locale (if `null`, then the `Locale.US` (US/English) locale is used)
  Throws
    `CollaborationException` - if there is no API translation available for the supplied locale (use `getLocales()` to get a list of available locales for the API)

### getDefaultAdminLocale

    public static Locale getDefaultAdminLocale()

  Gets the default `Locale` for administrators.

  Returns
    the admin locale (never `null`)

### setDefaultProgrammerLocale

    public void setDefaultProgrammerLocale(Locale locale)
                                    throws CollaborationException

  Sets the default `Locale` for programmers. When a new `Session` is instantiated and no `Locale` is supplied for the programmer, this is the one that is used.

  Parameters
    `locale` - the default programmer locale (if `null`, then the `Locale.US` (US/English) locale is used)
  Throws
    `CollaborationException` - if there is no API translation available for the supplied locale (use `getLocales()` to get a list of available locales for the API)

### getDefaultProgrammerLocale

    public static Locale getDefaultProgrammerLocale()

  Gets the default `Locale` for programmers.

  Returns
    the programmer locale (never `null`)

### getSchemas

    public Schema[] getSchemas()

  Gets all of the schemas.

  Returns
    a copy of the registered schemas (not `null`)

### getSchema

    public Schema getSchema(String sInternalName)

  Gets a schema by its internal name.

  Parameters
    `sInternalName` - the schema internal name
  Returns
    the schema, or `null` if no schema with the given name is registered

### getProviders

    public IProvider[] getProviders()

  Gets all of the providers.

  Returns
    a copy of the registered providers (not `null`)

### getProviders

    public IProvider[] getProviders(Locale locale)

  Gets all of the providers that have translations for the specified locale.

  Returns
    a copy of the matching providers (not `null`)

### getProviders

    public IProvider[] getProviders(String sSchema)

  Gets all of the providers that support the specified schema.

  Parameters
    `sSchema` - the internal name of the desired schema support (not `null`)
  Returns
    a copy of the matching providers (not `null`)

### getAllProvidersString

    public String getAllProvidersString()

  Gets all of the providers in the provider registry as a comma separated list.

  Returns
    a comma separated list of all of the internal names of the providers

### getProvider

    public IProvider getProvider(String sInternalName)

  Gets a provider by its internal name.

  Parameters
    `sInternalName` - the provider internal name
  Returns
    the provider, or `null` if no provider with the given name is registered

### i

    public static CollaborationManager i()
                                  throws CollaborationException

  Gets the singleton instance of this class.

  Returns
    the singleton instance
  Throws
    `CollaborationException`

### getLocales

    public Locale[] getLocales()

  Gets the list of locales that API translations are available for.

  Returns
    an array of the available `Locale`s (not `null`)

### getAllCapabilities

    public Map getAllCapabilities()

  Gets all of the capabilities defined that a provider can choose to support.

  Returns
    the capabilities

### main

    public static void main(String[] args)
                     throws Throwable

  Main.

  Parameters
    `args` - command line arguments
  Throws
    `Throwable`

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

Copyright © 2006 BEA Systems, Inc. All Rights Reserved