Kernel::WebApp::Util::BusinessObject::Base

NAME

Kernel::WebApp::Util::BusinessObject::Base

DESCRIPTION

Business object type base class.

PUBLIC INTERFACE

has UserID

Attribute that holds the record user id.

has UserData

Attribute that holds all user information.

has VisibleColumns

This attribute contains the visible columns for the business object lists.

MethodParamValidationSchema()

Add the base validations for the business object modules.

has ActionPermissions

Stores the permissions for each of the different action types.

has ActionObjects

Stores the objects for each of the different action types.

TransformActiveFilterValue()

Transform the active filter value with the given value type to a usable search backend value.

my $TransformedActiveFilter = $BusinessObjectTypeObject->TransformActiveFilterValue( ValueType => 'String', ValueValidators => [ { Validator => 'DataType', Arguments => 'ArrayRef', }, ], FilterName => 'Seen', FilterValues => { Value => [0, 1], }, );

Returns the transformed active filters.

    {
        Seen => [ 0, 1 ],
    }

Type()

Holds the type name of the current business object.

IdentifierKey()

Holds the identifier key for the list entries.

Label()

Holds the label of the business object.

ExportAllLabel()

Holds the label for the export all checkbox.

DefaultSorting()

Holds the default sorting for the web notification lists.

ColumnTitles()

Holds the column titles for the ticket list columns.

ColumnTitlesForExport()

Get the column titles for the export (from the given export columns).

ColumnTitlePlaceholders()

Holds the column title placeholders for the list columns.

SortableColumns()

Holds the sort-able columns for the table.

HideFilters()

Hide filter selection.

ClickableColumns()

Holds the columns which should the truncated in the frontend.

HasPopoverColumns()

Holds the columns which have a popover in the frontend.

TextTruncatableColumns()

Holds the columns which should the truncated in the frontend.

TranslatableColumns()

Holds the columns which should the translated in the frontend.

CleanupVisibleColumns()

Filter out columns based on configuration options. e.g. Watch column should only be shown when the watch feature is enabled.

AdditionalListDefaultConfigKeys()

With this function you can add business object type specific default config keys for the list.

AdditionalListConfigGet()

With this function you can add business object type specific configs to the list config.

AdditionalViewConfigGet()

With this function you can add business object type specific configs to the view config.

AdditionalCreateConfigGet()

With this function you can add business object type specific configs to the create config.

ItemDetailDataGet()

Collects the detail data for the item with the given ItemID.

ItemDetailDataGetForExport()

Collects the detail data for the item in the export file with the given ItemID and LanguageObject. Only needed for business objects with a export functionality.

ItemUpdateCheck()

Checks for updated and/or new items, based on given ItemIDs and additional parameters.

FiltersGet()

Get the filters from the provide filters function and return the available filters from the config.

InternalFiltersGet()

Get the filters from the internal provide filters function to use this in the transform filter function.

FormSchemaPermanentConfigurationGet()

Get the permanent configuration form schema for the business object types.

    my $FormSchema = $BusinessObjectTypeObject->FormSchemaPermanentConfigurationGet(
        Config => {                     # (required)
             "HideAvailableFilters" => [
                "Name",
                "ObjectType",
                "ObjectReference",
            ],
        },
    );

Returns:

    $FormSchema = {
        {
            Fields => [
                {
                    Name => 'VisibleColumns',
                    ...
                },
                ...
            ],
        },
    };

FormSchemaPermanentConfigurationDetailViewGet()

Get the permanent configuration form schema for the business object types.

    my $FormSchema = $BusinessObjectTypeObject->FormSchemaPermanentConfigurationDetailViewGet(
        Config => {                     # (required)
            Type               => 'BusinessObjectDetailView',
            BusinessObjectType => 'Ticket',
            ColumnLayout       => {
                OneColumn    => [...],
                TwoColumns   => [...],
                ThreeColumns => [...],
            },
            ...
        },
    );

Returns the form schema for business object detail views.

FormSchemaPermanentConfigurationOverviewGet()

