Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/schmitt/local-cvs/midgard-current/workflow/fordoc/MgdPart.php
DataWorkFlow + DataflowVC -

MgdPart

MgdVCObject
   |
  +-- MgdPart

An object or object part on a given branch

 

private class MgdPart extends MgdVCObject

An object or object part on a given branch

 

Methods inherited from MgdVCObject

mgdvcobject, &realvcs, addcomment, &retrievecomments

Public Method Summary

object [unknown]

MgdPart(array &$db, [ integer $vcs ])

Construct a new MgdPart

Private Method Summary

object [unknown]

&brew(string $guid, [ integer $status, integer $vcs ])

Static method
object [unknown]

&readById(int $id, [ integer $vcs ])

Static method
object [unknown]

&readByGuid(string $guid, [ integer $vcs ])

Static method
object [unknown]

&readByPath(string $path, [ integer $vcs ])

Static method
array

&searchByStatus(int $status, [ integer $vcs ])

Static method
array

&searchNotCurrent([ integer $vcs ])

Static method
void

handleStatus()

Handle pending actions, depending on status
bool

isWritable(boolean $doNotWarn)

Checks if the MgdPart is writable by the current user.
int

writeRevision(string $revision, [ string $authorfrom, integer $author, boolean $depsUpComplete, integer $deleted ])

Write a new MgdPartRevision for this MgdPart
string

commit([ integer $author ])

Commits the revision of the Part that is currently in the DB to version control.
int

import([ integer $author ], integer $revision)

Imports the version of the Part that is currently in version control into the DB.
void

tag(string $tag)

Tag the current revision
object [unknown]

&retrieveRevision(string $revision)

Retrieve the given revision as MgdPartRevision
bool

isLockedBySelf()

Checks if the MgdPart is locked by the current script.
bool

isLocked()

Checks if the MgdPart is locked
bool

lock()

Locks the MgdPart
bool

unlock()

Unlocks the MgdPart
void

getGuid()

Returns the guid of this MgdPart
void

getPartId()

Returns the id of this MgdPart (as in the DB)
void

getBranchId()

Returns the id of the branch this MgdPart is on
void

getPath()

Returns the path of this MgdPart
void

getStatus()

Get the current status of this MgdPart as stored in the DB
bool

setStatus(int $status, [ integer $pendingAuthor ])

Set the status
array

getDepsDown()

Returns the guids of all objects that have belonged / belong to this MgdPart.
array

getDepsDownLang([ integer $lang ])

Returns the guids of all objects of language $lang that have belonged / belong to this MgdPart.
array

getCollectionsAnyRevision()

Returns the ids of all collections this MgdPart has ever belonged to.
array

getProcsAnyRevision()

Returns the ids of all WorkflowProcs that have ever affected this MgdPart.
array

getPublishedProcsAnyRevision()

Returns the ids of all WorkflowProcs that have ever affected this MgdPart.
array

getKiddies()

Return all MgdParts below this one, i.e. whose path begins with this path.
array

getKiddiesByLang(string $lang)

Return all MgdParts below this one that belong to the language specified
string

getCurrentRevision()

Returns the current revision of the MgdPart
array

listBranches()

Get branches this object is on, as string
array

&listBranchesPresent()

Get branches this objects is on and not deleted, as string
array

listRevisions()

Returns all revisions of this part on the current branch. Later revisions come before earlier ones.
string

revertToRevision(string $revision)

Reverts this part to revision $revision.
string

revertToDate(int $date)

Reverts this part to the revision at date $date
string

revertToTag(int $tag)

Reverts this part to the revision at date $date
void

writeCurrentDepsDown()

Add any new sub-parts to the list of objects that belong to this MgdPart and store them in the DB
void

updatePath(string $path, [ boolean $noupdaterevision ])

Update the path stored in the DB
void

updatePathRecursive(string $path, integer $mode)

Update the path stored in the DB, recursively
void

recomputePath()

Recompute the path for this MgdPart and update recursively
void

recomputePathSelf()

Recompute the path for this MgdPart and update recursively
void

write()

Write the MgdPart to the DB
array

&searchNewGuids(array &$guids, [ integer $vcs ])

Static method
void

_containsFakeResource( $path)

Warning: documentation is missing.
void

getPendingAuthor()

Warning: documentation is missing.

Fields inherited from MgdVCObject

$_vcs, $_mgddb, $_vc, $_nspace, $_branch

Private Field Summary

unknown

$_guid

unknown

$_revision

unknown

$_created

unknown

$_path

unknown

$_branchcond

unknown

$_deleted

string

$_table

