Maxscape::TreeAdmin Package

Synopsis

use Maxscape::TreeAdmin;

Description

The Maxscape::TreeAdmin package implements a web interface to the content database. It is an offspring of the Maxscape::PageAdmin package.

List of Member Functions

  1. addElementTemplate
  2. additionalPageMenu
  3. addPage
  4. addPageFieldMemberFunctionName
  5. addRootCategory
  6. adminPages
  7. backupPage
  8. changeElementByPath
  9. checkNodeName
  10. checkNodeNameDocumentCallback
  11. copyNodeByNumber
  12. copyNodeByPath
  13. copyPage
  14. currentTreeNode
  15. deletePage
  16. deletePageByPagePath
  17. displayedMenueURL
  18. displayedPageURL
  19. displayPath
  20. displayPathElement
  21. DocumentCallback
  22. editDatabaseFile
  23. editElementContentField
  24. editElementPage
  25. editPage
  26. editPageFieldMemberFunctionName
  27. editPageGroup
  28. editPageNODE_CATEGORY
  29. editPageTablePage
  30. editPageWriteGroups
  31. execFormInContext
  32. HTTPD_ServerUserProcessDir
  33. lockPage
  34. lockPage
  35. MessageToUser
  36. movePage
  37. new
  38. NodePath
  39. PageDateWidget
  40. selectElement
  41. selectPage
  42. setPageStatus
  43. setupMemberPageTree
  44. showPage
  45. StartDepth
  46. submitBarActions
  47. traversePage
  48. traversePageOutputFunction
  49. traversePageTree
  50. TreeRootNode

Member Functions

DocumentCallback

Synopsis

$TreeAdmin->DocumentCallback ($Context);

Description

Callback to select the wanted page. The DocumentCallback is called before the page is fetched from the content database. This allows to change the CGI variables and the context of the page generation process. The page path (Category and Page CGI variables) is redirected to the page that serves the requested action.

new

Synopsis

my $TreeAdmin = Maxscape::TreeAdmin->new (%P);

Description

Creates a new 'Maxscape::TreeAdmin' object.

Examples

my $TreeAdmin = Maxscape::TreeAdmin->new (
                  Page         => $Page,
                  displayPath  => 1,
                  # DocumentRoot => $Page->{User}->UserHomeCategory,
                  # MH-info: Category root path within the table.
                  # showNoRootPath         => $Page->{Data}{showNoTableRootPath},
                  ModuleRoot   => $ModuleRoot,
                  lockPageMode => $Page->{Data}{lockPageMode},
                  CategoryEditPermission => 'no',
                  showStatusIcon         => 'no',
                  fixHeightEstimationCalibration => 18,
);

adminPages

Synopsis

my $Text = $TreeAdmin->adminPages ();

Description

Main method to manage the page tree. All module service functions are called within this method.

Examples

my $TreeAdmin = Maxscape::TreeAdmin->new (%P);
my $Text = $TreeAdmin->adminPages();

execFormInContext

Synopsis

my $Error = $TreeAdmin->execFormInContext ();

Description

Returns context data to a $TreeAdmin form as hidden input fields.

Examples




HTTPD_ServerUserProcessDir

Synopsis

my $HTTPD_ServerUserProcessDir = $TreeAdmin->HTTPD_ServerUserProcessDir ($Page);

Description

Returns the process directory of a registered unser.

traversePage

Synopsis

my $TreeText = $TreeAdmin->traversePage ($Page);

Description

Traverses thought the node tree of the content database.

traversePageOutputFunction

Synopsis

my $NodeLine = $TreeAdmin->traversePageOutputFunction ($Page, $Table, $Page);

Description

The function is used to render a table record. It is ment to be passed to the new method of a $Table object. Returns a record of the page tree.

Examples

my $Table = Maxscape::Page::Table->new (
     ...
     RecordFormatFunctionName => 'Maxscape::TreeAdmin::traversePageOutputFunction',
     ...
);

traversePageTree

Synopsis

my $PageTreeText = $TreeAdmin->traversePageTree ();

Description

