pkp / texture

Texture JATS XML editor integration for OJS
GNU General Public License v3.0
23 stars 18 forks source link

Reusability of handler helper methods #33

Open ctgraham opened 5 years ago

ctgraham commented 5 years ago

Methods TextureHandler::_createDependentFile() and TextureHandler::_updateManuscriptFile() seem reusable enough that they could be methods of the Plugin, or even of SubmissionFileManager.

For example, for #32, we would want a plugin hook to potentially do both of these things. There would be no need to reach out to a Handler.

@withanage , @asmecher , opinions on whether to promote these methods to the plugin or to SubmissionFileManager? Are there assumptions or specifics I'm missing here which limit the reusability of this code?

ctgraham commented 5 years ago

Also, this transformation of mime type to genre: probably not robust enough for GenreDAO, but should we stub it out in that direction? https://github.com/pkp/texture/blob/bbac9e8e3300ab4aebfc12b096033d1a24bbf45c/TextureHandler.inc.php#L177-L199

ctgraham commented 5 years ago

Concrete example (if we want to keep it to the plugin): https://github.com/ulsdevteam/texture/commit/b461f23ec7a22f93d016a95031f3ba409271b603