Bric::SOAP::Element - SOAP interface to Bricolage element definitions.
$Revision: 1.11 $
$Date: 2002/08/30 22:13:41 $
use SOAP::Lite;
import SOAP::Data 'name';
# setup soap object to login with
my $soap = new SOAP::Lite
uri => 'http://bricolage.sourceforge.net/Bric/SOAP/Auth',
readable => DEBUG;
$soap->proxy('http://localhost/soap',
cookie_jar => HTTP::Cookies->new(ignore_discard => 1));
# login
$soap->login(name(username => USER),
name(password => PASSWORD));
# set uri for Element module
$soap->uri('http://bricolage.sourceforge.net/Bric/SOAP/Element');
# get a list of all elements
my $element_ids = $soap->list_ids()->result;
This module provides a SOAP interface to manipulating Bricolage elements.
This method queries the database for matching elements and returns a list of ids. If no elements are found an empty list will be returned.
This method can accept the following named parameters to specify the search. Some fields support matching and are marked with an (M). The value for these fields will be interpreted as an SQL match expression and will be matched case-insensitively. Other fields must specify an exact string to match. Match fields combine to narrow the search results (via ANDs in an SQL WHERE clause).
The element's name.
The element's description.
The output channel for the element.
The element's type.
set to 1 to return only top-level elements
Throws: NONE
Side Effects: NONE
Notes: NONE
The export method retrieves a set of elements from the database, serializes them and returns them as a single XML document. See Bric::SOAP for the schema of the returned document.
Accepted paramters are:
Specifies a single element_id to be retrieved.
Specifies a list of element_ids. The value for this option should be an array of interger "element_id" elements.
Throws: NONE
Side Effects: NONE
Notes: NONE
The create method creates new objects using the data contained in an XML document of the format created by export().
Returns a list of new ids created in the order of the assets in the document.
Available options:
The XML document containing objects to be created. The document must contain at least one element object.
Throws: NONE
Side Effects: NONE
Notes: You cannot directly set the top_level setting. This value is ignored on update and create; instead it is taken from the type setting.
The update method updates element using the data in an XML document of the format created by export(). A common use of update() is to export() a selected element object, make changes to one or more fields and then submit the changes with update().
Returns a list of new ids created in the order of the assets in the document.
Takes the following options:
The XML document where the objects to be updated can be found. The document must contain at least one element and may contain any number of related element objects.
A list of "element_id" integers for the assets to be updated. These must match id attributes on element elements in the document. If you include objects in the document that are not listed in update_ids then they will be treated as in create(). For that reason an update() with an empty update_ids list is equivalent to a create().
Throws: NONE
Side Effects: NONE
Notes: You cannot directly update the top_level setting. This value is ignored on update and create; instead it is taken from the type setting.
The delete() method deletes elements. It takes the following options:
Specifies a single element_id to be deleted.
Specifies a list of element_ids to delete.
Throws: NONE
Side Effects: NONE
Notes: NONE
This method provides the meat of both create() and update(). The only difference between the two methods is that update_ids will be empty on create().
Serializes a single element object into a <element> element using the given writer and args.
Sam Tregar <stregar@about-inc.com>
Hey! The above document had some coding errors, which are explained below:
=back doesn't take any parameters, but you said =back 4
=back doesn't take any parameters, but you said =back 4
=back doesn't take any parameters, but you said =back 4
=back doesn't take any parameters, but you said =back 4
=back doesn't take any parameters, but you said =back 4
=back doesn't take any parameters, but you said =back 4