This function is mainly a copy of the traversePage method.

Examples

Returns a page tree.

displayPath

Synopsis

my $PageTreePath = $TreeAdmin->displayPath ($NODE_CATEGORY, $currentCategory,
                                            $StartDepth);

Description

Returns a clickable path to the current category.

displayPathElement

Synopsis

my $PathElement = $TreeAdmin->displayPathElement ($NODE_CATEGORY, $currentCategory,
                                                  $StartDepth);

Description

Returns a page path element.

Examples




NodePath

Synopsis

my $NodePath = $TreeAdmin->NodePath ($Page);

Description

Returns the path with clickable path elements to the current node.

submitBarActions

Synopsis

my $submitBar = $TreeAdmin->submitBarActions ($Page, $ActionsToPrint);

Description

Creates a submit bar from the actions defined by the page and returns it.

setupMemberPageTree

Synopsis

my $Error = $TreeAdmin->setupMemberPageTree ( %P );

Description

Setup member page tree. Copies the pages of the user 'Template-Manager' to a newly registered user.

Examples




TreeRootNode

Synopsis

my ($CategoryRoot, $currentCategory, $Basename) = $self->TreeRootNode (
                                       $CGI->QueryParameter ('NODE_CATEGORY'));

Description

Returns the path data of the current root node.

currentTreeNode

Synopsis

my ($CategoryRoot, $currentCategory, $Basename) = $self->currentTreeNode (
                                       $CGI->QueryParameter ('NODE_CATEGORY'));

Description

Returns the path data of the current root node.

StartDepth

Synopsis

my $StartDepth = $TreeAdmin->StartDepth ();

Description

Returns the start depth of the DocumentRoot.

selectPage

Synopsis

my $PathElement = $TreeAdmin->selectPage ($Page);

Description

Returns a page tree as an HTML table.

editPageWriteGroups

Synopsis

$TreeAdmin->editPageWriteGroups (%P);

Description

Callback for the pages write group (NODE_WRITE_GROUPS).

editPageGroup

Synopsis

$TreeAdmin->editPageGroup (%P);

Description

Callback for the pages group (NODE_GROUP).

addPageFieldMemberFunctionName

Synopsis

$TreeAdmin->addPageFieldMemberFunctionName (%P);

Description

Callback to add a page.

addPage

Synopsis

my $Text = $TreeAdmin->addPage (%P);

Description

Add a page or page element to the page tree.

editPageTablePage

Synopsis

my $Text = $TreeAdmin->editPageTablePage ($Page);

Description

Calls the editPage method.

editPage

Synopsis

my $Text = $TreeAdmin->editPage ($Page);

Description

Edit a page.

checkNodeName

Synopsis

my $Text = $TreeAdmin->checkNodeName ($Name);

Description

Checks a node name.

checkNodeNameDocumentCallback

Synopsis

my $Error = Maxscape::TreeAdmin::checkNodeNameDocumentCallback($Name);

Description

Checks a node name.

editPageNODE_CATEGORY

Synopsis

my $Text = $TreeAdmin->editPageNODE_CATEGORY ($Name);

Description

Callback for a pages category.

addRootCategory

Synopsis

my $Text = $TreeAdmin->addRootCategory (%P);

Description

Method called by the $Table callback function.

editPageFieldMemberFunctionName

Synopsis

my $Text = $TreeAdmin->editPageFieldMemberFunctionName (%P);

Description

Callback for the $Table object.

PageDateWidget

Synopsis

my $Text = $TreeAdmin->PageDateWidget (\%P);

Description

Returns the time as string.

MessageToUser

Synopsis

my $Text = $TreeAdmin->MessageToUser (%P);

Description

Returns a message to the user.

lockPage

Synopsis

my $Text = $TreeAdmin->lockPage ($PageNumber, $UserId);

Description

Locks the currently edited page.

lockPage

Synopsis

my $Text = $TreeAdmin->unlockPage ($PageNumber);

Description

Unlocks the currently edited page.

editElementPage

Synopsis

my $Text = $TreeAdmin->editElementPage ($Page);

