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
Framework.ConfigurationNodeSdxObject.ConfigurationNode| Modifier and Type | Field and Description |
|---|---|
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.
|
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitializedATTRIBUTE_LANG, BUILD, CLASS_NAME_SUFFIX, DEFAULT_ENCODING, ROLE, SDXNamespacePrefix, SDXNamespaceURI, TOSAX, URL_ENCODING, VERSION, XMLNamespacePrefix, XMLNamespaceURIDEFAULT_ENCODING| Constructor and Description |
|---|
FrameworkImpl() |
| Modifier and Type | Method and Description |
|---|---|
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
|
configureDescription, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, verifyConfigurationResourcespublic static final java.lang.String CONFIGURATION_FILE_NAME
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
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.ContextExceptionpublic 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.ConfigurationExceptionpublic 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 CAUTIONorg.apache.avalon.framework.configuration.ConfigurationExceptionpublic void reconfigureApplication(java.lang.String appId)
throws SDXException
appId - The id of the application to be reconfiguredSDXExceptionpublic void reconfigureApplicationByPath(java.lang.String appPath)
throws SDXException
appPath - The path of the application to be reconfiguredSDXExceptionpublic void reconfigureApplicationById(java.lang.String appId)
throws SDXException
appId - The id of the application to be reconfiguredSDXExceptionpublic 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.ServiceSelectorpublic 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)SDXExceptionpublic 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.SDXExceptionpublic 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}).SDXExceptionpublic Pipeline getPipeline(java.lang.String id) throws SDXException
id - The id of the desired query pipelineSDXExceptionpublic 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 valueSDXExceptionpublic boolean isSuperUserSet()
public SuperuserInformation validateSuperUser(java.lang.String userid, java.lang.String passwd) throws SDXException
userid - passwd - SDXExceptionpublic 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()
AbstractSdxObjectgetClassNameSuffix in class AbstractSdxObjectprotected boolean initToSax()
AbstractSdxObjectinitToSax in class AbstractSdxObjectprotected void initVolatileObjectsToSax()
initVolatileObjectsToSax in class AbstractSdxObjectCopyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.