문서 스펙에서 정의된 출력은 RPEDocumentSpecification.getRuntime().getOutputs() 콜렉션에서
사용 가능합니다.
다음은 Microsoft Word를 제외하고
모든 출력을 제거하는 방법, 해당 출력에 대한 경로를 변경하는 방법 및
Microsoft Word 출력에 대한 스타일시트를 설정하는 방법을 표시하는 예입니다.
List<RPEOutput> toRemove = new ArrayList<RPEOutput>()
for ( RPEOutput output: docspec.getRuntime().getOutputs())
{
String type = PropertyUtils.getPropertyRawValue( output.getProperty( RPEConfigConstants.PROPERTY_TYPE), "");
if ( type.equals( "Word"))
{
Property path = output.getProperty( RPEConfigConstants.PROPERTY_PATH);
Property stylesheet = output.getProperty( RPEConfigConstants.PROPERTY_STYLESHEET);
assert( path != null);
assert( stylesheet != null);
path.setValue( new Value( null, "c:\\test\\output.doc"));
stylesheet.setValue( new Value( null, "c:\\test\\sample_stylesheet.dot"));
}
else
{
toRemove.add( output);
}
}
docspec.getRuntime().getOutputs().removeAll( toRemove);
참고: 문서 스펙에 템플리트를 추가할 때
템플리트로부터 변수를 구성할 수도 있습니다.