Description

Edit an element page.

editElementContentField

Synopsis

my $ContentForm = $TreeAdmin->editElementContentField (\%P);

Description

Edit an elements content.

editDatabaseFile

Synopsis

my $ContentForm = $TreeAdmin->editDatabaseFile (\%P);

Description

Edit a page of type DatabaseFile.

addElementTemplate

Synopsis

my $Text = $TreeAdmin->addElementTemplate ($ElementTable, $PageTable);

Description

Add an ElementTemplate.

additionalPageMenu

Synopsis

my $additionalEntries = $TreeAdmin->additionalPageMenu ($CGI, $hidden);

Description

Adds additional entries to the page menu.

deletePage

Synopsis

my $TreePageText = $TreeAdmin->deletePage ($Page);

Description

Deletes a page.

deletePageByPagePath

Synopsis

my $ErrorText = $TreeAdmin->deletePageByPagePath (%P);

Description

Deletes a page by its path.

selectElement

Synopsis

my $ErrorText = $TreeAdmin->selectElement ($Page, $TableName);

Description

Return a page to select an element.

copyPage

Synopsis

my $ErrorText = $TreeAdmin->copyPage ($Page);

Description

Copies a page.

movePage

Synopsis

my $ErrorText = $TreeAdmin->movePage ();

Description

Moves a page.

displayedPageURL

Synopsis

my $PageURL = $TreeAdmin->displayedPageURL ($Page);

Description

Displayes a pages URL. Method takes a page object, not a TreeAdmin object. used in the TreeAdmin frame page to supply the URL of the page to be displayed.

displayedMenueURL

Synopsis

my $PageURL = $TreeAdmin->displayedMenueURL ();

Description

Displayes a pages URL. Method takes a page object, not a TreeAdmin object. used in the TreeAdmin frame page to supply the URL of the page to be displayed.

showPage

Synopsis

my $Page = $TreeAdmin->showPage ($Page);

Description

Displayes a page.

copyNodeByNumber

Synopsis

$ErrorText = $TreeAdmin->copyNodeByNumber ( %P );

Description

Copies a node.

Examples

my $TemplateCategory         = '/User/Home/T';
my $TemplatePage             = 'Template-Manager';

my $NodeRef                  = $Context->QueryNodeByPath($TemplateCategory, $TemplatePage, $self->{Cursor});
my $SourceNodeNumber         = ${$NodeRef}{NODE_NUMBER};
my $SourceNodeType           = ${$NodeRef}{NODE_TYPE};
my $SourceNodeGenerationType = ${$NodeRef}{PAGE_TYPE};

$ErrorText = $TreeAdmin->copyNodeByNumber (
                SourceNodeNumber         => $SourceNodeNumber,
                SourceNodeType           => $SourceNodeType,
                SourceNodeGenerationType => $SourceNodeGenerationType,
                TargetNodeCategory       => $HomeParentCategory,
                TargetNodeName           => $CategoryName,
                TargetNodeUserId         => $Context->{User}->UserId,
                TargetNodeGroup          => ',Public,Users,',
);

copyNodeByPath

Synopsis

$ErrorText = $TreeAdmin->copyNodeByPath ( %P );

Description

Copies a node by page path.

changeElementByPath

Synopsis

$ErrorText = $TreeAdmin->changeElementByPath ( %P );

Description

Copies a node by page path.

Examples

my $ErrorText = $TreeAdmin->changeElementByPath (
                  Category         => '/User/Home/T/Template-Manager/MusicianProfile',
                  Page             => 'Contact',
                  ElementName      => 'Text.MessageForm',
                  ElementContent   => 'foo',
                  ElementAttribute => 'bar',
                );

backupPage

Synopsis

$ErrorText = $TreeAdmin->backupPage ($Page);

Description

Backup pages of the page tree.

setPageStatus

Synopsis

$ErrorText = $TreeAdmin->setPageStatus ($Status, $where);

Description

Sets a pages status.

1
Next ∙ Previous ∙ Top ∙ Join ∙ Contact © Maxscape