NAME

Siebel::Srvrmgr::Connection - class responsible to provide connection details of a Siebel Enterprise

SYNOPSIS

    use Siebel::Srvrmgr::Connection;

    my $conn = Siebel::Srvrmgr::Connection->new({ 
        server      => 'servername',
        gateway     => 'gateway',
        enterprise  => 'enterprise',
        user        => 'user',
        password    => 'password',
        bin         => 'c:\\siebel\\client\\bin\\srvrmgr.exe',
        lang_id     => 'PTB', 
        field_delimiter => '|'
    });

DESCRIPTION

This class holds all the details regarding necessary parameters to connect to a Siebel Enterprise by using srvrmgr.

It should be used by any class that need to do that.

Beware that this class does not hold a connection by itself, only the necessary data to request one. You can share those details, but not the connection itself.

ATTRIBUTES

server

This is a string representing the servername where the instance should connect. This is a optional attribute during object creation with the new method.

Beware that the run method will verify if the server attribute has a defined value or not: if it has, the run method will try to connect to the Siebel Enterprise specifying the given Siebel Server. If not, the method will try to connect to the Enterprise only, not specifying which Siebel Server to connect.

gateway

This is a string representing the gateway where the instance should connect. This is a required attribute during object creation with the new method.

enterprise

This is a string representing the enterprise where the instance should connect. This is a required attribute during object creation with the new method.

user

This is a string representing the login for authentication. This is a required attribute during object creation with the new method.

password

This is a string representing the password for authentication. This is a required attribute during object creation with the new method.

bin

An string representing the full path to the srvrmgr program in the filesystem.

This is a required attribute during object creation with the new method.

lang_id

A string representing the LANG_ID parameter to connect to srvrmgr. If defaults to "ENU";

field_delimiter

This is a single character attribute. It tells the Daemon class to consider a field delimiter, if such options was set in the srvrmgr program. If this option is used but this attribute is not set accordinly, parsing will probably fail.

Since this attribute should be defined during Daemon object instance, it is read-only.

METHODS

get_params

Returns an array reference with all the required parameters to execute srvrmgr program, but the password attribute. See get_params_pass method.

Here is the list of parameters/attributes returned, in this specific order:

  1. bin

  2. enterprise

  3. gateway

  4. user

  5. lang_id

  6. server - if available

  7. field_delimiter - if available

The last two parameters are optional, so they might or not be included, depending on how the object was created.

The password attribute is omitted, in the case the password prompt from srvrmgr is desired to be used.

It is suitable to used directly with system call, avoiding calling the shell (see perlsec).

get_params_pass

Returns the same array reference of get_params (in fact, invokes it), with the password included as the last element.

get_field_del

Getter for the field_delimiter attribute.

get_lang_id

Returns the value of the attribute lang_id.

set_lang_id

Sets the attribute lang_id. Expects a string as parameter.

get_server

Returns the content of server attribute as a string.

set_server

Sets the attribute server. Expects an string as parameter.

get_gateway

Returns the content of gateway attribute as a string.

set_gateway

Sets the attribute gateway. Expects a string as parameter.

get_enterprise

Returns the content of enterprise attribute as a string.

set_enterprise

Sets the enterprise attribute. Expects a string as parameter.

get_user

Returns the content of user attribute as a string.

set_user

Sets the user attribute. Expects a string as parameter.

get_password

Returns the content of password attribute as a string.

set_password

Sets the password attribute. Expects a string as parameter.

get_bin

Returns the content of the bin attribute.

set_bin

Sets the content of the bin attribute. Expects a string as parameter.

SEE ALSO

AUTHOR

Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 of Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

This file is part of Siebel Monitoring Tools.

Siebel Monitoring Tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Siebel Monitoring Tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Siebel Monitoring Tools. If not, see <http://www.gnu.org/licenses/>.