Get the permanent configuration form schema for the business object types.

    my $FormSchema = $BusinessObjectTypeObject->FormSchemaPermanentConfigurationOverviewGet(
        Config => {                     # (required)
            Type               => 'BusinessObjectOverview',
            BusinessObjectType => 'Dashboard',
            ColumnLayout       => {
                OneColumn    => [...],
                TwoColumns   => [...],
                ThreeColumns => [...],
            },
            ...
        },
    );

Returns the form schema for business object dashboards.

FormSchemaPermanentConfigurationCreateScreenGet()

Get the permanent configuration form schema for the business object types.

    my $FormSchema = $BusinessObjectTypeObject->FormSchemaPermanentConfigurationCreateScreenGet(
        Config => {                     # (required)
            Type               => 'BusinessObjectCreate',
            BusinessObjectType => 'CreateScreen',
            ColumnLayout       => {
                OneColumn    => [...],
                TwoColumns   => [...],
                ThreeColumns => [...],
            },
            ...
        },
    );

Returns the form schema for business object dashboards.

FormSchemaFilterConfigurationGet()

Get the non-permanent configuration form schema for the different business object types.

    my $FormSchema = $BusinessObjectTypeObject->FormSchemaFilterConfigurationGet(
        Config => {                     # (required)
             "AvailableFilters" => [
                "Name",
                "ObjectType",
                "ObjectReference",
            ],
        },
    );

Returns:

    $FormSchema = {
        {
            Fields => [
                {
                    Name => 'SortBy',
                    ...
                },
                ...
            ],
        },
    };

FormSchemaExportListActionGet()

Get the export list form schema for the business object types. Normally it's the same for every type, but this can be changed in the specific type module.

    my $FormSchema = $BusinessObjectTypeObject->FormSchemaExportListActionGet(
        Config => {
            ...
        }, # (required)
    );

Returns:

    $FormSchema = {
        {
            Fields => [
                {
                    Name => 'ExportFormat',
                    ...
                },
                ...
            ],
        },
    };

EndpointContexts()

Returns a list of the endpoint contexts for the object type.

    (
        'Context1',
        'Context2',
    )

PRIVATE INTERFACE

_ProvideFilters()

Holds the available filter information (e.g. which form field type).

Returns

    {
        Seen => {
            Label  => Translatable('Seen'),
            Fields => [
                {
                    Name   => 'Value',
                    Label  => Translatable('Seen'),
                    Type   => 'FormSelect',
                    Config => {
                        Options => {
                            0 => Translatable('No'),
                            1 => Translatable('Yes'),
                        },
                    },
                    Multiple => 1,
                    Required => 1,
                    Props    => {
                        TranslateOptions => 1,
                    },
                },
            ],
            ValueType  => 'Array',
            ValueValidators => [
                {
                    Validator => 'DataType',
                    Arguments => 'ArrayRefWithData'
                },
            ],
        },
    }

_InternalProvideFilters()

Holds the available internal filter information (without a form schema).

Returns

    {
        TicketID => {
            ValueType  => 'Array',
            ValueValidators => [
                {
                    Validator => 'DataType',
                    Arguments => 'ArrayRefWithData'
                },
            ],
        },
    }

_HideAvailableFilters()

Hides some available filters, if needed.

Returns

    {
        Seen => {
            Label  => Translatable('Seen'),
            Fields => [
                {
                    Name   => 'Value',
                    Label  => Translatable('Seen'),
                    Type   => 'FormSelect',
                    Config => {
                        Options => {
                            0 => Translatable('No'),
                            1 => Translatable('Yes'),
                        },
                    },
                    Multiple => 1,
                    Required => 1,
                    Props    => {
                        TranslateOptions => 1,
                    },
                },
            ],
            ValueType  => 'Array',
            ValueValidators => [
                {
                    Validator => 'DataType',
                    Arguments => 'ArrayRefWithData'
                },
            ],
        },
    }

_FormSchemaFilterConfigurationGetFilters()

Helper function to disable the active filters for the non permanent form schema.

_BuildUserData()

Initializes the attribute UserData.

_ItemIndex()

Returns the index of the first matched item in the list, otherwise '-1'.

Scroll to Top