cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Cocoon Wiki] New: PortalToolManager
Date Fri, 28 Jan 2005 10:36:01 GMT
   Date: 2005-01-28T02:36:01
   Editor: JensMaukisch
   Wiki: Cocoon Wiki
   Page: PortalToolManager

   no comment

New Page:

= PortalToolManager =

The PortalToolManager is the main component of the PortalTools. It holds information about
all plugins an possilby about their configurations. Furthermore it gives you easy access to
all required PortalObjects. Most of the functions are not used by the tool-developer, inside
a plugin it normally just used to access the PortalObjects (via Flow).

== Configuration ==

The PortalToolManager is a cocoon component and must be configured in the cocoon.xconf. It's
almost the only configuration you have to do if you add the PortalTools to an existing portal.

  <component class="" role="">
   <parameter name="root" value="context://samples/blocks/portal/tools/"/>
   <parameter name="conf" value="conf.xml"/>
   <parameter name="auth" value="auth.xml"/>

{{{root}}}: root directory of the PortalTools[[BR]]
{{{conf}}}: name of the configuration file[[BR]]
{{{auth}}}: name of the authentication file

== Important Methods ==

''getConfiguration(String path)'': returns a configuration object for the specified path[[BR]]
''saveConfiguration()'': saves the configuration[[BR]]
''sGet(String path)'': Gets the value of the specified path from the authentication-context.[[BR]]
''sSet(String path, String value)'': Stores the specified value under the path in the authentication-context.[[BR]]
''getPortalObjects()'': returns a PortalObjects object which provides easy access to the important
portal objects[[BR]]
''releasePortalObjects(PortalObjects)'': releases a PortalObjects object[[BR]]

For more information have a look at the source.

== Sample ==
How to use the PortalToolManager in Flow:

  function editCoplet() {
    var toolManager = getPTM();
    var portalObjects = toolManager.getPortalObjects();
    var portalLayout = portalObjects.getPortalLayout();
    // Do something

View raw message