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

## fr.gouv.culture.sdx.framework
Class FrameworkImpl

    java.lang.Object
      fr.gouv.culture.sdx.utils.AbstractSdxObject
          fr.gouv.culture.sdx.framework.FrameworkImpl

All Implemented Interfaces:
  org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, Describable, org.apache.avalon.framework.activity.Disposable, Encodable, Framework, Identifiable, org.apache.avalon.framework.activity.Initializable, Localizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.configuration.Reconfigurable, SdxObject, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.service.ServiceSelector, org.apache.avalon.framework.activity.Startable, org.apache.avalon.framework.activity.Suspendable, org.apache.avalon.framework.thread.ThreadSafe, org.apache.excalibur.xml.sax.XMLizable

public class FrameworkImpl
extends AbstractSdxObject
implements Framework, org.apache.avalon.framework.service.ServiceSelector, org.apache.avalon.framework.configuration.Reconfigurable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Startable, org.apache.avalon.framework.activity.Suspendable, org.apache.avalon.framework.thread.ThreadSafe

Core unit of SDX, loads applications, pipelines, etc. TODOJavadoc: better documentation-rbp

Nested Class Summary

Nested classes inherited from class fr.gouv.culture.sdx.framework.Framework
`Framework.ConfigurationNode`

Nested classes inherited from class fr.gouv.culture.sdx.utils.SdxObject
`SdxObject.ConfigurationNode`

Field Summary
`static java.lang.String` | `CONFIGURATION_FILE_NAME` The framework's configuration filename.
`static java.lang.String` | `SDX_DEFAULT_RMI_HOST` Default RMI host
`static int` | `SDX_DEFAULT_RMI_PORT` Default RMI port
`static java.lang.String` | `SDX_DEFAULT_SECURITY_POLICY` Default RMI policy file
`static java.lang.String` | `SUPER_USER_FILE_NAME` The file name in which is stored the super-user's info.

Fields inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
`_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized`

Fields inherited from interface fr.gouv.culture.sdx.framework.Framework
`ATTRIBUTE_LANG, BUILD, CLASS_NAME_SUFFIX, DEFAULT_ENCODING, ROLE, SDXNamespacePrefix, SDXNamespaceURI, TOSAX, URL_ENCODING, VERSION, XMLNamespacePrefix, XMLNamespaceURI`

Fields inherited from interface fr.gouv.culture.sdx.utils.Encodable
`DEFAULT_ENCODING`

Constructor Summary
`FrameworkImpl()`

Method Summary
`void` | `addApplication(java.lang.String appPath)` Add's an application based upon a path (ie. directory name) containing the application's configuration file, etc.
`void` | `configure(org.apache.avalon.framework.configuration.Configuration configuration)` Configures the framework.
`void` | `contextualize(org.apache.avalon.framework.context.Context context)` Contextualize this class.
`void` | `dispose()` Disposes the service, but currently has no function.
`void` | `enableLogging(org.apache.avalon.framework.logger.Logger logger)` Sets the logger for this framework
`Application` | `getApplicationById(java.lang.String id)` Gets an application identified by its id.
`Application` | `getApplicationByPath(java.lang.String path)` Gets an application identified by its path.
`java.util.Enumeration` | `getApplicationIds()` Returns an Enumeration on the ids of the applications owned by this framework.
`protected java.lang.String` | `getClassNameSuffix()` Sub classes should element this method to return their class name suffix for SAX output
`org.apache.avalon.framework.logger.Logger` | `getLogger()` Gets the framework's super.getLog().
`Pipeline` | `getPipeline(java.lang.String id)` Returns a new instance of the desired pipeline.
`protected org.apache.avalon.framework.context.DefaultContext` | `getPopulatedContext()`
`void` | `initialize()` Initializes the framework and builds the necessary application, pipeline, and analyzer manager objects.
`protected boolean` | `initToSax()` Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML
`protected void` | `initVolatileObjectsToSax()` Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML Some objects need to be refresh each time a toSAX is called
`boolean` | `isSelectable(java.lang.Object hint)` Check to see if a Service exists for a hint, but currently has no function and only returns false.
`boolean` | `isSuperUserSet()` Indicates whether the super user info is set
`void` | `reconfigure(org.apache.avalon.framework.configuration.Configuration conf)` Reconfigures the service
`void` | `reconfigureApplication(java.lang.String appId)` Reconfigures an application.
`void` | `reconfigureApplicationById(java.lang.String appId)` Reconfigures an application based upon its id
`void` | `reconfigureApplicationByPath(java.lang.String appPath)` Reconfigures an application based upon its path
`void` | `release(java.lang.Object service)` Releases the Service when we are finished with it.
`void` | `removeApplication(java.lang.String appId)` Removes and application from the framework based upon an id
`void` | `resume()` Resumes the service after it has been suspended, but currently has no function.
`java.lang.Object` | `select(java.lang.Object hint)` Select the Service associated with the given hint, but currently has no function and only returns null.
`void` | `setSuperUser(java.lang.String initialUserId, java.lang.String initialPasswd, java.lang.String newUserId, java.lang.String newPasswd, java.lang.String firstname, java.lang.String lastname, java.lang.String email, java.lang.String xmlLang)` Set's the super user information
`void` | `start()` Starts the service, but currently has no function.
`void` | `stop()` Stops the service, but currently has no function.
`void` | `suspend()` Suspends the service, but currently has no function.
`void` | `toSAX(org.xml.sax.ContentHandler handler)` Could send an XML representation of something, but currently has no function.
`SuperuserInformation` | `validateSuperUser(java.lang.String userid, java.lang.String passwd)` Validates the super user based on the provided and password

