WriteableDocumentBundle.createEntry
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.pentaho.reporting.libraries.docbundle.WriteableDocumentBundle.createEntry(Showing top 15 results out of 315)

origin: pentaho/pentaho-reporting

public static void copyInto( final WriteableDocumentBundle targetBundle,
               final DocumentBundle sourceBundle,
               final String[] files ) throws IOException {
 copyInto( targetBundle, sourceBundle, files, false );
}
origin: pentaho/pentaho-reporting

public String writeReport( final WriteableDocumentBundle bundle, final BundleWriterState state ) throws IOException,
 BundleWriterException {
 if ( bundle == null ) {
  throw new NullPointerException();
 }
 if ( state == null ) {
  throw new NullPointerException();
 }
 final OutputStream outputStream = new BufferedOutputStream( bundle.createEntry( "settings.xml", "text/xml" ) );
 final DefaultTagDescription tagDescription = BundleWriterHandlerRegistry.getInstance().createWriterTagDescription();
 final XmlWriter writer =
   new XmlWriter( new OutputStreamWriter( outputStream, "UTF-8" ), tagDescription, "  ", "\n" );
 writer.writeXmlDeclaration( "UTF-8" );
 final AttributeList rootAttributes = new AttributeList();
 rootAttributes.addNamespaceDeclaration( "", BundleNamespaces.SETTINGS );
 writer.writeTag( BundleNamespaces.SETTINGS, "settings", rootAttributes, XmlWriterSupport.OPEN );
 writeConfiguration( state, writer );
 writeRuntimeInformation( state, writer );
 writer.writeCloseTag();
 writer.close();
 return "settings.xml";
}
origin: pentaho/pentaho-reporting

private String writeFile( final WriteableDocumentBundle bundle,
             final String contextFileName,
             final String queryName,
             final EmbeddedKettleTransformationProducer fileProducer )
 throws IOException {
 final String fileName = BundleUtilities.getUniqueName( bundle, contextFileName, queryName + "{0}.ktr" );
 if ( fileName == null ) {
  throw new IOException( "Unable to generate unique name for unified datasource. " );
 }
 OutputStream outputStream = null;
 try {
  outputStream = bundle.createEntry( fileName, "text/xml" );
  outputStream.write( fileProducer.getTransformationRaw() );
 } finally {
  if ( outputStream != null ) {
   outputStream.flush();
   outputStream.close();
  }
 }
 return fileName;
}
origin: pentaho/pentaho-reporting

 /**
  * Invoked when an action occurs.
  */
 public void actionPerformed( final ActionEvent e ) {
  final CreateBundleFileDialog dialog = new CreateBundleFileDialog( BundledResourceEditor.this );
  if ( dialog.performCreateEntry( bundle ) == false ) {
   return;
  }
  final String fileEntryName = dialog.getFileName();
  if ( StringUtils.isEmpty( fileEntryName ) ) {
   return;
  }
  try {
   final OutputStream outputStream = bundle.createEntry( fileEntryName, dialog.getMimeType() );
   outputStream.close();
   bundle.getWriteableDocumentMetaData().setEntryAttribute( fileEntryName, BundleUtilities.STICKY_FLAG, "true" );
  } catch ( IOException e1 ) {
   e1.printStackTrace();
  }
  changed = true;
  refreshBundleList();
 }
}
origin: pentaho/pentaho-reporting

final OutputStream outputStream = bundle.createEntry( fileName, "text/xml" );
final DefaultTagDescription tagDescription = createTagDescription();
final XmlWriter xmlWriter =
origin: pentaho/pentaho-reporting

final FileInputStream fin = new FileInputStream( fileName );
try {
 final OutputStream outputStream = bundle.createEntry( entryName, mimeType );
 try {
  IOUtils.getInstance().copyStreams( fin, outputStream );
origin: pentaho/pentaho-reporting

final OutputStream outStream = bundle.createEntry( targetPath, contentType );
try {
 IOUtils.getInstance().copyStreams( stream, outStream );
origin: pentaho/pentaho-reporting

  new BufferedOutputStream( bundle.createEntry( contentFileState.getFileName(), "text/xml" ) );
final DefaultTagDescription tagDescription = BundleWriterHandlerRegistry.getInstance().createWriterTagDescription();
final XmlWriter writer =
origin: pentaho/pentaho-reporting

final OutputStream outputStream = bundle.createEntry( fileName, "text/xml" );
final DefaultTagDescription tagDescription = new DefaultTagDescription();
tagDescription.setNamespaceHasCData( OpenERPModule.NAMESPACE, false );
origin: pentaho/pentaho-reporting

  new BufferedOutputStream( bundle.createEntry( contentState.getFileName(), "text/xml" ) );
final MasterReport report = state.getMasterReport();
final DataSchemaDefinition definition = report.getDataSchemaDefinition();
origin: pentaho/pentaho-reporting

final OutputStream outputStream = bundle.createEntry( fileName, "text/xml" );
final DefaultTagDescription tagDescription = createTagDescription();
final XmlWriter xmlWriter = new XmlWriter( new OutputStreamWriter( outputStream, "UTF-8" ), tagDescription, "  ",
origin: pentaho/pentaho-reporting

final OutputStream outputStream = bundle.createEntry( fileName, "text/xml" );
final DefaultTagDescription tagDescription = createTagDescription();
final XmlWriter xmlWriter =
origin: pentaho/pentaho-reporting

final OutputStream outputStream = bundle.createEntry( fileName, "text/xml" );
final DefaultTagDescription tagDescription = createTagDescription();
final XmlWriter xmlWriter =
origin: pentaho/pentaho-reporting

final OutputStream outputStream = bundle.createEntry( fileName, "text/xml" );
final DefaultTagDescription tagDescription = createTagDescription();
final XmlWriter xmlWriter = new XmlWriter( new OutputStreamWriter( outputStream, "UTF-8" ), tagDescription, "  ",
origin: pentaho/pentaho-reporting

final OutputStream outputStream = bundle.createEntry( fileName, "text/xml" );
final DefaultTagDescription tagDescription = createTagDescription();
final XmlWriter xmlWriter =
org.pentaho.reporting.libraries.docbundleWriteableDocumentBundlecreateEntry

Popular methods of WriteableDocumentBundle

  • getWriteableDocumentMetaData
  • removeEntry
  • createDirectoryEntry
  • isEmbeddedKey
  • createResourceKey
  • getBundleKey
  • getEntryAsStream
  • getEntryMimeType
  • getResourceManager
  • isEntryExists

Popular classes and methods

  • setRequestProperty (URLConnection)
    Sets the value of the specified request header field. The value will only be used by the current URL
  • getOriginalFilename (MultipartFile)
  • startActivity (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JButton (javax.swing)
  • JTextField (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)