findAll(connection)
create()
update()
delete()
deactivate()
debug()
activate()
getScopeId()
getAdaptorName()
getProjectId()
getActive()
getEnvironmentGroupId()
setAdaptorName(adaptorId)
setProjectId(projectId)
setActive(state)
setEnvironmentGroupId(envGroupId)
BuildForge::Services::DBO::AdaptorLink
use BuildForge::Services;
$conn = new BuildForge::Services::Connection($hostname); $token = $conn->authUser($user, $pass); # Getting existing adaptor links $project = new BuildForge::Services::DBO::Project($conn); $project->setName('Test Project'); $project->create(); $allLinks = BuildForge::Services::DBO::AdaptorLink->findAll($conn); $allLinksWithProject = BuildForge::Services::DBO::AdaptorLink->findByProjectId($conn, $project->getProjectId()); $allLinksWithAdaptor = BuildForge::Services::DBO::AdaptorLink->findByAdaptorName($conn); $link1 = BuildForge::Services::DBO::AdaptorLink->findById($conn, 1); $link2 = BuildForge::Services::DBO::AdaptorLink->findByProjectIdAndAdaptorName($conn, $project->getProjectId(), 'AdaptorName');
# Getter / setter functions $id = $link1->getScopeId(); $adaptorname = $link1->getAdaptorName(); $projectid = $link1->getProjectId(); $isactive = $link1->getActive(); $environmentid = $link1->getEnvironmentGroupId();
$link1->setAdaptorName('DifferentAdaptor'); $link1->setProjectId($project->getProjectId()); $link1->setActive('YES'); $environment = BuildForge::Services::DBO::Environment->findByName($conn, 'MyEnvName'); $link1->setEnvironmentGroupId($environment->getEnvGroupId()); $link1->update(); # Adaptor link creation, updating, deletion $newadaptorlink = new BuildForge::Services::DBO::AdaptorLink($conn); $newadaptorlink->setAdaptorName('MyAdaptor'); $newadaptorlink->setProjectId($projectid); $newadaptorlink->setActive('DEBUG'); $newadaptorlink->create();
$newadaptorlink->setEnvironmentGroupId($environment->getEnvGroupId()); $newadaptorlink->update(); $newadaptorlink->deactivate(); $newadaptorlink->debug(); $newadaptorlink->activate(); $newadaptorlink->delete(); BuildForge::Services::DBO::AdaptorLink->deleteById($conn, $link1->getInterfaceId()); $conn->logout; $conn->close;
AdaptorLink is used to create new BuildForge Adaptor Links and to access existing adaptor link information.
Creates an AdaptorLink instance.
A connected BuildForge::Services::Connection object.
An optional reference to a hash containing any or all of the following fields.
The ID for the project that the adaptor should be linked to (from Project->getProjectId()).
The ID for the adaptor that the project should be linked to (from Adaptor->getInterfaceId()).
Set to 'YES' for an active link, 'NO' for an inactive link, or 'DEBUG' to put the adaptor link in debug mode. The default, if not set, is 'YES'.
The ID for the environment the adaptor link should use (from Environment->getEnvGroupId()). Set it to 0 (the default) to have no environment group used.
findAll(connection)
Returns a reference to an array of AdaptorLink objects, one for each entry in the database that the current user has access to.
A connected BuildForge::Services::Connection object.
Returns a reference to an array of AdaptorLink objects, one for each entry in the database that the current user has access to and that connect to the given project.
A connected BuildForge::Services::Connection object.
The project ID that the desired adaptor links connect to (from Project->getProjectId()).
Returns a reference to an array of AdaptorLink objects, one for each entry in the database that the current user has access to and that use the given adaptor.
A connected BuildForge::Services::Connection object.=item adaptorName
The adaptor ID that the desired adaptor links connect to (from Adaptor->getInterfaceId()).
Returns the AdaptorLink object that connects the given project to the given adaptor, or undef if no such AdaptorLink exists.
A connected BuildForge::Services::Connection object.
The project ID that the desired adaptor link connects to (from Project->getProjectId()).
The adaptor ID that the desired adaptor link connects to (from Adaptor->getInterfaceId()).
Returns the AdaptorLink object with the given ID, or undef if no such AdaptorLink exists.
A connected BuildForge::Services::Connection object.
The ID of the desired adaptor link (from AdaptorLink->getScopeId()).
create()
Creates the adaptor link within the database.
update()
Updates the adaptor link within the database with the current values in the object.
delete()
Deletes the adaptor link from the database.
Deletes the adaptor link from the database which has the given scopeId.
A connected BuildForge::Services::Connection object.
The ID of the adaptor link to delete (from AdaptorLink->getScopeId()).
deactivate()
Deactivates the adaptor link in the database. Unlike $adaptorlink->setActive('NO'),
this actually performs the action without the need for an $adaptorlink->update()
call.
debug()
Sets the adaptor link in the database to debug mode. Unlike $adaptorlink->setActive('DEBUG'),
this actually performs the action without the need for an $adaptorlink->update()
call.
activate()
Activates the adaptor link in the database. Unlike $adaptorlink->setActive('YES'),
this actually performs the action without the need for an $adaptorlink->update()
call.
getScopeId()
Returns the adaptor link ID.
getAdaptorName()
Returns the name / ID of the adaptor the adaptor link is linked to.
getProjectId()
Returns the ID of the project the adaptor link is linked to.
getActive()
Returns 'YES' if the adaptor is active, 'NO' if the adaptor is inactive, and 'DEBUG' if the adaptor is in debug mode.
getEnvironmentGroupId()
Returns the ID of the environment group the adaptor link is linked to, or 0 if it isn't linked to an environment group.
setAdaptorName(adaptorId)
Sets the adaptor the adaptor link is linked to. $adaptorlink->update()
must be run before
changes are replicated in the database.
The ID of the adaptor, gotten from $adaptor->getInterfaceId().
setProjectId(projectId)
Sets the project that the adaptor link is linked to. $adaptorlink->update()
must be run
before changes are replicated in the database.
The ID of the project, from $project->getProjectId().
setActive(state)
Sets the mode of the adaptor link - active, inactive, or debug. $adaptorlink->update()
must be run before changes are replicated in the database.
May be one of 'YES' for active, 'NO' for inactive, or 'DEBUG' for debug mode.
setEnvironmentGroupId(envGroupId)
Sets the environment group that the adaptor link is linked to. $adaptorlink->update()
must be run before changes are replicated in the database.
The ID of the environment group to link to (from $environment->getEnvGroupId()), or 0 for no environment group.
Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.