|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.gouv.culture.sdx.framework.FrameworkImpl
Core unit of SDX, loads applications, pipelines, etc. TODOJavadoc: better documentation-rbp
Field Summary | |
static java.lang.String |
ANALYZER_MGR
String representation for a key in the Properties object : framework's analyzer manager. |
static java.lang.String |
APP_CONF
String representation for a key in the Properties object : framework's applications configurations. |
static java.lang.String |
APP_CONF_PATH
String representation for a key in the Properties object : framework's applications configuration directories. |
static java.lang.String |
APP_CONFIG_FILENAME
The configuration file name of an application. |
static java.lang.String |
APP_PATH_NAME
String representation for a key in the Properties object : framework's applications names. |
static java.lang.String |
ATTRIBUTE_NAME_ENCODING
Attribute name for configuration file/also used as hashtable key |
static java.lang.String |
CONFIGURATION_FILE_NAME
The framework's configuration filename. |
static java.lang.String |
LIB_PATH
String representation for a key in the Properties object : framework's libraries. |
static java.lang.String |
RMI_HOST
String representation for a key in the Properties object : famework's RMI host. |
static java.lang.String |
RMI_PORT
String representation for a key in the Properties object : famework's RMI port. |
static java.lang.String |
SDX_APP_PATH
String representation for a key in the Properties object : framework's context directory. |
static java.lang.String |
SDX_CONF
String representation for a key in the Properties object : framework's configuration file. |
static java.lang.String |
SDX_CONF_PATH
String representation for a key in the Properties object : framework's configuration directory. |
static java.lang.String |
SDX_DEFAULT_RMI_HOST
Default RMI host |
static int |
SDX_DEFAULT_RMI_PORT
Default RMI port |
static java.lang.String |
SECURITY_POLICY
String representation for a key in the Properties object : security policy. |
Fields inherited from interface fr.gouv.culture.sdx.framework.Framework |
ATTRIBUTE_LANG, BUILD, DEFAULT_ENCODING, ROLE, SDXNamespacePrefix, SDXNamespaceURI, TOSAX, URL_ENCODING, VERSION, XMLNamespacePrefix, XMLNamespaceURI |
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 |
compose(org.apache.avalon.framework.component.ComponentManager manager)
Sets the framework ComponentManager. |
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 component, 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. |
java.lang.String |
getEncoding()
|
java.util.Locale |
getLocale()
Returns the locale for the framework |
org.apache.avalon.framework.logger.Logger |
getLogger()
Gets the framework's logger. |
Pipeline |
getPipeline(java.lang.String id)
Returns a new instance of the desired pipeline. |
java.lang.String |
getXmlLang()
Returns the xml:lang attibute value from the configuration |
boolean |
hasComponent(java.lang.Object hint)
Check to see if a Component exists for a hint, but currently has no function and only returns false. |
void |
initialize()
Initializes the framework and builds the necessary application, pipeline, and analyzer manager objects. |
boolean |
isSuperUserSet()
Indicates whether the super user info is set |
void |
reconfigure(org.apache.avalon.framework.configuration.Configuration conf)
Reconfigures the component |
void |
reconfigureApplication(java.lang.String appId)
Reconfigures and application based upon an id |
void |
release(org.apache.avalon.framework.component.Component component)
Releases the Component 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 component after it has been suspended, but currently has no function. |
org.apache.avalon.framework.component.Component |
select(java.lang.Object hint)
Select the Component 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 component, but currently has no function. |
void |
stop()
Stops the component, but currently has no function. |
void |
suspend()
Suspends the component, 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 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 SDX_CONF
public static final java.lang.String APP_PATH_NAME
public static final java.lang.String APP_CONF_PATH
public static final java.lang.String APP_CONF
public static final java.lang.String SDX_APP_PATH
public static final java.lang.String SDX_CONF_PATH
public static final java.lang.String LIB_PATH
public static final java.lang.String SECURITY_POLICY
public static final java.lang.String RMI_HOST
public static final java.lang.String RMI_PORT
public static final java.lang.String ANALYZER_MGR
public static final java.lang.String ATTRIBUTE_NAME_ENCODING
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.LogEnabled
logger
- The logger.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.Contextualizable
context
- The context provided by Cocoon.
org.apache.avalon.framework.context.ContextException
public void compose(org.apache.avalon.framework.component.ComponentManager manager) throws org.apache.avalon.framework.component.ComponentException
compose
in interface org.apache.avalon.framework.component.Composable
manager
- The ComponentManager. Provided by Cocoon.
org.apache.avalon.framework.component.ComponentException
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.Configurable
configuration
- 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.Reconfigurable
conf
- 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.ConfigurationException
initialize()
public void reconfigureApplication(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.Initializable
java.lang.Exception
public void start()
start
in interface org.apache.avalon.framework.activity.Startable
public void suspend()
suspend
in interface org.apache.avalon.framework.activity.Suspendable
public void stop()
stop
in interface org.apache.avalon.framework.activity.Startable
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
public void resume()
resume
in interface org.apache.avalon.framework.activity.Suspendable
public boolean hasComponent(java.lang.Object hint)
hasComponent
in interface org.apache.avalon.framework.component.ComponentSelector
public org.apache.avalon.framework.component.Component select(java.lang.Object hint) throws org.apache.avalon.framework.component.ComponentException
select
in interface org.apache.avalon.framework.component.ComponentSelector
org.apache.avalon.framework.component.ComponentException
public void release(org.apache.avalon.framework.component.Component component)
release
in interface org.apache.avalon.framework.component.ComponentSelector
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
-
SDXException
public 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
SDXException
public boolean isSuperUserSet()
public SuperuserInformation validateSuperUser(java.lang.String userid, java.lang.String passwd) throws SDXException
userid
- passwd
-
SDXException
public java.lang.String getXmlLang()
public java.util.Locale getLocale()
public void toSAX(org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXException, org.apache.cocoon.ProcessingException
toSAX
in interface org.apache.cocoon.xml.XMLizable
handler
- A SAX content handler to feed with events.
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
public java.lang.String getEncoding()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |