phpDocumentor GalleryCore
Classes
[ class tree: GalleryCore ] [ index: GalleryCore ] [ all elements ]

Class: GalleryFileSystemEntity

Source Location: /modules/core/classes/GalleryFileSystemEntity.class

Class GalleryFileSystemEntity

Class Overview

A GalleryChildEntity that also has data stored in the filesystem.

This class understands how to manage data on the filesystem in parallel to the data in the persistent store.

Treat this class as abstract class, it is not registered in the factory.

Located in /modules/core/classes/GalleryFileSystemEntity.class [line 56]

GalleryPersistent
   |
   --GalleryEntity
      |
      --GalleryChildEntity
         |
         --GalleryFileSystemEntity
Author(s):
API Tags:
Abstract:  

Properties

Methods

[ Top ]
Direct descendents
Child Class Description
ThumbnailImage Representation of an image used for thumbnails of non-image items.
GalleryItem Abstract base class for all objects in the Gallery composite tree.

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From GalleryChildEntity

GalleryChildEntity::$parentId

Inherited From GalleryEntity

GalleryEntity::$creationTimestamp
GalleryEntity::$entityType
GalleryEntity::$id
GalleryEntity::$isLinkable
GalleryEntity::$linkedEntity
GalleryEntity::$linkId
GalleryEntity::$modificationTimestamp
GalleryEntity::$onLoadHandlers
GalleryEntity::$serialNumber

Inherited From GalleryPersistent

GalleryPersistent::$_persistentStatus

Inherited From GalleryChildEntity

GalleryChildEntity::create()
Create this item in our persistent store
GalleryChildEntity::createLink()
GalleryChildEntity::createRoot()
Create a root level item.
GalleryChildEntity::fetchParent()
Get the parent instance
GalleryChildEntity::getClassName()
GalleryChildEntity::getParentId()
GalleryChildEntity::move()
Move this item to a new parent
GalleryChildEntity::setParentId()

Inherited From GalleryEntity

GalleryEntity::addOnLoadHandler()
Add onLoad handler.
GalleryEntity::create()
Create a new instance of this GalleryEntity in the persistent store
GalleryEntity::createLink()
Create a new linked version of this item into a new album
GalleryEntity::delete()
Delete this GalleryEntity
GalleryEntity::detachLink()
Detach this entity from the entity it is linked to by the simple expedient of overwriting over all non-null members with the equivalent from the link target.
GalleryEntity::getClassName()
Return the case sensitive name of this entity class. This is exactly what get_class() would return in PHP5. PHP4 is case-insensitive though so we must rely on it being set in each entity. The framework uses this as an index into entity related tables.
GalleryEntity::getCreationTimestamp()
GalleryEntity::getEntityType()
GalleryEntity::getId()
GalleryEntity::getIsLinkable()
GalleryEntity::getLinkedEntity()
GalleryEntity::getLinkId()
GalleryEntity::getModificationTimestamp()
GalleryEntity::getOnLoadHandlers()
GalleryEntity::getRenderer()
GalleryEntity::getSerialNumber()
GalleryEntity::hasOnLoadHandler()
Check for an onLoad handler.
GalleryEntity::isLinked()
Return true if this entity is linked to another
GalleryEntity::itemTypeName()
Return the name of this type of item.
GalleryEntity::onLoad()
This is called after an entity is loaded by the GalleryStorage subsystem.
GalleryEntity::onSave()
This is called after an entity is saved by the GalleryStorage subsystem.
GalleryEntity::refresh()
Refresh this item from the persistent store
GalleryEntity::removeOnLoadHandler()
Remove onLoad handler.
GalleryEntity::save()
Save the changes to this GalleryEntity.
GalleryEntity::setCreationTimestamp()
GalleryEntity::setEntityType()
GalleryEntity::setId()
GalleryEntity::setIsLinkable()
GalleryEntity::setLinkedEntity()
GalleryEntity::setLinkId()
GalleryEntity::setModificationTimestamp()
GalleryEntity::setOnLoadHandlers()
GalleryEntity::setSerialNumber()

Inherited From GalleryPersistent

GalleryPersistent::GalleryPersistent()
GalleryPersistent::clearPersistentFlag()
Clear a flag.
GalleryPersistent::getClassFile()
Return the relative path to the class for this entity
GalleryPersistent::getOriginalValue()
Return the original value of the given member.
GalleryPersistent::isModified()
Have we modified any data in this class?
GalleryPersistent::resetOriginalValues()
Reset all original values to the current values in the entity (or null if so specified).
GalleryPersistent::setPersistentFlag()
Set a flag.
GalleryPersistent::testPersistentFlag()
Test a flag.

[ Top ]
Property Summary
string   $pathComponent   The path component of this item (eg. "image1"). This value, when combined with the paths of all the parent objects (say, "rootAlbum", "album01") will form the complete path to the item ("rootAlbum/album01/image1").

