|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.gouv.culture.sdx.utils.AbstractSdxObject
fr.gouv.culture.sdx.framework.FrameworkImpl
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 |
APP_CONFIG_FILENAME
The configuration file name of an application. |
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 |
public static final java.lang.String CONFIGURATION_FILE_NAME
public static final java.lang.String APP_CONFIG_FILENAME
public static final java.lang.String SUPER_USER_FILE_NAME
public static final java.lang.String SDX_DEFAULT_SECURITY_POLICY
public static final java.lang.String SDX_DEFAULT_RMI_HOST
public static final int SDX_DEFAULT_RMI_PORT
| Constructor Detail |
public FrameworkImpl()
| Method Detail |
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
enableLogging in interface org.apache.avalon.framework.logger.LogEnabledenableLogging in class AbstractSdxObjectlogger - The super.getLog().
public void contextualize(org.apache.avalon.framework.context.Context context)
throws org.apache.avalon.framework.context.ContextException
contextualize in interface org.apache.avalon.framework.context.Contextualizablecontextualize in class AbstractSdxObjectcontext - The context provided by Cocoon.
org.apache.avalon.framework.context.ContextException
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractSdxObjectconfiguration - The configuration object provided at startup by Cocoon, using the org.apache.avalon.framework.configuration.ConfigurationException
public void reconfigure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
reconfigure in interface org.apache.avalon.framework.configuration.Reconfigurableconf - Currently a null value is supported and this calls
re-initializes the Framework by calling intialize(), USE WITH CAUTION
TODO : please explain -pb
org.apache.avalon.framework.configuration.ConfigurationExceptioninitialize()
public void reconfigureApplication(java.lang.String appId)
throws SDXException
appId - The id of the application to be reconfigured
SDXException
public void reconfigureApplicationByPath(java.lang.String appPath)
throws SDXException
appPath - The path of the application to be reconfigured
SDXException
public void reconfigureApplicationById(java.lang.String appId)
throws SDXException
appId - The id of the application to be reconfigured
SDXException
public void initialize()
throws java.lang.Exception
initialize in interface org.apache.avalon.framework.activity.Initializablejava.lang.Exceptionpublic void start()
start in interface org.apache.avalon.framework.activity.Startablepublic void suspend()
suspend in interface org.apache.avalon.framework.activity.Suspendablepublic void stop()
stop in interface org.apache.avalon.framework.activity.Startablepublic void dispose()
dispose in interface org.apache.avalon.framework.activity.Disposablepublic void resume()
resume in interface org.apache.avalon.framework.activity.Suspendablepublic boolean isSelectable(java.lang.Object hint)
isSelectable in interface org.apache.avalon.framework.service.ServiceSelector
public java.lang.Object select(java.lang.Object hint)
throws org.apache.avalon.framework.service.ServiceException
select in interface org.apache.avalon.framework.service.ServiceSelectororg.apache.avalon.framework.service.ServiceExceptionpublic void release(java.lang.Object service)
release in interface org.apache.avalon.framework.service.ServiceSelectorprotected org.apache.avalon.framework.context.DefaultContext getPopulatedContext()
public void addApplication(java.lang.String appPath)
throws SDXException
appPath - The directory name for the application under the sdx installation
(example: sdxworld)
SDXException
public void removeApplication(java.lang.String appId)
throws SDXException
appId -
SDXExceptionpublic org.apache.avalon.framework.logger.Logger getLogger()
public java.util.Enumeration getApplicationIds()
public Application getApplicationById(java.lang.String id)
throws SDXException
id - The application's id.
SDXException
public Application getApplicationByPath(java.lang.String path)
throws SDXException
path - The application's path (the directory name for the application under the sdx installation, i.e. {TOMCAT_HOME}/webapps/{sdx}/{myApp}).
SDXException
public Pipeline getPipeline(java.lang.String id)
throws SDXException
id - The id of the desired query pipeline
SDXException
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
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 namelastname - The last nameemail - The emailxmlLang - A valid xml:lang attribute value
SDXExceptionpublic boolean isSuperUserSet()
public SuperuserInformation validateSuperUser(java.lang.String userid,
java.lang.String passwd)
throws SDXException
userid - passwd -
SDXException
public void toSAX(org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
toSAX in interface org.apache.excalibur.xml.sax.XMLizabletoSAX in class AbstractSdxObjecthandler - A SAX content handler to feed with events.
org.xml.sax.SAXExceptionprotected java.lang.String getClassNameSuffix()
AbstractSdxObject
getClassNameSuffix in class AbstractSdxObjectprotected boolean initToSax()
AbstractSdxObject
initToSax in class AbstractSdxObjectprotected void initVolatileObjectsToSax()
initVolatileObjectsToSax in class AbstractSdxObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||