Class Cabinet

Description

Cabinets contain other Cabinets and ByteStores, and have implementation-dependent properties.

They may manage quotas, that is, if the implementation supports quotas, each Agent may be assigned a quota of space used in the Cabinet.

Cabinets contain CabinetEntries, each of which may be a ByteStore or a Cabinet. They are known by their IDs and name, where the name is a string which does not include the implementation-dependent separationCharacter, and may represent a filename.

ByteStores and Cabinets are added to Cabinets. Cabinets are created in CabinetFactories or Cabinets, and ByteStores are created in Cabinets.

OSID Version: 2.0

Licensed under the org.osid.SidImplementationLicenseMIT.

Located in /harmoni/oki2/osid/filing/Cabinet.php (line 36)

CabinetEntry
   |
   --Cabinet
Method Summary
void add (object CabinetEntry $entry, mixed $displayName, string $displayName )
object ByteStore copyByteStore (string $displayName, mixed $oldByteStore, object ByteStore $oldByteStore )
object ByteStore createByteStore (mixed $displayName, string $displayName )
object Cabinet createCabinet (mixed $displayName, string $displayName )
object CabinetEntry getCabinetEntryByName (mixed $displayName, string $displayName )
int getUsedBytes ()
boolean isManageable ()
boolean isRootCabinet ()
void remove (mixed $entry, object CabinetEntry $entry )
Methods
add (line 132)

Add a CabinetEntry, it must be from same Manager.

  • access: public
  • throws: object FilingException An exception with one of the following messages defined in org.osid.filing.FilingException may be thrown: PERMISSION_DENIED, IO_ERROR, NAME_CONTAINS_ILLEGAL_CHARS, ITEM_ALREADY_EXISTS, UNIMPLEMENTED
void add (object CabinetEntry $entry, mixed $displayName, string $displayName )
copyByteStore (line 108)

Copy an existing ByteStore in this Cabinet by copying contents and the appropriate attributes of another ByteStore.

  • access: public
  • throws: object FilingException An exception with one of the following messages defined in org.osid.filing.FilingException may be thrown: PERMISSION_DENIED, IO_ERROR, ITEM_ALREADY_EXISTS, UNIMPLEMENTED
object ByteStore copyByteStore (string $displayName, mixed $oldByteStore, object ByteStore $oldByteStore )
  • string $displayName
  • object ByteStore $oldByteStore
createByteStore (line 58)

Create a new ByteStore and add it to this Cabinet under the given name.

The name must not include this Cabinet's separationCharacter.

  • access: public
  • throws: object FilingException An exception with one of the following messages defined in org.osid.filing.FilingException may be thrown: PERMISSION_DENIED, IO_ERROR, ITEM_ALREADY_EXISTS
object ByteStore createByteStore (mixed $displayName, string $displayName )
  • string $displayName
createCabinet (line 83)

Create a new Cabinet and add it to this Cabinet under the given name.

The name must not include this Cabinet's separationCharacter.

  • access: public
  • throws: object FilingException An exception with one of the following messages defined in org.osid.filing.FilingException may be thrown: PERMISSION_DENIED, IO_ERROR, ITEM_ALREADY_EXISTS, NAME_CONTAINS_ILLEGAL_CHARS
object Cabinet createCabinet (mixed $displayName, string $displayName )
  • string $displayName
entries (line 211)

Get an Iterator over all CabinetEntries in this Cabinet.

  • access: public
  • throws: object FilingException
getAvailableBytes (line 273)

Get number of bytes available in this Cabinet.

  • access: public
  • throws: object FilingException An exception with one of the following messages defined in org.osid.filing.FilingException may be thrown: IO_ERROR, UNIMPLEMENTED
int getAvailableBytes ()
getCabinetEntryById (line 173)

Get a CabinetEntry from a Cabinet by its ID.

  • access: public
  • throws: object FilingException An exception with one of the following messages defined in org.osid.filing.FilingException may be thrown: PERMISSION_DENIED, IO_ERROR,ITEM_DOES_NOT_EXIST
object CabinetEntry getCabinetEntryById (mixed $id, object Id $id )
getCabinetEntryByName (line 198)

Get a CabinetEntry by name. Not all CabinetEntrys have names, but if it has a name, the name is unique within a Cabinet.

  • access: public
  • throws: object FilingException An exception with one of the following messages defined in org.osid.filing.FilingException may be thrown: PERMISSION_DENIED, IO_ERROR, DELETE_FAILED, ITEM_DOES_NOT_EXIST, UNIMPLEMENTED
object CabinetEntry getCabinetEntryByName (mixed $displayName, string $displayName )
  • string $displayName
getRootCabinet (line 230)

Return the root Cabinet of this Cabinet.

  • access: public
  • throws: object FilingException An exception with one of the following messages defined in org.osid.filing.FilingException may be thrown: PERMISSION_DENIED, IO_ERROR, UNIMPLEMENTED
object Cabinet getRootCabinet ()
getUsedBytes (line 290)

Get number of bytes used in this Cabinet.

  • access: public
  • throws: object FilingException An exception with one of the following messages defined in org.osid.filing.FilingException may be thrown: IO_ERROR, UNIMPLEMENTED
int getUsedBytes ()
isManageable (line 256)

Return true if this Cabinet allows entries to be added or removed.

  • access: public
  • throws: object FilingException
boolean isManageable ()
isRootCabinet (line 243)

Return true if this Cabinet is the root Cabinet.

  • access: public
  • throws: object FilingException
boolean isRootCabinet ()
remove (line 151)

Remove a CabinetEntry. Does not destroy the CabinetEntry.

  • access: public
  • throws: object FilingException An exception with one of the following messages defined in org.osid.filing.FilingException may be thrown: PERMISSION_DENIED, IO_ERROR, UNIMPLEMENTED
void remove (mixed $entry, object CabinetEntry $entry )

Inherited Methods

Inherited From CabinetEntry

CabinetEntry::exists()
CabinetEntry::getAllModifiedTimes()
CabinetEntry::getCabinetEntryAgentId()
CabinetEntry::getCreatedTime()
CabinetEntry::getDisplayName()
CabinetEntry::getId()
CabinetEntry::getLastAccessedTime()
CabinetEntry::getLastModifiedTime()
CabinetEntry::getParent()
CabinetEntry::getProperties()
CabinetEntry::getPropertiesByType()
CabinetEntry::getPropertyTypes()
CabinetEntry::touch()
CabinetEntry::updateDisplayName()

Documentation generated on Wed, 19 Sep 2007 10:21:57 -0400 by phpDocumentor 1.3.0RC3