PerlDoc

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview


Parent package: Foswiki::Plugins::QMPlugin
Child packages:

    internal package Foswiki::Plugins::QMPlugin::Core

    core class for this plugin

    an singleton instance is allocated on demand

    ClassProperty TRACE

    boolean toggle to enable debugging of this class

    ClassProperty @defaultHandler

    list of default handlers

    ClassMethod new() → $core

    constructor for a Core object

    ObjectMethod finish()

    called when this object is destroyed

    ObjectMethod getUsers() → @users

    get the list of all users known to the core up to this point

    ObjectMethod getUser($id) → $user

    get a user of a specific id

    ObjectMethod getSelf() → $user

    get the user for the currently logged in user

    ObjectMethod getGroups() → @groups

    get the list of all groups known to the core up to this point

    ObjectMethod getGroup($id) → $group

    get a group of a specific id

    ObjectMethod saveMeta($meta)

    save a meta by suppressing the beforeSaveHandler

    ObjectMethod afterSaveHandler($web, $topic, $meta)

    make sure the saved topic has got the right access control settings

    ObjectMethod beforeSaveHandler($web, $topic, $meta)

    • make sure the saved topic has got the right workflow
    • trigger a state change when a qmstate formfield has been altered

    ObjectMethod getFormfieldDefinition($meta, $type) → $fieldDef

    returns a Foswiki::Form::FieldDefinition for the given formfield type. this is used to return the definitions of a qmstate or qmworkflow formfield.

    returns undef if the form doesn't have a formfield of the requested type

    ObjectMethod getQMStateFormfield($meta) → $field

    return a formfield of a qmstate if it exists

    ObjectMethod getQMWorkflowFormfield($meta) → $field

    return a formfield of a qmworkflow if it exists

    ObjectMethod jsonRpcCancelTransition($session, $request)

    json-rpc handler for the cancelTransition procedure

    ObjectMethod jsonRpcChangeState($session, $request)

    json-rpc handler for the changeState procedure

    ObjectMethod jsonRpcSendNotification($session, $request)

    json-rpc handler for the sendNotification procedure

    ObjectMethod restTriggerStates($session)

    this handler searches for topics with a workflow attached to it and triggers any automatic transition found. Parameters

    • webs: list of webs to search for controlled topics, defaults to all webs
    • includeweb: regular expression of webs to include into the process (default all)
    • excludeweb: regular expression of webs to exclude from the process (default none)
    • includetopic: regular expression of topics to include into the process (default all)
    • excludetopic: regular expression of topics to exclude from the process (default none)
    • includeworkflow: regular expression of workflows to process (default all)
    • excludeworkflow: regular expression of workflows to exclude from the process (default none)
    • dry: boolean switch to enable a "dry run" not changing anything (defaults to "off")

    WARNING: this handler is typically called by a cronjob, from the commandline or by admins.

    ObjectMethod QMHISTORY($session, $params, $topic, $web)

    macro implementation for %QMHISTORY

    ObjectMethod QMNET($session, $params, $topic, $web)

    macro implementation for %QMNET

    ObjectMethod QMSTATE($session, $params, $topic, $web)

    macro implementation for %QMSTATE

    ObjectMethod QMNODE($session, $params, $topic, $web)

    macro implementation for %QMNODE

    ObjectMethod QMROLE($session, $params, $topic, $web)

    macro implementation for %QMROLE

    ObjectMethod QMEDGE($session, $params, $topic, $web)

    macro implementation for %QMEDGE

    ObjectMethod QMGRAPH($session, $params, $topic, $web)

    macro implementation for %QMGRAPH

    ObjectMethod QMBUTTON($session, $params, $topic, $web)

    macro implementation for %QMBUTTON

    ObjectMethod getState($web, $topic, $rev, $meta, $force) → $state

    get the workflow state of the given topic

    ObjectMethod getNet($web, $topic, $state) → $net

    returns a Foswiki::Plugins::QMPlugin::Net object and assignes the given state.

    ObjectMethod getStates($web, $topic, $rev, $params) → @states

    get all workflow states of the given topic up to revision $rev

    ObjectMethod registerCommandHandler($handler)

    register a command handler. commands are executed when an edge is traversed.

    The handler is a hash reference with the following properties:

    • id: name of the command that may is executed, e.g. "fork", "merge" or "trash"
    • type: type of the command: "beforeSave", "afterSave"
    • package: perl package
    • function: function within the package to be called
    • callback: callback function

    Note that either "package" and "function" are specified, or a "callback" is given right away.

    ObjectMethod getCommandHandlers($id) → @callbacks

    get the list of registered handlers for a specified action id

    ObjectMethod redirectUrl(url)

    the redirect property records the need of the system to initiate a redirect at the end of the processing queue

    ObjectMethod solrIndexTopicHandler($indexer, $doc, $web, $topic, $meta, $text)

    hooks into the solr indexer and add workflow fields

    ObjectMethod solrIndexAttachmentHandler($indexer, $doc, $web, $topic, $attachment)

    hooks into the solr indexer and add workflow fields

    ObjectMethod dbCacheIndexTopicHandler($db, $obj, $web, $topic, $meta, $text)

    hooks into the dbcache indexer and add workflow fields

    This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
    Ideas, requests, problems regarding arbeitsgruppe.ch? Send feedback