Kernel::System::ITSMChange::ITSMCondition::Operator - condition operator lib
All functions for condition operators in ITSMChangeManagement.
OperatorAdd()
Add a new condition operator.
my $OperatorID = $ConditionObject->OperatorAdd(
Name => 'OperatorName',
UserID => 1,
);
OperatorUpdate()
Update a condition operator.
my $Success = $ConditionObject->OperatorUpdate(
OperatorID => 1234,
Name => 'NewOperatorName',
UserID => 1,
);
OperatorGet()
Get a condition operator for a given operator id. Returns a hash reference of the operator data.
my $ConditionOperatorRef = $ConditionObject->OperatorGet(
OperatorID => 1234,
UserID => 1,
);
The returned hash reference contains following elements:
$ConditionOperator{OperatorID}
$ConditionOperator{Name}
OperatorLookup()
This method does a lookup for a condition operator. If an operator id is given, it returns the name of the operator. If the name of the operator is given, the appropriate id is returned.
my $OperatorName = $ConditionObject->OperatorLookup(
OperatorID => 4321,
);
my $OperatorID = $ConditionObject->OperatorLookup(
Name => 'OperatorName',
);
OperatorList()
Returns a list of all condition operators as hash reference
my $ConditionOperatorsRef = $ConditionObject->OperatorList(
UserID => 1,
);
The returned hash reference contains entries like this:
$ConditionOperator{ObjectID} = 'ObjectName'
OperatorDelete()
Deletes a condition operator.
my $Success = $ConditionObject->OperatorDelete(
OperatorID => 123,
UserID => 1,
);
OperatorExecute()
Executes the operator and returns true on success.
my $Result = $ConditionObject->OperatorExecute(
OperatorName => 'is',
Attribute => 'WorkOrderStateID',
Selector => '1234, # ( ObjectKey | any | all )
ObjectData => [ $WorkOrderData1, $WorkOrderData2 ],
CompareValue => 'SomeValue', # or ActionValue
ObjectName => 'ITSMWorkOrder', # needed for ActionValue
ActionID => 1234, # needed for ActionValue
ActionValue => 'SomeValue', # or CompareValue
UserID => 1234,
);
_OperatorExecute()
Returns true or false (1/undef).
my $Result = $ConditionObject->_OperatorExecute(
OperatorName => 'is',
Value1 => 'SomeValue',
Value2 => 'SomeOtherValue',
UserID => 1234,
);
_OperatorActionExecute()
Returns true or false (1/undef) if given action could be executed successfully.
my $Result = $ConditionObject->_OperatorActionExecute(
Operator => 'set',
ObjectName => 'ITSMChange',
Selector => '1234'
Attribute => 'ChangeStateID',
ActionID => 2345,
ActionValue => '13',
UserID => 1234,
);
_OperatorEqual()
Returns true or false (1/undef) if given values are equal.
my $Result = $ConditionObject->_OperatorEqual(
Value1 => 'SomeValue',
Value2 => 'SomeOtherValue',
);
_OperatorNotEqual()
Returns true or false (1/undef) if given values are not equal.
my $Result = $ConditionObject->_OperatorNotEqual(
Value1 => 'SomeValue',
Value2 => 'SomeOtherValue',
);
_OperatorIsEmpty()
Returns true or false (1/undef) if given value is empty.
my $Result = $ConditionObject->_OperatorIsEmpty(
Value1 => '',
);
_OperatorIsNotEmpty()
Returns true or false (1/undef) if given value is not empty.
my $Result = $ConditionObject->_OperatorIsNotEmpty(
Value1 => 'SomeValue',
);
_OperatorIsGreaterThan()
Returns true or false (1/undef) if Value1 is greater than the compare Value2.
my $Result = $ConditionObject->_OperatorIsGreaterThan(
Value1 => 2345,
Value2 => 1234,
);
_OperatorIsLessThan()
Returns true or false (1/undef) if Value1 is less than the compare Value2.
my $Result = $ConditionObject->_OperatorIsLessThan(
Value1 => 2345,
Value2 => 1234,
);
_OperatorIsBefore()
Returns true or false (1/undef) if Value1 is before the compare Value2.
my $Result = $ConditionObject->_OperatorIsBefore(
Value1 => '2010-01-01 01:01:01',
Value2 => '2010-01-01 10:01:01',
);
_OperatorIsAfter()
Returns true or false (1/undef) if Value1 is after the compare Value2.
my $Result = $ConditionObject->_OperatorIsAfter(
Value1 => '2010-01-01 10:01:01',
Value2 => '2010-01-01 01:01:01',
);
_OperatorContains()
Returns true or false (1/undef) if value1 contains value2.
my $Result = $ConditionObject->_OperatorContains(
Value1 => 'SomeValue',
Value2 => 'Value',
);
_OperatorNotContains()
Returns true or false (1/undef) if value1 not contains value2.
my $Result = $ConditionObject->_OperatorNotContains(
Value1 => 'SomeValue',
Value2 => 'SomeOtherValue',
);
_OperatorBeginsWith()
Returns true or false (1/undef) if value1 begins with value2.
my $Result = $ConditionObject->_OperatorBeginsWith(
Value1 => 'SomeValue',
Value2 => 'Some',
);
_OperatorEndsWith()
Returns true or false (1/undef) if value1 ends with value2.
my $Result = $ConditionObject->_OperatorEndsWith(
Value1 => 'SomeValue',
Value2 => 'Value',
);
_OperatorSet()
Returns the success of setting a new value.
my $Result = $ConditionObject->_OperatorSet(
Operator => 'set',
ObjectName => 'ITSMChange',
Selector => '1234'
Attribute => 'ChangeStateID',
ActionID => 'ChangeStateID',
ActionValue => '13',
UserID => 1234,
);
Hey! The above document had some coding errors, which are explained below:
Around line 11:
=over without closing =back
Around line 338:
=cut found outside a pod block. Skipping to next block.