@Override
protected boolean executeAction() {
try {
TemplateMsgAction actionDefinition = (TemplateMsgAction) getActionDefinition();
String template = null;
template = actionDefinition.getTemplate().getStringValue();
if ( ( null == template ) && isDefinedResource( TemplateComponent.TEMPLATE ) ) {
IActionSequenceResource resource = getResource( "template" ); //$NON-NLS-1$
template = getResourceAsString( resource );
}
String outputName = (String) getOutputNames().iterator().next();
IActionParameter outputParam = getOutputItem( outputName );
if ( outputParam.getType().equals( IActionParameter.TYPE_CONTENT ) ) {
String mimeType = actionDefinition.getMimeType().getStringValue();
String extension = actionDefinition.getExtension().getStringValue();
// This would prevent null values being passed as parameters to getOutputItem
if ( mimeType == null ) {
mimeType = ""; //$NON-NLS-1$
}