Kernel::System::GeneralCatalog - general catalog lib
All general catalog functions.
new()
create a object
use Kernel::Config;
use Kernel::System::Log;
use Kernel::System::DB;
my $ConfigObject = Kernel::Config->new();
my $LogObject = Kernel::System::Log->new(
ConfigObject => $ConfigObject,
);
my $DBObject = Kernel::System::DB->new(
ConfigObject => $ConfigObject,
LogObject => $LogObject,
);
my $GeneralCatalogObject = Kernel::System::GeneralCatalog->new(
ConfigObject => $ConfigObject,
LogObject => $LogObject,
DBObject => $DBObject,
);
ClassList()
return an array reference of all general catalog classes
my $ListRef = $GeneralCatalogObject->ClassList();
ItemList()
return a list as hash reference of one general catalog class
my $ListRef = $GeneralCatalogObject->ItemList(
Class => 'ITSM::Service::Type',
Functionality => 'active', # (optional) string or array reference
Valid => 0,
);
FunctionalityList()
return an hash reference of all functionalities of a general catalog class
my $ListRef = $GeneralCatalogObject->FunctionalityList(
Class => 'ITSM::Service::Type',
);
ItemGet()
get a general catalog item
Return $ItemData{ItemID} $ItemData{Class} $ItemData{Name} $ItemData{Functionality} $ItemData{ValidID} $ItemData{Comment} $ItemData{CreateTime} $ItemData{CreateBy} $ItemData{ChangeTime} $ItemData{ChangeBy}
my $ItemDataRef = $GeneralCatalogObject->ItemGet(
ItemID => 3,
);
or
my $ItemDataRef = $GeneralCatalogObject->ItemGet(
Class => 'ITSM::Service::Type',
Name => 'Item Name',
);
ItemAdd()
add a new general catalog item
my $ItemID = $GeneralCatalogObject->ItemAdd(
Class => 'ITSM::Service::Type',
Name => 'Item Name',
Functionality => 'Func3', # (optional)
ValidID => 1,
Comment => 'Comment', # (optional)
UserID => 1,
);
ItemUpdate()
update a existing general catalog item
my $True = $GeneralCatalogObject->ItemUpdate(
ItemID => 123,
Name => 'Item Name',
Functionality => 'Func3', # (optional)
ValidID => 1,
Comment => 'Comment', # (optional)
UserID => 1,
);
ValidLookup()
return a hash reference of all general catalog availabilities
Return $Valid{ValidID} $Valid{Name}
my $ValidRef = $GeneralCatalogObject->ValidLookup(
ValidID => 1,
);
or
my $ValidRef = $GeneralCatalogObject->ValidLookup(
Name => 'valid',
);
ValidList()
return a hash reference of all general catalog availabilities
my $ListRef = $GeneralCatalogObject->ValidList();
This Software is part of the OTRS project (http://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
$Revision: 1.11.2.1 $ $Date: 2007-08-30 14:55:34 $