Use Case
Use Case
by Marc Johnson
Page 1
Copyright 2002-2011 The Apache Software Foundation All rights reserved.
Level: Summary Stakeholders and Interests: HSSF client- wants to write file out. HSSF - knows how to write file out. POIFS - knows how to write file system out. Precondition: File has been read (use case 1, read existing HSSF file) and subsequently modified or file has been created (use case 3, create HSSF file) Minimal Guarantee: None Main Success Guarantee: 1. HSSF client provides an OutputStream to write the file to. 2. HSSF writes the "Workbook" to its associated POIFS file system (use case 5, write workbook entry) 3. HSSF requests POIFS to write its file system out, using the OutputStream obtained from the HSSF client (POIFS use case 2, write file system). Extensions: 3a. Exceptions from POIFS are passed to the HSSF client.
Page 2
Copyright 2002-2011 The Apache Software Foundation All rights reserved.
Extensions: None
Minimal Guarantee: None Main Success Guarantee: 1. HSSF checks the POIFS file system directory for the "Workbook" file (POIFS use case 8, read file system directory) 2. If "Workbook" is in the directory, HSSF requests POIFS to replace it with the new workbook entry (POIFS use case 4, replace file in file system). Otherwise, HSSF requests POIFS to write the new workbook file, with the name "Workbook" (POIFS use case 6, write new file to file system) Extensions:None
Page 4
Copyright 2002-2011 The Apache Software Foundation All rights reserved.