Methods inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
`configureDescription, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, verifyConfigurationResources`

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

Field Detail

### CONFIGURATION_FILE_NAME

    public static final java.lang.String CONFIGURATION_FILE_NAME

  The framework's configuration filename.

  See Also:
    Constant Field Values

### SUPER_USER_FILE_NAME

    public static final java.lang.String SUPER_USER_FILE_NAME

  The file name in which is stored the super-user's info.

  See Also:
    Constant Field Values

### SDX_DEFAULT_SECURITY_POLICY

    public static final java.lang.String SDX_DEFAULT_SECURITY_POLICY

  Default RMI policy file

  See Also:
    Constant Field Values

### SDX_DEFAULT_RMI_HOST

    public static final java.lang.String SDX_DEFAULT_RMI_HOST

  Default RMI host

  See Also:
    Constant Field Values

### SDX_DEFAULT_RMI_PORT

    public static final int SDX_DEFAULT_RMI_PORT

  Default RMI port

  See Also:
    Constant Field Values

Constructor Detail

### FrameworkImpl

    public FrameworkImpl()

Method Detail

### enableLogging

    public void enableLogging(org.apache.avalon.framework.logger.Logger logger)

  Sets the logger for this framework

  Specified by:
    `enableLogging` in interface `org.apache.avalon.framework.logger.LogEnabled`
  Overrides:
    `enableLogging` in class `AbstractSdxObject`
  Parameters:
    `logger` - The super.getLog().

### contextualize

    public void contextualize(org.apache.avalon.framework.context.Context context)
                       throws org.apache.avalon.framework.context.ContextException

  Contextualize this class.

  Specified by:
    `contextualize` in interface `org.apache.avalon.framework.context.Contextualizable`
  Overrides:
    `contextualize` in class `AbstractSdxObject`
  Parameters:
    `context` - The context provided by Cocoon.
  Throws:
    `org.apache.avalon.framework.context.ContextException`

### configure

    public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
                   throws org.apache.avalon.framework.configuration.ConfigurationException

  Configures the framework.

  Specified by:
    `configure` in interface `org.apache.avalon.framework.configuration.Configurable`
  Overrides:
    `configure` in class `AbstractSdxObject`
  Parameters:
    `configuration` - The configuration object provided at startup by Cocoon, using the element in cocoon.xconf.
  Throws:
    `org.apache.avalon.framework.configuration.ConfigurationException`

### reconfigure

    public void reconfigure(org.apache.avalon.framework.configuration.Configuration conf)
                     throws org.apache.avalon.framework.configuration.ConfigurationException

  Reconfigures the service

  Specified by:
    `reconfigure` in interface `org.apache.avalon.framework.configuration.Reconfigurable`
  Parameters:
    `conf` - Currently a `null` value is supported and this calls re-initializes the Framework by calling intialize(), USE WITH CAUTION
  Throws:
    `org.apache.avalon.framework.configuration.ConfigurationException`

### reconfigureApplication

    public void reconfigureApplication(java.lang.String appId)
                                throws SDXException

  Reconfigures an application. Default method is to use the application id.

  Parameters:
    `appId` - The id of the application to be reconfigured
  Throws:
    `SDXException`

### reconfigureApplicationByPath

    public void reconfigureApplicationByPath(java.lang.String appPath)
                                      throws SDXException

  Reconfigures an application based upon its path

  Parameters:
    `appPath` - The path of the application to be reconfigured
  Throws:
    `SDXException`

### reconfigureApplicationById

    public void reconfigureApplicationById(java.lang.String appId)
                                    throws SDXException

  Reconfigures an application based upon its id

  Parameters:
    `appId` - The id of the application to be reconfigured
  Throws:
    `SDXException`

### initialize

    public void initialize()
                    throws java.lang.Exception

  Initializes the framework and builds the necessary application, pipeline, and analyzer manager objects.

  Specified by:
    `initialize` in interface `org.apache.avalon.framework.activity.Initializable`
  Throws:
    `java.lang.Exception`

### start

    public void start()

  Starts the service, but currently has no function.

  Specified by:
    `start` in interface `org.apache.avalon.framework.activity.Startable`

### suspend

    public void suspend()

  Suspends the service, but currently has no function.

  Specified by:
    `suspend` in interface `org.apache.avalon.framework.activity.Suspendable`

### stop

    public void stop()

  Stops the service, but currently has no function.

  Specified by:
    `stop` in interface `org.apache.avalon.framework.activity.Startable`

### dispose

    public void dispose()

  Disposes the service, but currently has no function.

  Specified by:
    `dispose` in interface `org.apache.avalon.framework.activity.Disposable`

