[OpenVPMS Developers] [JIRA] Created: (OBF-210) Lookup replacement should provide notification

Lookup replacement should provide notification ----------------------------------------------

Key: OBF-210 URL: https://openvpms.atlassian.net/browse/OBF-210 Project: Business Framework Issue Type: Improvement Reporter: Tim Anderson Assignee: Tim Anderson Priority: Minor Fix For: 1.4-beta-1

The ILookupService.replace(Lookup source, Lookup target) method replaces uses of the source lookup with the target. The implementation for this bypasses the archetype service - any user that has registered an IArchetypeServiceListener for an archetype affected by the replacement won't receive a notification. This has implications for caching.

E.g, suppose an act.customerAppointment refers to a lookup.appointmentReason with code "X". If lookup.appointmentReason "X" is replaced with lookup.appointmentReason "Y", any listener for act.customerAppointment won't be notified of the change.

One drawback of performing notifications, is that it is potentially expensive operation. Each affected object would need to be loaded from the database in order for the notification to occur. A workaround for this would be to extend IArchetypeServiceListener to provide a "batch" listener notification which simply notifies if a batch of objects of a particular archetype have been saved. E.g: {code} interface IArchetypeServiceListener {

/** * Invoked after an object has been saved and the transaction committed. * * @param object the saved object */ void saved(IMObject object);

/** * Invoked after a batch of objects have been saved and the transaction committed. */ void batchSaved();

} {code}

-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://openvpms.atlassian.net/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

_______________________________________________ OpenVPMS Developers Mailing List developers@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/developers Posts from this mailing list can be viewed online and replied to in the OpenVPMS Developer's forum- http://tinyurl.com/openvdf

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

[OpenVPMS Developers] [JIRA] Updated: (OBF-210) Lookup replaceme

