internal package Foswiki::UI

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

internal package Foswiki::UI

Coordinator of execution flow and service functions used by the UI packages

StaticMethod handleRequest($req) → $res

Main coordinator of request-process-response cycle.

StaticMethod _execute($req, $sub, %initialContext) → $res

Creates a Foswiki session object with %initalContext and calls $sub method. Returns the Foswiki::Response object.

StaticMethod logon($session)

Handler for "logon" action.
  • $session is a Foswiki session object

StaticMethod checkWebExists( $session, $web, $op )

Check if the web exists. If it doesn't, will throw an oops exception. $op is the user operation being performed.

StaticMethod topicExists( $session, $web, $topic, $op ) → boolean

Check if the given topic exists, throwing an OopsException if it doesn't. $op is the user operation being performed.

StaticMethod checkAccess( $session, $mode, $topicObject )

Check if the given mode of access by the given user to the given web.topic is permissible, throwing a Foswiki::AccessControlException if not.

StaticMethod checkValidationKey( $session )

Check the validation key for the given action. Throws an exception if the validation key isn't valid (handled in _execute(), above)
  • $session - the current session object

See Foswiki::Validation for more information.

StaticMethod run( $method, %context )

Supported for bin scripts that were written for Foswiki < 1.0. The parameters are a function reference to the UI method to call and initial context.

In Foswiki >= 1.0 it should be replaced by a Config.spec entry such as:

# *PERL H* # Bin script registration - do not modify $Foswiki::cfg{SwitchBoard}{publish} = [ "Foswiki::Contrib::Publish", "publish", { publishing => 1 } ];

Topic revision: r1 - 02 May 2016, UnknownUser
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 wiki.cifrabar.ru? Send feedback