Changes between Version 1 and Version 2 of TestManagerForTracPluginGenericClass


Ignore:
Timestamp:
Jan 4, 2011, 5:32:58 PM (13 years ago)
Author:
Roberto Longobardi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TestManagerForTracPluginGenericClass

    v1 v2  
    2020 * The '''!AbstractVariableFieldsObject''' base class, providing most object features. Inheriting from this class is a matter of a few lines of code, and will provide your objects with the features outlined above.
    2121
    22  * The '''!IConcreteClassProvider''' interface, allowing your plugin to register your classes with the framework, participate in the framework's objects factory and provide custom security.
     22 * The '''IConcreteClassProvider''' interface, allowing your plugin to register your classes with the framework, participate in the framework's objects factory and provide custom security.
    2323
    2424 * The '''!GenericClassModelProvider''' component, providing the objects factory, managing concrete class providers and handling metadata about custom classes and their fields.
     
    147147[[BR]][[BR]]
    148148Well, actually before being able to use our new class, we must:
    149  * '''Define our concrete class provider''', implementing the '''!IConcreteClassProvider''' interface, and
     149 * '''Define our concrete class provider''', implementing the '''IConcreteClassProvider''' interface, and
    150150 * '''Declare the data model''' to be created into the Trac DB.
    151151
     
    251251Then here comes the declaration of the database schema, class fields and class metadata, to be later returned in the corresponding methods of the interface.
    252252
    253 Following is the '''!IConcreteClassProvider interface''' documentation, which is pretty explanatory about the format and meaning of the required data.
     253Following is the '''IConcreteClassProvider interface''' documentation, which is pretty explanatory about the format and meaning of the required data.
    254254
    255255{{{
     
    353353}}}
    354354
    355 For what concerns the '''!IEnvironmentSetupParticipant interface''' implementation, it is really straightforward, in that the framework provides utility methods that, reading the schema declared in the above section:
     355For what concerns the '''IEnvironmentSetupParticipant interface''' implementation, it is really straightforward, in that the framework provides utility methods that, reading the schema declared in the above section:
    356356 * Determine whether a database upgrade is needed, checking the availability of the tables and the columns as declared. This is achieved through the utility method {{{need_db_upgrade()}}}.
    357357 * Perform the database upgrade if required. This is achieved through the utility method {{{upgrade_db()}}}. '''Note:''' only creating all the tables is currently supported, not altering existing tables (for example due to your plugin database schema changing between versions).
    358358
    359359[[BR]]
    360 == !IGenericObjectChangeListener - Registering listeners to objects lifecycle events ==
     360== IGenericObjectChangeListener - Registering listeners to objects lifecycle events ==
    361361
    362362Every class inheriting from !AbstractVariableFieldsObject supports a listener interface for components interested in objects' lifecycle events.
    363363
    364 To register a listener for any particular class type, i.e. "realm", your component must implement the {{{!IGenericObjectChangeListener}}} from the {{{tracgenericclass.api}}} package.
     364To register a listener for any particular class type, i.e. "realm", your component must implement the {{{IGenericObjectChangeListener}}} from the {{{tracgenericclass.api}}} package.
    365365
    366366Following is the documentation from the interface itself.
     
    381381}}}
    382382
    383 
    384 
    385 
     383[[BR]]
     384The object that has just been created, modified or deleted is passed along with the methods in the interface.
     385
     386You can extract basic information about the object as follows:
     387
     388 * The object's type can be retrieved from the {{{realm}}} field:
     389{{{
     390object_realm = g_object.realm
     391}}}
     392
     393 * The information in the "special fields" as described above.
     394
     395