[ https://openvpms.atlassian.net/browse/OBF-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Anderson updated OBF-210: -----------------------------

Description: The ILookupService.replace(Lookup source, Lookup target) method replaces uses of the source lookup with the target. The implementation for this bypasses the archetype service - any user that has registered an IArchetypeServiceListener for an archetype affected by the replacement won't receive a notification. This has implications for caching.

E.g, suppose an act.customerAppointment refers to a lookup.appointmentReason with code "X". If lookup.appointmentReason "X" is replaced with lookup.appointmentReason "Y", any listener for act.customerAppointment won't be notified of the change.

One drawback of performing notifications, is that it is potentially expensive operation. Each affected object would need to be loaded from the database in order for the notification to occur. A workaround for this would be to extend IArchetypeServiceListener to provide a "batch" listener notification which simply notifies if a batch of objects of a particular archetype have been saved. E.g: {code} interface IArchetypeServiceListener {

/** * Invoked after an object has been saved and the transaction committed. * * @param object the saved object */ void saved(IMObject object);

/** * Invoked after a batch of objects of a particular archetype have been saved and the transaction committed. * * @param shortName the archetype short name */ void batchSaved(String shortName);

} {code}

was: The ILookupService.replace(Lookup source, Lookup target) method replaces uses of the source lookup with the target. The implementation for this bypasses the archetype service - any user that has registered an IArchetypeServiceListener for an archetype affected by the replacement won't receive a notification. This has implications for caching.

E.g, suppose an act.customerAppointment refers to a lookup.appointmentReason with code "X". If lookup.appointmentReason "X" is replaced with lookup.appointmentReason "Y", any listener for act.customerAppointment won't be notified of the change.

One drawback of performing notifications, is that it is potentially expensive operation. Each affected object would need to be loaded from the database in order for the notification to occur. A workaround for this would be to extend IArchetypeServiceListener to provide a "batch" listener notification which simply notifies if a batch of objects of a particular archetype have been saved. E.g: {code} interface IArchetypeServiceListener {

/** * Invoked after an object has been saved and the transaction committed. * * @param object the saved object */ void saved(IMObject object);

/** * Invoked after a batch of objects have been saved and the transaction committed. */ void batchSaved();

} {code}

> Lookup replacement should provide notification > ---------------------------------------------- > > Key: OBF-210 > URL: https://openvpms.atlassian.net/browse/OBF-210 > Project: Business Framework > Issue Type: Improvement > Reporter: Tim Anderson > Assignee: Tim Anderson > Priority: Minor > Fix For: 1.4-beta-1 > > > The ILookupService.replace(Lookup source, Lookup target) method replaces uses of the source lookup with the target. > The implementation for this bypasses the archetype service - any user that has registered an IArchetypeServiceListener for an archetype affected by the replacement won't receive a notification. > This has implications for caching. > E.g, suppose an act.customerAppointment refers to a lookup.appointmentReason with code "X". > If lookup.appointmentReason "X" is replaced with lookup.appointmentReason "Y", any listener for act.customerAppointment won't be notified of the change. > One drawback of performing notifications, is that it is potentially expensive operation. Each affected object would need to be loaded from the database in order for the notification to occur. > A workaround for this would be to extend IArchetypeServiceListener to provide a "batch" listener notification which simply notifies if a batch of objects of a particular archetype have been saved. > E.g: > {code} > interface IArchetypeServiceListener { > > /** > * Invoked after an object has been saved and the transaction committed. > * > * @param object the saved object > */ > void saved(IMObject object); > > /** > * Invoked after a batch of objects of a particular archetype have been saved and the transaction committed. > * > * @param shortName the archetype short name > */ > void batchSaved(String shortName); > } > {code}

-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://openvpms.atlassian.net/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

_______________________________________________ OpenVPMS Developers Mailing List developers@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/developers Posts from this mailing list can be viewed online and replied to in the OpenVPMS Developer's forum- http://tinyurl.com/openvdf

[OpenVPMS Developers] [JIRA] Updated: (OBF-210) Lookup replaceme

[ https://openvpms.atlassian.net/browse/OBF-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Anderson updated OBF-210: -----------------------------

Affects Version/s: 1.4-beta-1 Fix Version/s: (was: 1.4-beta-1)

> Lookup replacement should provide notification > ---------------------------------------------- > > Key: OBF-210 > URL: https://openvpms.atlassian.net/browse/OBF-210 > Project: Business Framework > Issue Type: Improvement > Affects Versions: 1.4-beta-1 > Reporter: Tim Anderson > Assignee: Tim Anderson > Priority: Minor > > The ILookupService.replace(Lookup source, Lookup target) method replaces uses of the source lookup with the target. > The implementation for this bypasses the archetype service - any user that has registered an IArchetypeServiceListener for an archetype affected by the replacement won't receive a notification. > This has implications for caching. > E.g, suppose an act.customerAppointment refers to a lookup.appointmentReason with code "X". > If lookup.appointmentReason "X" is replaced with lookup.appointmentReason "Y", any listener for act.customerAppointment won't be notified of the change. > One drawback of performing notifications, is that it is potentially expensive operation. Each affected object would need to be loaded from the database in order for the notification to occur. > A workaround for this would be to extend IArchetypeServiceListener to provide a "batch" listener notification which simply notifies if a batch of objects of a particular archetype have been saved. > E.g: > {code} > interface IArchetypeServiceListener { > > /** > * Invoked after an object has been saved and the transaction committed. > * > * @param object the saved object > */ > void saved(IMObject object); > > /** > * Invoked after a batch of objects of a particular archetype have been saved and the transaction committed. > * > * @param shortName the archetype short name > */ > void batchSaved(String shortName); > } > {code}

-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://openvpms.atlassian.net/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

_______________________________________________ OpenVPMS Developers Mailing List developers@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/developers Posts from this mailing list can be viewed online and replied to in the OpenVPMS Developer's forum- http://tinyurl.com/openvdf

Syndicate content