Public Method Details

MgdPart

public object [unknown] MgdPart( array &$db, [ integer $vcs ] )

  Construct a new MgdPart

Parameter
array &$db
the new contents of the fields, name => value
integer $vcs = >>0<<
the VCSession (optional) omit if you want to use the default VCSession
Returns object [unknown] $mgdPart


Private Method Details

&brew

private object [unknown] &brew( string $guid, [ integer $status, integer $vcs ] )

  Static method
Create a new MgdPart. You can write it to the DB using write()

Parameter
string $guid
integer $status = >>0<<
(optional) the initial status (default PART_CURRENT)
integer $vcs = >>0<<
(optional) omit if you want to use the default VCSession
Returns object [unknown] $mgdPart


&readById

private object [unknown] &readById( int $id, [ integer $vcs ] )

  Static method
Construct a MgdPart from the DB by id

Parameter
int $id
integer $vcs = >>0<<
(optional) omit if you want to use the default VCSession
Returns object [unknown] $mgdPart


&readByGuid

private object [unknown] &readByGuid( string $guid, [ integer $vcs ] )

  Static method
Construct a MgdPart from the DB by guid

Parameter
string $guid
integer $vcs = >>0<<
(optional) omit if you want to use the default VCSession
Returns object [unknown] $mgdPart


&readByPath

private object [unknown] &readByPath( string $path, [ integer $vcs ] )

  Static method
Construct a MgdPart from the DB by path

Parameter
string $path
integer $vcs = >>0<<
(optional) omit if you want to use the default VCSession
Returns object [unknown] $mgdPart


&searchByStatus

private array &searchByStatus( int $status, [ integer $vcs ] )

  Static method
Get the MgdPart-Ids of all objects with status $status

Parameter
int $status
integer $vcs = >>0<<
(optional) omit if you want to use the default VCSession
Returns array $partIds


&searchNotCurrent

private array &searchNotCurrent( [ integer $vcs ] )

  Static method
Get the MgdPart-Ids of all objects with status not PART_CURRENT

Parameter
integer $vcs = >>0<<
(optional) omit if you want to use the default VCSession
Returns array $partIds


handleStatus

private void handleStatus( )

  Handle pending actions, depending on status

Returns void


isWritable

private bool isWritable( boolean $doNotWarn )

  Checks if the MgdPart is writable by the current user.

Parameter
boolean $doNotWarn
Warning: documentation is missing.
Returns bool $writable


writeRevision

private int writeRevision( string $revision, [ string $authorfrom, integer $author, boolean $depsUpComplete, integer $deleted ] )

  Write a new MgdPartRevision for this MgdPart

Parameter
string $revision
string $authorfrom = >>DB_USER,<<
(optional)
integer $author = >>0<<
(optional)
boolean $depsUpComplete = >>false<<
(optional) true if you know that the depsUp are complete, default false
integer $deleted = >>3<<
(optional) if you know that the object is deleted / not deleted: true / false
Returns int $ret

false if object is not complete, returns true and sets part to PART_MISSING_DEP if path is not meaningful


commit

private string commit( [ integer $author ] )

  Commits the revision of the Part that is currently in the DB to version control.

Parameter
integer $author = >>0<<
(optional)
Returns string $revision

the number of the new revision or false (writeRevision delayed) or MGD_MISSING_DEP (path write delayed)


import

private int import( [ integer $author ], integer $revision )

  Imports the version of the Part that is currently in version control into the DB.

Parameter
integer $author = >>0<<
import it as this revision (if you already know it)
integer $revision
Warning: documentation is missing.
Returns int $id

id of the new part


tag

private void tag( string $tag )

  Tag the current revision

Parameter
string $tag
Returns void


&retrieveRevision

private object [unknown] &retrieveRevision( string $revision )

  Retrieve the given revision as MgdPartRevision

Parameter
string $revision
Returns object [unknown] $mgdPartRevision


isLockedBySelf

private bool isLockedBySelf( )

  Checks if the MgdPart is locked by the current script.

Returns bool $isLockedBySelf


isLocked

private bool isLocked( )

  Checks if the MgdPart is locked

Returns bool $isLocked


lock

private bool lock( )

  Locks the MgdPart

Returns bool $ret

false if failed


unlock

private bool unlock( )

  Unlocks the MgdPart

Returns bool $ret

false if failed


getGuid

private void getGuid( )

  Returns the guid of this MgdPart
return string $guid

Returns void


getPartId

private void getPartId( )

  Returns the id of this MgdPart (as in the DB)
return int $partId

Returns void


getBranchId

