Bug #12825

Refactor duplicated code in Actor and Information Object models, and Elasticsearch plugin classes

Added by Steve Breker over 2 years ago.

Status:NewStart date:02/18/2019
Priority:LowDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Google Code Legacy ID: Tested version:2.5
Sponsored:No Requires documentation:

Description

1) There is code to do with digital objects that is very close to identical in both QubitActor.class.php and QubitInformationObject.class.php. It would be desirable to refactor this code so that generic versions of the following class methods are removed to QubitObject.class.php:

QubitActor::getDigitalObjectLink()
QubitActor::importDigitalObjectFromBase64()
QubitActor::importDigitalObjectFromUri()

and

QubitInformationObject::getDigitalObjectLink()
QubitInformationObject::importDigitalObjectFromBase64()
QubitInformationObject::importDigitalObjectFromUri()

2) Similarly, there is code that is nearly identical the ES indexing plugin that could be moved to a common location:
arElasticSearchActorPdo::getProperty()
arElasticSearchIInformationObjectPdo::getProperty()

arElasticSearchPluginUtil could be a place to stash getProperty, given that it doesn't access $this.

Also available in: Atom PDF