com.azalient.api.file
Interface BookW

All Superinterfaces:
BookR

public interface BookW
extends BookR

A handle to a "workbook" that can be written to file. A book is a top level object within a file. Each book contains several pages of type PageW. The write action will happen just before the close, when all users have disconnected.


Method Summary
 void clearPage(PageW page)
          Clear the given page
 int closeW()
          Disconnect from the book, and force it to close, regardless of any reference count.
 boolean deletePage(PageType type, String pagename)
          Delete the page of given type and name from the workbook.
 void deletePages(IPage[] pages)
          Delete the given pages - for example a results chapter
 BookF formatter()
          get a handle to a formatter
 void legacyTableHeader(boolean b)
          Write the table header without column count and key count
 PageW page(PageType pageType, String pageName, String baseName)
          Get a handle to a page, creating it if it does not exist
 void relinquishMayWrite()
          Relinquish a reference count, and file write if count becomes zero
 void renamePage(PageType type, String oldName, String newName)
          Rename the given page in the book
 void retainPages(IPage[] pages)
          Keep only the given pages
 void write(PageW page, TableW table)
          Force the table to be written from row 0 on the given page
 boolean write(TableW table)
          Write a single table to its own page, return true if successful.
 boolean write(TableW[] tables)
          Write an array of tables, in the given order on the given page, return true if successful.
 void writeBinary(String fileName, byte[] data)
          Write the given binary block of data to the workbook, using the given fileName as the internal filename for the block in the zip file.
 
Methods inherited from interface com.azalient.api.file.BookR
binaryNames, closeR, fileName, hasTypeRow, isConnected, page, pageExists, pages, read, read, read, readBinary, relinquishR, report, tableBounds, tableExists, tableExists, tableNames
 

Method Detail

page

PageW page(PageType pageType,
           String pageName,
           String baseName)
Get a handle to a page, creating it if it does not exist


clearPage

void clearPage(PageW page)
Clear the given page


write

boolean write(TableW table)
Write a single table to its own page, return true if successful.


write

boolean write(TableW[] tables)
Write an array of tables, in the given order on the given page, return true if successful.


closeW

int closeW()
Disconnect from the book, and force it to close, regardless of any reference count. Return the reference count so that it can be reinstated


formatter

BookF formatter()
get a handle to a formatter


deletePage

boolean deletePage(PageType type,
                   String pagename)
Delete the page of given type and name from the workbook.

Returns:
true if the page is found and deleted successfully, false otherwise

writeBinary

void writeBinary(String fileName,
                 byte[] data)
Write the given binary block of data to the workbook, using the given fileName as the internal filename for the block in the zip file.


renamePage

void renamePage(PageType type,
                String oldName,
                String newName)
Rename the given page in the book


relinquishMayWrite

void relinquishMayWrite()
Relinquish a reference count, and file write if count becomes zero


write

void write(PageW page,
           TableW table)
Force the table to be written from row 0 on the given page


retainPages

void retainPages(IPage[] pages)
Keep only the given pages


deletePages

void deletePages(IPage[] pages)
Delete the given pages - for example a results chapter


legacyTableHeader

void legacyTableHeader(boolean b)
Write the table header without column count and key count