The New Halloween Document

Primary Actor: HSSF client

Scope: HSSF

Level: Summary

Stakeholders and Interests:

  • HSSF client- wants to read content of HSSF file
  • HSSF - understands HSSF file
  • POI - understands underlying POI file system

Precondition: None

Minimal Guarantee: None

Main Success Guarantee:

  1. HSSF client requests HSSF to read a HSSF file, providing an InputStream containing HSSF file in question.
  2. HSSF requests POI to read the HSSF file, passing the InputStream object to POI (POI use case 1, read existing file system)
  3. HSSF reads the "Workbook" file (use case 4, read workbook entry)

Extensions:

2a. Exceptions thrown by POI will be passed on to the HSSF client.

Primary Actor: HSSF client

Scope: HSSF

Level: Summary

Stakeholders and Interests:

  • HSSF client- wants to write file out.
  • HSSF - knows how to write file out.
  • POI - 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 POI file system (use case 5, write workbook entry)
  3. HSSF requests POI to write its file system out, using the OutputStream obtained from the HSSF client (POI use case 2, write file system).

Extensions:

3a. Exceptions from POI are passed to the HSSF client.

Primary Actor: HSSF client

Scope: HSSF

Level: Summary

Stakeholders and Interests:

  • HSSF client- wants to create a new file.
  • HSSF - knows how to create a new file.
  • POI - knows how to creat a new file system.

Precondition:

Minimal Guarantee: None

Main Success Guarantee:

  1. HSSF requests POI to create a new file system (POI use case 3, create new file system)

Extensions: None

Primary Actor: HSSF

Scope: HSSF

Level: Summary

Stakeholders and Interests:

  • HSSF - knows how to read the workbook entry
  • POI - knows how to manage the file system.

Precondition:

  • The file system has been read (use case 1, read existing HSSF file) or has been created and written to (use case 3, create HSSF file system; use case 5, write workbook entry).

Minimal Guarantee: None

Main Success Guarantee:

  1. HSSF requests POI for the "Workbook" file
  2. POI returns an InputStream for the file.
  3. HSSF reads from the InputStream provided by POI
  4. HSSF closes the InputStream provided by POI

Extensions:

3a. Exceptions thrown by POI will be passed on

Primary Actor: HSSF

Scope: HSSF

Level: Summary

Stakeholders and Interests:

  • HSSF - knows how to manage the write the workbook entry.
  • POI - knows how to manage the file system.

Precondition:

  • Either an existing HSSF file has been read (use case 1, read existing HSSF file) or an HSSF file has been created (use case 3, create HSSF file).

Minimal Guarantee: None

Main Success Guarantee:

  1. HSSF checks the POI file system directory for the "Workbook" file (POI use case 8, read file system directory)
  2. If "Workbook" is in the directory, HSSF requests POI to replace it with the new workbook entry (POI use case 4, replace file in file system). Otherwise, HSSF requests POI to write the new workbook file, with the name "Workbook" (POI use case 6, write new file to file system)

Extensions:None