The OKI Filing OSID has been selected to be the primary service interface for the CC Installer application.
The Filing OSID
The Filing OSID consists of the following interfaces:
| Interface Name | Implementation Name | Status |
|---|---|---|
| Directory | ||
| DirectoryAdminSession | chsDirectoryAdminSession | Partial |
| DirectoryEntry | chsDirectoryEntry | Complete |
| DirectoryEntryLookupSession | ||
| DirectoryEntryQuery | ||
| DirectoryEntrySearch | ||
| DirectoryList | DirectoryList | Complete |
| DirectoryNotificationSession | ||
| DirectoryQuery | ||
| DirectoryReceiver | ||
| DirectorySearch | ||
| DirectorySearchResults | ||
| DirectorySearchSession | chsDirectorySearchSession | Partial |
| File | chsFile | Complete |
| FileList | chsFileList | Complete |
| FileNotificationSession | ||
| FileQuery | ||
| FileReceiver | ||
| FileSearch | ||
| FileSearchResults | ||
| FileSearchSession | chsFileSearchSession | Partial |
| FileSession | chsFileSession | Complete |
| FilingManagementSession | ||
| FilingManager | chsFilingManager | Partial |
| FilingProfile | ||
| FilingProxyManager |
In addition, the following OSIDs are used:
| Package | Interface Name | Implementation Name | Status |
|---|---|---|---|
| transport | DataInputStream | chsDataInputStream | Not the real interface. |
| transport | DataOutputStream | chsDataOutputStream | Not the real interface. |
| osid | NullArgumentException | NullArgumentException | |
| osid | PermissionDeniedException | PermissionDeniedException | |
| osid | AlreadyExistsException | AlreadyExistsException | |
| osid | OperationFailedException | OperationFailedException | |
| osid | NoAccessException | NoAccessException | |
| osid | NotFoundException | NotFoundException | |
| osid | IllegalStateException | IllegalStateException |
Implementation Strategy
Reading and writing of files largely takes place in the FileSession and DirectoryAdminSession interfaces. Said sessions are created (initiated) in the FilingManager. The following dependencies exist to implement basic file I/O:
- FilingProfile
- FilingManager
- FileSession
- OsidSession (extends)
- File
- DirectoryEntry (extends)
- Id
- Agent
- DateTime
- DirectoryEntry (extends)
- DataInputStream
- DataOutputStream
- DirectoryAdminSession
- OsidSession (extends)
- Directory
- DirectoryEntry (extends)
- Id
- Agent
- DateTime
- DirectoryEntry (extends)
- File
- DirectoryEntry (extends)
- Id
- Agent
- DateTime
- DirectoryEntry (extends)
- (many other session types)
- FileSession
The following classes need to be implemented based on the above interfaces, extensions and dependencies:
- FilingProfile
- FilingManager
- FileSession
- DirectoryAdminSession
- Directory
- File
- Id
- Agent
- DateTime
- DataInputStream
- DataOutputStream
A total of 11 classes.
Additional classes will be needed to handle directory selection (to target the CC installation).
Creating a File
- Get a DirectoryAdminSession
- Create the file in that directory.
- Get a FileSession
- Get the output stream from the session.
- Write data to the stream
- Close the stream.
Streaming Data
The way the Filing OSID is designed, a an application requests a DataOutputStream from a FileSession. However, CHS wants an InputStream to write content to it. This means that Piped I/O will be required. It's a bit tricky to visualize.