### resume

    public void resume()

  Resumes the service after it has been suspended, but currently has no function.

  Specified by:
    `resume` in interface `org.apache.avalon.framework.activity.Suspendable`

### isSelectable

    public boolean isSelectable(java.lang.Object hint)

  Check to see if a Service exists for a hint, but currently has no function and only returns false.

  Specified by:
    `isSelectable` in interface `org.apache.avalon.framework.service.ServiceSelector`

### select

    public java.lang.Object select(java.lang.Object hint)
                            throws org.apache.avalon.framework.service.ServiceException

  Select the Service associated with the given hint, but currently has no function and only returns null.

  Specified by:
    `select` in interface `org.apache.avalon.framework.service.ServiceSelector`
  Throws:
    `org.apache.avalon.framework.service.ServiceException`

### release

    public void release(java.lang.Object service)

  Releases the Service when we are finished with it.

  Specified by:
    `release` in interface `org.apache.avalon.framework.service.ServiceSelector`

### getPopulatedContext

    protected org.apache.avalon.framework.context.DefaultContext getPopulatedContext()

### addApplication

    public void addApplication(java.lang.String appPath)
                        throws SDXException

  Add's an application based upon a path (ie. directory name) containing the application's configuration file, etc.

  Parameters:
    `appPath` - The directory name for the application under the sdx installation (example: sdxworld)
  Throws:
    `SDXException`

### removeApplication

    public void removeApplication(java.lang.String appId)
                           throws SDXException

  Removes and application from the framework based upon an id

  Parameters:
    `appId` -
  Throws:
    `SDXException`

### getLogger

    public org.apache.avalon.framework.logger.Logger getLogger()

  Gets the framework's super.getLog().

  Returns:
    The super.getLog().

### getApplicationIds

    public java.util.Enumeration getApplicationIds()

  Returns an Enumeration on the ids of the applications owned by this framework.

### getApplicationById

    public Application getApplicationById(java.lang.String id)
                                   throws SDXException

  Gets an application identified by its id.

  Parameters:
    `id` - The application's id.
  Returns:
    The application object.
  Throws:
    `SDXException`

### getApplicationByPath

    public Application getApplicationByPath(java.lang.String path)
                                     throws SDXException

  Gets an application identified by its path.

  Parameters:
    `path` - The application's path (the directory name for the application under the sdx installation, i.e. {TOMCAT_HOME}/webapps/{sdx}/{myApp}).
  Returns:
    The application object.
  Throws:
    `SDXException`

### getPipeline

    public Pipeline getPipeline(java.lang.String id)
                         throws SDXException

  Returns a new instance of the desired pipeline.

  Parameters:
    `id` - The id of the desired query pipeline
  Returns:
    Pipeline
  Throws:
    `SDXException`

### setSuperUser

    public void setSuperUser(java.lang.String initialUserId,
                             java.lang.String initialPasswd,
                             java.lang.String newUserId,
                             java.lang.String newPasswd,
                             java.lang.String firstname,
                             java.lang.String lastname,
                             java.lang.String email,
                             java.lang.String xmlLang)
                      throws SDXException

  Set's the super user information

  Parameters:
    `initialUserId` - The user id, `null` should be passed at initial set-up.
    `initialPasswd` - The existing super user password , `null` should be passed at initial set-up.
    `newUserId` - The new user id.
    `newPasswd` - The new password.
    `firstname` - The first name
    `lastname` - The last name
    `email` - The email
    `xmlLang` - A valid xml:lang attribute value
  Throws:
    `SDXException`

### isSuperUserSet

    public boolean isSuperUserSet()

  Indicates whether the super user info is set

### validateSuperUser

    public SuperuserInformation validateSuperUser(java.lang.String userid,
                                                  java.lang.String passwd)
                                           throws SDXException

  Validates the super user based on the provided and password

  Parameters:
    `userid` -
    `passwd` -
  Returns:
    The SuperuserInformation object
  Throws:
    `SDXException`

### toSAX

    public void toSAX(org.xml.sax.ContentHandler handler)
               throws org.xml.sax.SAXException

  Could send an XML representation of something, but currently has no function.

  Specified by:
    `toSAX` in interface `org.apache.excalibur.xml.sax.XMLizable`
  Overrides:
    `toSAX` in class `AbstractSdxObject`
  Parameters:
    `handler` - A SAX content handler to feed with events.
  Throws:
    `org.xml.sax.SAXException`

### getClassNameSuffix

    protected java.lang.String getClassNameSuffix()

  Description copied from class: `AbstractSdxObject`
  Sub classes should element this method to return their class name suffix for SAX output

  Specified by:
    `getClassNameSuffix` in class `AbstractSdxObject`

### initToSax

    protected boolean initToSax()

  Description copied from class: `AbstractSdxObject`
  Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML

  Specified by:
    `initToSax` in class `AbstractSdxObject`

### initVolatileObjectsToSax

    protected void initVolatileObjectsToSax()

  Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML Some objects need to be refresh each time a toSAX is called

  Specified by:
    `initVolatileObjectsToSax` in class `AbstractSdxObject`

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

Copyright © 2000-2007 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.