本文整理汇总了Java中org.eclipse.birt.report.model.api.ModuleHandle.saveAs方法的典型用法代码示例。如果您正苦于以下问题:Java ModuleHandle.saveAs方法的具体用法?Java ModuleHandle.saveAs怎么用?Java ModuleHandle.saveAs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.birt.report.model.api.ModuleHandle
的用法示例。
在下文中一共展示了ModuleHandle.saveAs方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeLibrary
import org.eclipse.birt.report.model.api.ModuleHandle; //导入方法依赖的package包/类
/**
* Creates a new library with the specified file name.
*
* @param fileName
* the library's file name.
* @param templateName
* the library template's file name.
* @throws DesignFileException
* If the library template is not found, or it contains fatal
* errors.
* @throws SemanticException
* if the value of a property is incorrect.
* @throws IOException
* if the file cannot be saved.
*/
private void makeLibrary( final String fileName, String templateName )
throws DesignFileException, SemanticException, IOException
{
ModuleHandle handle = SessionHandleAdapter.getInstance( )
.getSessionHandle( )
.createLibraryFromTemplate( templateName );
if ( ReportPlugin.getDefault( ).getEnableCommentPreference( ) )
{
handle.setStringProperty( ModuleHandle.COMMENTS_PROP,
ReportPlugin.getDefault( ).getCommentPreference( ) );
}
if ( inPredifinedTemplateFolder( templateName ) )
{
String description = handle.getDescription( );
if ( description != null && description.trim( ).length( ) > 0 )
{
handle.setDescription( Messages.getString( description ) );
}
}
handle.saveAs( fileName );
handle.close( );
}
示例2: save
import org.eclipse.birt.report.model.api.ModuleHandle; //导入方法依赖的package包/类
protected void save( ModuleHandle moduleHandle, String path )
throws IOException
{
moduleHandle.saveAs( path );
}
示例3: saveAs
import org.eclipse.birt.report.model.api.ModuleHandle; //导入方法依赖的package包/类
/**
* Eventually, this method will call
* {@link ReportDesignHandle#saveAs(String)}to save the output file of some
* unit test. The output test file will be saved in the folder of 'output'
* under the folder where the unit test java source file locates, so before
* calling {@link ReportDesignHandle#saveAs(String)}, the file name will be
* modified to include the path information. For example, in a unit test
* class, it can call saveAs( "PropertyCommandTest.out" ).
*
* @param moduleHandle
* the module to save, either a report design or a library
* @param filename
* the test output file to be saved.
* @throws IOException
* if error occurs while saving the file.
*/
protected void saveAs(ModuleHandle moduleHandle, String filename)
throws IOException {
if (moduleHandle == null)
return;
// makeOutputDir( );
moduleHandle.saveAs(this.genOutputFile(filename));
}