[ Top ]
Method Summary
GalleryStatus   create()   Create a new instance of this FileSystemEntity in the persistent store.
void   createLink()  
GalleryStatus   createRoot()   Create a new root level instance of this FileSystemEntity in the persistent store.
GalleryStatus   delete()   Delete this GalleryFileSystemEntity
array   fetchContainerPath()   Return a path for any objects contained within this one (ie, children)
array   fetchLogicalPath()   Return the logical path to this item. Note that this path is only valid as long as the entire tree is at least read locked.
array   fetchPath()   Return the full path of this item. Note that this path is only valid as long as the entire tree is at least read locked.
void   getClassName()  
void   getPathComponent()  
boolean   isContainer()   Can this item contain other file system items?
GalleryStatus   move()   Move item to a new parent
GalleryStatus   rename()   Rename this item
void   setPathComponent()  

[ Top ]
Properties
string   $pathComponent [line 72]

The path component of this item (eg. "image1"). This value, when combined with the paths of all the parent objects (say, "rootAlbum", "album01") will form the complete path to the item ("rootAlbum/album01/image1").

Information Tags:
G2:  <member-name>pathComponent</member-name>
G2:  <member>
G2:  <member-type>STRING</member-type>
G2:  <member-size>MEDIUM</member-size>
G2:  <member-external-access>READ</member-external-access>
G2:  <indexed/>
G2:  </member>

[ Top ]
Methods
create  [line 85]

  GalleryStatus create( int $parentId, string $pathComponent, [boolean $isDirectory = false]  )

Create a new instance of this FileSystemEntity in the persistent store.

Let the parent do its work, then add any initialization specific to this class.

Parameters:
int   $parentId:  the id of the parent GalleryChildEntity
string   $pathComponent:  the path component of this entity
boolean   $isDirectory:  (optional) Used for legal path component characters. Defaults to false.

API Tags:
Return:  a status code


Redefinition of:
GalleryChildEntity::create()
Create this item in our persistent store

Redefined in descendants as:

[ Top ]
createLink  [line 137]

  void createLink( $entity, $parentId  )

Parameters:
   $entity: 
   $parentId: 

API Tags:
See:  GalleryEntity::createLink


Redefinition of:
GalleryChildEntity::createLink()

Redefined in descendants as:

[ Top ]
createRoot  [line 122]

  GalleryStatus createRoot( )

Create a new root level instance of this FileSystemEntity in the persistent store.

Let the parent do its work, then add any initialization specific to this class.


API Tags:
Return:  a status code


Redefinition of:
GalleryChildEntity::createRoot()
Create a root level item.

Redefined in descendants as:

[ Top ]
delete  [line 260]

  GalleryStatus delete( )

Delete this GalleryFileSystemEntity


API Tags:
Return:  a status code


Redefinition of:
GalleryEntity::delete()
Delete this GalleryEntity

Redefined in descendants as:

[ Top ]
fetchContainerPath  [line 287]

  array fetchContainerPath( )

Return a path for any objects contained within this one (ie, children)

Subclasses should specify their container-ness by overloading isContainer()


API Tags:
Return:  GalleryStatus a status code, string a path where children can store their data files


[ Top ]
fetchLogicalPath  [line 328]

  array fetchLogicalPath( )

Return the logical path to this item. Note that this path is only valid as long as the entire tree is at least read locked.


API Tags:
Return:  GalleryStatus a status code, array path component names


Redefined in descendants as:

[ Top ]
fetchPath  [line 358]

  array fetchPath( )

Return the full path of this item. Note that this path is only valid as long as the entire tree is at least read locked.


API Tags:
Return:  a GalleryStatus status, string a path


Redefined in descendants as:

[ Top ]
getPathComponent  [line 400]

  void getPathComponent( )



[ Top ]
isContainer  [line 317]

  boolean isContainer( )

Can this item contain other file system items?



Redefined in descendants as:

[ Top ]
move  [line 191]

  GalleryStatus move( int $newParentId  )

Move item to a new parent

Parameters:
int   $newParentId:  the id of the new parent GalleryItem

API Tags:
Return:  a status code

Information Tags:
Todo:  Make sure that 'order' stuff is maintained, so that the moved items become the last in order in the new album if that album is marked as unordered

Redefinition of:
GalleryChildEntity::move()
Move this item to a new parent

Redefined in descendants as:

[ Top ]
rename  [line 161]

  GalleryStatus rename( string $newPathComponent  )

Rename this item

Parameters:
string   $newPathComponent:  the path component

API Tags:
Return:  a status code


Redefined in descendants as:

[ Top ]
setPathComponent  [line 404]

  void setPathComponent( $pathComponent  )

Parameters:
   $pathComponent: 


[ Top ]

Documentation generated on Fri, 08 Oct 2010 04:59:03 -0700 by phpDocumentor 1.3.0RC6