@return the content to be displayed to the user-agent
*/
public ConcreteElement getContent( RunData data ) {
CapabilityMap map = ((JetspeedRunData)data).getCapability();
String type = map.getPreferredType().toString();
ConcreteElement content = new JetspeedClearElement(INVALID_TYPE);
String stylesheet = (String)stylesheets.get(type);
if (stylesheet != null) {
content = getContent( data, map );
if ( content == null ) {
try {
content = new JetspeedClearElement(
SimpleTransform.transform( getPortletConfig().getURL(),
stylesheet,
getPortletConfig().getInitParameters() ) );
setContent( content, map );
} catch ( SAXException e ) {
Log.error( e );
content = new JetspeedClearElement(e.getMessage());
}
}
}
return content;