Difference between revisions of "Object"

From SDU
Jump to: navigation, search
Line 1: Line 1:
Mainly, an Object in ServiceDesk is an object oriented representation of a single database record.
+
Mainly, an Object in Service Desk is an object-oriented representation of a single database record.
  
An Object belongs to a so called [[Factory]], which is somehow a mapping to one (or two) database table(s).
+
An Object belongs to a [[Factory]], which is a mapping to one (or two) database table(s).
  
Normaly, each field in a table is mapped to an attribute in its object representation.
+
Normally, each field in a table is mapped to an attribute in its object representation.
 
----
 
----
Changes to attributes of an object are always done in a three step process: First you have to checkout the object. That means, you tell the system, that you want to change this specific object.  
+
Changes to attributes of an object are always done in a three step process: First, you have to check out the object. That means, you tell the system that you want to change this specific object.  
If nobody else is actualy changeing this object, you get a writable version of this object. Then you are able to change the values of the attributes of the object. At the end, you have to do a checkin to this object.  
+
If nobody else is changing this object, you get a writable version of this object. Then you are able to change the values of the attributes of the object. Finally, you have to do a check-in to this object.  
The checkin will write the changed attributes to the database and makes the changes persistent.
+
The check-in will write the changed attributes to the database and make the changes persistent.
 
----
 
----
In addtion to the data representation, objects can also implement application behavior in form of tirggers an methods.
+
In addition to the data representation, objects can also implement application behavior in the form of triggers and methods.
There are two different kind of triggeres:
+
There are two different kind of triggers:
  
'''1)''' [[Attribute trigger]]: These triggers are fired, when an attribute is written or initiated (while the object is checked out).
+
'''1)''' [[Attribute trigger]]: These triggers are fired when an attribute is written or initiated (while the object is checked out).
  
'''2)''' [[Object trigger]]: These triggers are fired, when the whole object is checked in(saved).
+
'''2)''' [[Object trigger]]: These triggers are fired when the whole object is checked in (saved).
  
Both kink of triggers are executing so called [[Spell]] code. [[Spell]] code is a proproitary script language, which can interact with each process of ServiceDesk and is able to do addtional changes to other objects or call other object methods
+
Both kinds of triggers are executing [[Spell]] code. [[Spell]] code is a proprietary script language, which can interact with each process of ServiceDesk and is able to do additional changes to other objects or call other object methods
 
----
 
----
Addtionaly, an object may have addtional runtime attributes, like [[QREL]], [[BREL]], [[LREL]] and so called LOCAL attributes.
+
An object may have additional runtime attributes, like [[QREL]], [[BREL]], [[LREL]] and LOCAL attributes.
  
QREL, BREL and LREL Attributes can hold a list of other objects, while a LOCAL attribute is like a normal value (tablefield) attribute, but is not persistent, which means, it will not be stored in the db.
+
QREL, BREL and LREL Attributes can hold a list of other objects, while a LOCAL attribute is like a normal value (table field) attribute, but is not persistent, which means, it will not be stored in the db.

Revision as of 17:31, 21 February 2008

Mainly, an Object in Service Desk is an object-oriented representation of a single database record.

An Object belongs to a Factory, which is a mapping to one (or two) database table(s).

Normally, each field in a table is mapped to an attribute in its object representation.


Changes to attributes of an object are always done in a three step process: First, you have to check out the object. That means, you tell the system that you want to change this specific object. If nobody else is changing this object, you get a writable version of this object. Then you are able to change the values of the attributes of the object. Finally, you have to do a check-in to this object. The check-in will write the changed attributes to the database and make the changes persistent.


In addition to the data representation, objects can also implement application behavior in the form of triggers and methods. There are two different kind of triggers:

1) Attribute trigger: These triggers are fired when an attribute is written or initiated (while the object is checked out).

2) Object trigger: These triggers are fired when the whole object is checked in (saved).

Both kinds of triggers are executing Spell code. Spell code is a proprietary script language, which can interact with each process of ServiceDesk and is able to do additional changes to other objects or call other object methods


An object may have additional runtime attributes, like QREL, BREL, LREL and LOCAL attributes.

QREL, BREL and LREL Attributes can hold a list of other objects, while a LOCAL attribute is like a normal value (table field) attribute, but is not persistent, which means, it will not be stored in the db.