REST-les Module to query and return Object-Attributes

Author Message

Daniel Scheiner

Friday 24 November 2006 3:12:07 am

Hi!

I want to build a module that i can access and pass a variable to via URL like so:

http://www.test.com/module/variable

The module should then access the database and return the data (object-attributes like name, etc.).

Right now I am trying to figure out the best way to return the data, i.e. format and way of transport as I am calling the module from a Java-Application.

Any input would be greatly appreciated! =)

Kristian Hole

Friday 24 November 2006 8:22:07 am

Hi Daniel,

You can do this by creating an eZ publish module.

Reference:
http://ez.no/products/ez_publish/documentation/development/extensions/module/hello_world
http://ez.no/products/ez_publish/documentation/development/extensions/building_an_ez_publish_module
(You do not need the fetch function here)
http://ez.no/community/contribs/applications/extension_manager

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:25:22
Script start
Timing: Jan 18 2025 22:25:22
Module start 'layout'
Timing: Jan 18 2025 22:25:22
Module start 'content'
Timing: Jan 18 2025 22:25:23
Module end 'content'
Timing: Jan 18 2025 22:25:23
Script end

Main resources:

Total runtime0.7364 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 589.2734152.6406
Module start 'layout' 0.00630.0042 741.914139.4766
Module start 'content' 0.01050.7243 781.3906521.2031
Module end 'content' 0.73480.0016 1,302.59388.2813
Script end 0.7363  1,310.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4871160.0002
Check MTime0.00140.1883160.0001
Mysql Total
Database connection0.00090.125210.0009
Mysqli_queries0.684692.9619540.0127
Looping result0.00060.0762520.0000
Template Total0.694394.320.3471
Template load0.00210.281520.0010
Template processing0.692293.998420.3461
Template load and register function0.00030.037610.0003
states
state_id_array0.00220.304510.0022
state_identifier_array0.00150.198120.0007
Override
Cache load0.00170.2285180.0001
Sytem overhead
Fetch class attribute can translate value0.00070.088720.0003
Fetch class attribute name0.00160.213330.0005
XML
Image XML parsing0.00070.101420.0004
class_abstraction
Instantiating content class attribute0.00000.001230.0000
General
dbfile0.00260.3570160.0002
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs