NAME

BuildForge::Services::DBO::SysConfig


SYNOPSIS

        use BuildForge::Services;
        $conn = new BuildForge::Services::Connection($hostname);
        $token = $conn->authUser($user, $pass);
        
        # Getting existing sysconfigs
        $allSysconfs = BuildForge::Services::DBO::SysConfig->findAll($conn);
        $sysconf = BuildForge::Services::DBO::SysConfig->findById($conn, 'param_name');
        # Getter functions
        $id = $sysconf->getName();
        $title = $sysconf->getTitle();
        $description = $sysconf->getDescription();
        $value = $sysconf->getValue();
        $datatype = $sysconf->getDataType();
        $defaultValue = $sysconf->getDefaultValue();
        $isPublic = $sysconf->getIsPublic();
        $validationString = $sysconf->getValidate();
        # SysConfig updating
        $sysconf->setValue('new value for system parameter');
        $sysconf->update();
                
        $conn->logout;
        $conn->close;


DESCRIPTION

SysConfig allows you to view and update BuildForge system configuration settings.


METHODS

BuildForge::Services::DBO::SysConfig->findAll(connection)

Returns a reference to an array of all BuildForge::Services::DBO::SysConfig objects that the current user has access to.

connection

A connected BuildForge::Services::Connection object.

BuildForge::Services::DBO::SysConfig->findById(connection, sysConfId)

Returns the BuildForge::Services::DBO::SysConfig object corresponding to the given system configuration ID, or undef if no such object exists.

connection

A connected BuildForge::Services::Connection object.

sysConfId

The ID of the desired system configuration setting (from $sysconf->getName()).

$sysconf->update()

Updates the system configuration setting in the database.

$sysconf->getName()

Returns the name / ID of the system configuration setting.

$sysconf->getTitle()

Returns the title text for the system configuration setting.

$sysconf->getDescription()

Returns the description of what the system configuration setting does.

$sysconf->getValue()

Returns the current value of the setting.

$sysconf->getDataType()

Returns the datatype of the setting, limiting what values are acceptable. The possible return values are:

''

This is not a publically editable setting.

'bool'

Possible values of this are 'Y' and 'N'.

'email'

The value of this setting should be a valid email address.

'formatdate'

Used for date formatting strings consisting of 'y', 'm', and 'd' with appropriate separators. For the date July 20, 2007, for example, the format string 'ymd' will result in '20070720', and the format string 'm-d-y' will result in '07-20-2007'.

'formatpasswd'

Used for the system setting controlling the requirements for user passwords. See the online documentation on the Administration->System topic regarding the ``Password Format'' system setting for details on the format of this.

'formattime'

Used for time formatting strings consisting of 'h', 'm', and 's' with appropriate separators. For the time 11:35:58 PM, for example, the format string 'hms' will result in '233558', and the format string 's/m/h' will result in '58/35/11'.

'formattimestamp'

Used for date/time formatting strings. It is built on the POSIX strftime() function, so see your local machine's documentation for that to see what settings this field accepts.

'hostip'

Accepts a host ip address and optional port number separated by a ':'.

'integer'

Accepts any integer value.

'passwd'

Accepts any string.

'real'

Accepts any floating point or integer value.

'string'

Accepts any string.

'timedays'

Accepts any positive integer value or 0.

'timemins'

Accepts any positive integer value or 0.

'timesecs'

Accepts any positive integer value or 0.

'timestamp'

Accepts any positive integer value or 0.

'url'

Accepts any URL.

$sysconf->getDefaultValue()

Returns the default value for this field.

$sysconf->getIsPublic()

Returns 1 if the value is publically accessible or 0 if it is an internal system setting.

$sysconf->getValidate()

Returns the validation string for the setting, currently unused.

$sysconf->setValue(value)

Sets the value for the system configuration setting. $sysconf->update() must be run before changes are replicated in the database.

value

The new value for the setting. This value must fit the datatype rules for the particular system variable (see $sysconf->getDataType()).


COPYRIGHT

Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.