String text = localize( foreignContent, design.getTextKey( ), design.getText( ) ); String textType = design.getTextType( );
String text = null; HashMap rawValues = null; if ( foreignContent.getRawValue( ) instanceof Object[] ) { Object[] rawValue = (Object[]) foreignContent.getRawValue( ); assert rawValue.length == 2; assert rawValue[0] == null || rawValue[0] instanceof String; if ( rawValue[0] != null ) { text = (String )rawValue[0]; } if ( rawValue[1] instanceof HashMap ) { rawValues = (HashMap)rawValue[1]; } }
	protected void processTemplateContent( IForeignContent foreignContent )	{		assert IForeignContent.TEMPLATE_TYPE.equals( foreignContent				.getRawType( ) );		if ( foreignContent.getGenerateBy( ) instanceof TextItemDesign )		{			TextItemDesign design = (TextItemDesign) foreignContent					.getGenerateBy( );			String text = localize( foreignContent, design.getTextKey( ),					design.getText( ) );			String textType = design.getTextType( );			TextTemplate template = parseTemplate( text );			HashMap values = new HashMap( );			if ( foreignContent.getRawValue( ) instanceof HashMap )			{				values = (HashMap) foreignContent.getRawValue( );			}			String result = executeTemplate( template, values );			String rawType = ForeignContent.getTextRawType( textType, result );			assert IForeignContent.HTML_TYPE.equals( rawType );			foreignContent.setRawType( IForeignContent.HTML_TYPE );			foreignContent.setRawValue( result );		}	}