com.compoze.collab
Interface IProvider


public interface IProvider

Provides the abstract superclass for all collaboration service providers.


Method Summary
 void addClassMapping(Key key, String sSource, ItemClass target)
          Programatically adds a class mapping to the default schema for the provider.
 String getBackendName(Locale locale)
          Gets the name of the back-end data store or collaboration system.
 String getInternalName()
          Gets an internal name for the provider (must be unique among all registered providers).
 String getLegalTrademarks(Locale locale)
          Gets the legal information regarding the provider and its terms of legal use.
 List getLocales()
          Gets the available locales for the provider.
 String getLoggerName()
          Gets the name of the logger for the provider.
 String getName(Locale locale)
          Gets a descriptive name for the provider.
 String getProviderProperty(String key)
          Get a provider configuration property.
 List getRequiredSessionProperties(Map props)
          Gets the required properties given that the specified properties have already been supplied.
 String getResourceBase()
          Gets the base name of the resource bundle.
 List getSessionProperties(Map props)
          Gets the required and optional session properties given that the specified properties have already been supplied.
 SessionProperty getSessionProperty(String sInternalName)
          Gets a session property by its internal name.
 String getVendorName(Locale locale)
          Gets the company that authored the provider.
 void setProviderProperty(String key, String value)
          Set a provider configuration property.
 boolean supportsCacheDependencies()
          Determines if this provider supports cache dependency checking.
 boolean supportsSchema(String sSchema)
          Determines if this provider supports a given schema.
 String toString()
          Creates a string representation of the provider.
 void validateSessionProperties(com.compoze.collab.spi.Context ctx, Map props)
          Validates session properties for well-formedness and throws an exception if there is a problem.
 

Method Detail

getLocales

List getLocales()
Gets the available locales for the provider.

Returns
a List of the available locales

getSessionProperty

SessionProperty getSessionProperty(String sInternalName)
Gets a session property by its internal name.

Parameters
sInternalName - the internal name
Returns
the session property, or null if no property exists with this internal name

getSessionProperties

List getSessionProperties(Map props)
                          throws CollaborationException
Gets the required and optional session properties given that the specified properties have already been supplied.

Parameters
props - the properties that have already been supplied, or null for no pre-supplied properties
Returns
the List of required and optional SessionProperty objects, or null if all properties have been supplied
Throws
CollaborationException - if some of the supplied properties were invalid

getRequiredSessionProperties

List getRequiredSessionProperties(Map props)
                                  throws CollaborationException
Gets the required properties given that the specified properties have already been supplied.

Parameters
props - the properties that have already been supplied, or null for no pre-supplied properties
Returns
the List of required SessionProperty objects in order to proceed, or null if no properties are required
Throws
CollaborationException - if some of the supplied properties were invalid

validateSessionProperties

void validateSessionProperties(com.compoze.collab.spi.Context ctx,
                               Map props)
                               throws CollaborationException
Validates session properties for well-formedness and throws an exception if there is a problem. This method checks for existence of properties then calls the provider implementation to check for well-formedness.

Parameters
ctx - the provider context
props - the properties to validate
Throws
CollaborationException - if there is a problem with the properties

getVendorName

String getVendorName(Locale locale)
Gets the company that authored the provider. Subclasses should override this implementation as the default is a string indicating that the company is not available.

Parameters
locale - the locale
Returns
the company name

getInternalName

String getInternalName()
Gets an internal name for the provider (must be unique among all registered providers). By convention, internal names should be one word made of alphanumeric lowercase characters with underbars and no spaces.

Returns
the internal name

getLegalTrademarks

String getLegalTrademarks(Locale locale)
Gets the legal information regarding the provider and its terms of legal use. Subclasses should override this implementation as the default is a string indicating that the legal trademarks are not available.

Parameters
locale - the locale

getName

String getName(Locale locale)
Gets a descriptive name for the provider. This descriptive name is not used to identify the provider in any way- it is provided for informational purposes.

Parameters
locale - the locale
Returns
the descriptive name

getBackendName

String getBackendName(Locale locale)
Gets the name of the back-end data store or collaboration system.

Parameters
locale - the locale
Returns
the back-end name

getLoggerName

String getLoggerName()
Gets the name of the logger for the provider.

Returns
the logger name

getResourceBase

String getResourceBase()
Gets the base name of the resource bundle.

Returns
the resource base name

supportsSchema

boolean supportsSchema(String sSchema)
Determines if this provider supports a given schema.

Parameters
sSchema - the internal name of the schema (not null)
Returns
true if this provider supports the specified schema

supportsCacheDependencies

boolean supportsCacheDependencies()
Determines if this provider supports cache dependency checking.

Returns
true if the provider supports cache dependency checking

toString

String toString()
Creates a string representation of the provider.

Overrides:
toString in class Object
Returns
the string representation

setProviderProperty

void setProviderProperty(String key,
                         String value)
Set a provider configuration property.

Parameters
key - property key
value - property value

getProviderProperty

String getProviderProperty(String key)
Get a provider configuration property.

Parameters
key - property key
Returns
the property value or null if the property is not set

addClassMapping

void addClassMapping(Key key,
                     String sSource,
                     ItemClass target)
Programatically adds a class mapping to the default schema for the provider.

Parameters
key - the provider key to perform the mapping
sSource - the provider specific value to map
target - the target item class (MUST have an internal name)


Copyright © 2006 BEA Systems, Inc. All Rights Reserved