private void getBranchId( )

  Returns the id of the branch this MgdPart is on
return int $branchId

Returns void


getPath

private void getPath( )

  Returns the path of this MgdPart
return string $path

Returns void


getStatus

private void getStatus( )

  Get the current status of this MgdPart as stored in the DB
return int $status

Returns void


setStatus

private bool setStatus( int $status, [ integer $pendingAuthor ] )

  Set the status

Parameter
int $status
integer $pendingAuthor = >>0<<
(optional)
Returns bool $ret

false if failed


getDepsDown

private array getDepsDown( )

  Returns the guids of all objects that have belonged / belong to this MgdPart.

Returns array $guids


getDepsDownLang

private array getDepsDownLang( [ integer $lang ] )

  Returns the guids of all objects of language $lang that have belonged / belong to this MgdPart.

Parameter
integer $lang = >>0<<
Returns array

guid


getCollectionsAnyRevision

private array getCollectionsAnyRevision( )

  Returns the ids of all collections this MgdPart has ever belonged to.

Returns array $collectionIds


getProcsAnyRevision

private array getProcsAnyRevision( )

  Returns the ids of all WorkflowProcs that have ever affected this MgdPart.

Returns array $wfProcIds


getPublishedProcsAnyRevision

private array getPublishedProcsAnyRevision( )

  Returns the ids of all WorkflowProcs that have ever affected this MgdPart.

Returns array $wfProcIds


getKiddies

private array getKiddies( )

  Return all MgdParts below this one, i.e. whose path begins with this path.

Returns array $parts

all MgdParts in the tree under this MgdPart


getKiddiesByLang

private array getKiddiesByLang( string $lang )

  Return all MgdParts below this one that belong to the language specified

Parameter
string $lang
Returns array $parts

all MgdParts in the tree under this MgdPart


getCurrentRevision

private string getCurrentRevision( )

  Returns the current revision of the MgdPart

Returns string $revision


listBranches

private array listBranches( )

  Get branches this object is on, as string

Returns array $branches


&listBranchesPresent

private array &listBranchesPresent( )

  Get branches this objects is on and not deleted, as string

Returns array $branches


listRevisions

private array listRevisions( )

  Returns all revisions of this part on the current branch. Later revisions come before earlier ones.

Returns array $revisions


revertToRevision

private string revertToRevision( string $revision )

  Reverts this part to revision $revision.

Parameter
string $revision
Returns string $revision

the new revision


revertToDate

private string revertToDate( int $date )

  Reverts this part to the revision at date $date

Parameter
int $date
unix timestamp
Returns string $revision

the new revision


revertToTag

private string revertToTag( int $tag )

  Reverts this part to the revision at date $date

Parameter
int $tag
unix timestamp
Returns string $revision

the new revision


writeCurrentDepsDown

private void writeCurrentDepsDown( )

  Add any new sub-parts to the list of objects that belong to this MgdPart and store them in the DB

Returns void


updatePath

private void updatePath( string $path, [ boolean $noupdaterevision ] )

  Update the path stored in the DB

Parameter
string $path
boolean $noupdaterevision = >>false<<
(optional) don't update the current MgdPartRevision, default false
Returns void


updatePathRecursive

private void updatePathRecursive( string $path, integer $mode )

  Update the path stored in the DB, recursively

Parameter
string $path
integer $mode
Warning: documentation is missing.
Returns void


recomputePath

private void recomputePath( )

  Recompute the path for this MgdPart and update recursively

Returns void


recomputePathSelf

private void recomputePathSelf( )

  Recompute the path for this MgdPart and update recursively

Returns void


write

private void write( )

  Write the MgdPart to the DB

Returns void


&searchNewGuids

private array &searchNewGuids( array &$guids, [ integer $vcs ] )

  Static method
Get the guids out of $guids that don't exist in the meta DB yet

Parameter
array &$guids
integer $vcs = >>0<<
(optional) omit if you want to use the default VCSession
Returns array $newGuids


_containsFakeResource

private void _containsFakeResource( $path )

 

Warning: documentation is missing.

Parameter
$path
Warning: documentation is missing.
Returns void


getPendingAuthor

private void getPendingAuthor( )

 

Warning: documentation is missing.

Returns void


Private Field Details

$_guid

private unknown $_guid

>><<



$_revision

private unknown $_revision

>><<



$_created

private unknown $_created

>><<



$_path

private unknown $_path

>><<



$_branchcond

private unknown $_branchcond

>><<



$_deleted

private unknown $_deleted

>><<



$_table

private string $_table

>>PART_TABLE<<




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta