findAll(connection)
create()
update()
delete()
getAuthId()
getUsername()
getLevel()
setAuthId(serverAuthId)
setUsername(username)
setPassword(password)
setLevel(accessGroupId)
BuildForge::Services::DBO::ServerAuth
use BuildForge::Services;
$conn = new BuildForge::Services::Connection($hostname); $token = $conn->authUser($user, $pass); # Getting existing serverauths $allServerAuthes = BuildForge::Services::DBO::ServerAuth->findAll($conn); $oldauth = BuildForge::Services::DBO::ServerAuth->findById($conn, $authId);
# Getter / setter functions $id = $oldauth->getAuthId(); $username = $oldauth->getUsername(); $accessGroupId = $oldauth->getLevel();
$oldauth->setAuthId('Server Authorization Name'); $oldauth->setUsername('username'); $oldauth->setPassword('password'); $oldauth->setLevel($accessGroupId); $oldauth->update(); # ServerAuth creation, updating, deletion $newserverauth = new BuildForge::Services::DBO::ServerAuth($conn); $newserverauth->setAuthId('New Build ServerAuth'); $newserverauth->setLevel($accessGroupId); $newserverauth->create();
$newserverauth->setLevel(2); $newserverauth->update(); $newserverauth->delete(); BuildForge::Services::DBO::ServerAuth->deleteById($conn, $oldauth->getAuthId()); $conn->logout; $conn->close;
ServerAuth allows you to create, access, and delete BuildForge server authorization objects.
Returns a new instance of a ServerAuth object.
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 new server auth.
The username used to connect to the server.
The password used to connect with the server.
The access group ID (from $accessGroup->getLevel())
of the access group this server
auth belongs to. If a user does not belong to this access group, they cannot view, edit,
or use this server auth.
findAll(connection)
Returns a reference to an array of BuildForge::Services::DBO::ServerAuth objects corresponding to all server auths in the database that the user has access to.
A connected BuildForge::Services::Connection object.
Returns the BuildForge::Services::DBO::ServerAuth object corresponding to the given server auth ID, or undef if no such object exists.
A connected BuildForge::Services::Connection object.
The desired server auth ID (from $serverauth->getAuthId()).
create()
Creates a record for the server auth in the database.
update()
Updates the server auth record in the database.
delete()
Deletes the server auth from the database.
Deletes the server auth from the database which has the specified ID.
A connected BuildForge::Services::Connection object.
The server auth ID (from $serverauth->getAuthId())
to be deleted.
getAuthId()
Returns the server auth name / ID.
getUsername()
Returns the username used to connect to servers with this server auth.
getLevel()
Returns the access group ID of the access group this server auth belongs to. Users not in the access group cannot view, edit, or use the server auth.
setAuthId(serverAuthId)
Sets the ID / name for this server auth. $serverAuth->update()
must be run
before changes are replicated in the database.
The new server auth ID / name.
setUsername(username)
Sets the new username used to connect to servers with this server auth. $serverAuth->update()
must be run
before changes are replicated in the database.
The new user name.
setPassword(password)
Sets the new password used to connect to servers with this server auth. $serverAuth->update()
must be run
before changes are replicated in the database.
The new login password.
setLevel(accessGroupId)
Sets the access group this server auth belongs to. Users who do not belong
to this access group cannot view, edit, or use this server auth. $serverAuth->update()
must be run
before changes are replicated in the database.
The access group ID (from $accessGroup->getLevel()).
Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.