man Bric::SOAP::Asset () - base class for SOAP "asset" classes

NAME

Bric::SOAP::Asset - base class for SOAP "asset" classes

VERSION

$LastChangedRevision$

DATE

$LastChangedDate: 2005-01-28 19:35:54 -0800 (Fri, 28 Jan 2005) $

list_ids
This method queries the database for matching assets and returns a list of ids. If no assets are found an empty list will be returned. Notes: You'll likely want to override this method unless your asset is simple like MediaType.
export
The export method retrieves a set of assets 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:
asset_id
Specifies a single asset_id to be retrieved. The name 'asset_id' will actually be something like 'media_id'.
asset_ids
Specifies a list of asset_ids. The value for this option should be an array of integer asset_id assets. The name 'asset_ids' will actually be something like 'media_ids'. Throws:
Exception::AP
Side Effects: NONE Notes: NONE
create
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:
document (required)
The XML document containing objects to be created. The document must contain at least one asset object. Throws:
Exception::AP
Side Effects: NONE Notes: NONE
update
The update method updates an asset using the data in an XML document of the format created by export(). A common use of update() is to export() a selected 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:
document (required)
The XML document where the objects to be updated can be found. The document must contain at least one asset and may contain any number of related asset objects.
update_ids (required)
A list of asset_id integers for the assets to be updated. These must match id attributes on asset 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:
Exception::AP
Side Effects: NONE Notes: NONE
delete
The delete() method deletes assets. It takes the following options:
asset_id
Specifies a single asset ID to be deleted. The name 'asset_id' will actually be something like 'mediatype_id'.
asset_ids
Specifies a list of asset IDs to delete. The name 'asset_ids' will actually be something like 'mediatype_ids'. Throws:
Exception::AP
Side Effects: NONE Notes: You'll likely want to override this method unless your asset is simple like MediaType.
class
Return the package name used with lookup or list_ids.
module
Return the module name, that is the first argument passed to bric_soap.
is_allowed_param
Returns true if CW$param is an allowed parameter to the CW$method method.
$pkg->load_asset($args)
This method provides the meat of both create() and update(). It inputs XML. The only difference between the two methods is that update_ids will be empty on create(). Serializes a single asset into an XML element using the given writer and args.

AUTHOR

Scott Lanning <slanning@theworld.com>

Sam Tregar <stregar@about-inc.com>

SEE ALSO

Bric::SOAP