| Method from org.apache.cocoon.generation.StatusGenerator Detail: |
public void configure(Configuration configuration) throws ConfigurationException {
this.showLibrary = configuration.getChild("show-libraries").getValueAsBoolean(true);
}
|
public void contextualize(Context context) throws ContextException {
this.context = context;
}
|
public void dispose() {
if (this.manager != null) {
this.manager.release(this.storePersistent);
this.manager.release(this.storeJanitor);
this.storePersistent = null;
this.storeJanitor = null;
}
if (this.libDirectory != null) {
super.resolver.release(this.libDirectory);
this.libDirectory = null;
}
super.dispose();
}
|
public void generate() throws SAXException, ProcessingException {
// Start the document and set the namespace.
super.contentHandler.startDocument();
super.contentHandler.startPrefixMapping("", NAMESPACE);
super.contentHandler.startPrefixMapping(XLINK_PREFIX, XLINK_NS);
genStatus();
// End the document.
super.contentHandler.endPrefixMapping(XLINK_PREFIX);
super.contentHandler.endPrefixMapping("");
super.contentHandler.endDocument();
}
Generate the status information in XML format. |
public void service(ServiceManager manager) throws ServiceException {
super.service(manager);
if (this.manager.hasService(StoreJanitor.ROLE)) {
this.storeJanitor = (StoreJanitor) manager.lookup(StoreJanitor.ROLE);
} else {
getLogger().info("StoreJanitor is not available. Sorry, no cache statistics");
}
if (this.manager.hasService(Store.PERSISTENT_STORE)) {
this.storePersistent = (Store) this.manager.lookup(Store.PERSISTENT_STORE);
} else {
getLogger().info("Persistent Store is not available. Sorry no cache statistics about it.");
}
}
Set the current ServiceManager instance used by this
Serviceable.
Need to get statistics about cache hits |
public void setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par) throws IOException, SAXException, ProcessingException {
super.setup(resolver, objectModel, src, par);
if (this.showLibrary) {
try {
this.libDirectory = super.resolver.resolveURI("context://WEB-INF/lib");
} catch (SourceException e) {
throw SourceUtil.handle(e);
}
}
}
|