findAll(connection)
create()
update()
delete()
listTemplateIds(connection)
getInterfaceId()
getDataText()
getLevel()
getTemplate()
getType()
setInterfaceId(adaptorId)
setDataText(xml)
setLevel(accessGroupId)
setTemplate(templateName)
setType(type)
BuildForge::Services::DBO::Adaptor
use BuildForge::Services;
$conn = new BuildForge::Services::Connection($hostname); $token = $conn->authUser($user, $pass); # Getting existing adaptors $allAdaptors = BuildForge::Services::DBO::Adaptor->findAll($conn); $allTemplateNames = BuildForge::Services::DBO::Adaptor->listTemplateIds($conn); $oldadaptor = BuildForge::Services::DBO::Adaptor->findById($conn, 'AdaptorName');
# Getter / setter functions $id = $oldadaptor->getInterfaceId(); $adaptorlevel = $oldadaptor->getLevel(); $templatename = $oldadaptor->getTemplate(); $type = $oldadaptor->getType(); $adaptorxml = $oldadaptor->getDataText(); $oldadaptor->setInterfaceId('NewAdaptorName'); $oldadaptor->setLevel(4); $oldadaptor->setTemplate('ClearQuest'); $oldadaptor->setType('DEFECT'); $oldadaptor->setDataText($newadaptorxml); $oldadaptor->update(); # Adaptor creation, updating, deletion $newadaptor = new BuildForge::Services::DBO::Adaptor($conn); $newadaptor->setInterfaceId('New Adaptor'); $newadaptor->setType('SOURCE'); $newadaptor->setTemplate('ClearCase'); $newadaptor->create();
$newadaptor->setInterfaceId('New Name For Existing Adaptor'); $newadaptor->update();
$newadaptor->delete(); BuildForge::Services::DBO::Adaptor->deleteById($conn, $oldadaptor->getInterfaceId()); $conn->logout; $conn->close;
Adaptor is used to create new BuildForge Adaptors and to access existing adaptor information.
Returns an Adaptor instance.
A connected BuildForge::Services::Connection object.
An optional reference to a hash containing any or all of the following fields.
The name/ID of the adaptor.
The type of the adaptor. This may be 'SOURCE', 'DEFECT', 'PACKAGE', or 'TEST'. If not set, the default is 'SOURCE'.
The actual adaptor XML.
The level (access group id) of the access group that this Adaptor belongs to. You must be a member of this access group to view, edit, or use this Adaptor.
Returns the Adaptor object that corresponds to the given adaptorId, or undef if no such adaptor exists.
A connected BuildForge::Services::Connection object.
The desired adaptor ID.
findAll(connection)
Returns a reference to an array of all Adaptors in the database that the user has access to.
A connected BuildForge::Services::Connection object.
create()
Creates an entry for the adaptor in the database.
update()
Updates the adaptor in the database to correspond to the current state of the Adaptor object.
delete()
Deletes the adaptor from the database.
Deletes the adaptor with the given ID from the database.
A connected BuildForge::Services::Connection object.
The adaptor ID to delete (as given by Adaptor->getAdaptorId()).
listTemplateIds(connection)
Returns a reference to an array containing the names of all possible template IDs.
A connected BuildForge::Services::Connection object.
getInterfaceId()
Returns the adaptor ID / name.
getDataText()
Returns the adaptor XML.
getLevel()
Returns the adaptor's access group ID.
getTemplate()
Returns the adaptor's template name.
getType()
Returns the adaptor's type (which may be 'SOURCE', 'DEFECT', 'PACKAGE', or 'TEST').
setInterfaceId(adaptorId)
Sets the adaptor's ID / name. $adaptor->update()
must be run before changes are
replicated in the database.
The new name for the adaptor.
setDataText(xml)
Sets the adaptor's XML. $adaptor->update()
must be run before changes are
replicated in the database.
The new adaptor XML.
setLevel(accessGroupId)
Sets the new access group to which the adaptor belongs. The access group controls
who can view, edit, or use the adaptor. $adaptor->update()
must be run before changes are
replicated in the database.
The ID of the new access group (as gotten from AccessGroup->getLevel()).
setTemplate(templateName)
Sets the new template that this adaptor is listed as having. This should come from
the list gotten from BuildForge::Services::DBO::Adaptor->listTemplateIds().
$adaptor->update()
must be run before changes are replicated in the database.
The name of the template to use.
setType(type)
Sets the type of the adaptor. $adaptor->update()
must be run before changes are
replicated in the database.
The desired adaptor type. The type may be 'SOURCE', 'DEFECT', 'PACKAGE', or 'TEST'.
Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.