[
http://jira.amdatu.org/jira/browse/AMDATU-207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivo Ladage - van Doorn reopened AMDATU-207:
-------------------------------------------
What I mean is:
These classes are identical (but the naming):
org.amdatu.core.tenantstore.fs.internal.FSTenantIdList
org.amdatu.core.useradminstore.fs.internal.FSRoleNameList
org.amdatu.authentication.oauth.consumerregistry.fs.internal.ConsumerKeyList
The 'FSUtil' was copied among FSUserAdmin and FSTenantStore, but when
implementing the FSConsumerRegistryImpl I already added an FSUtil to the
libraries bundle which should be used instead (so
org.amdatu.core.useradminstore.fs.internal.FSUtil should be removed)
These classes are also identical except for the read and write methods:
org.amdatu.authentication.oauth.consumerregistry.fs.internal.FSConsumerStore
org.amdatu.core.tenantstore.fs.internal.FSTenantStore
org.amdatu.core.useradminstore.fs.internal.FSRoleStorage
Finally, many methods in these classes are identical (setDataDirectory,
getStorageFile, updated but also CRUD methods are quite similar):
org.amdatu.core.tenantstore.fs.service.FSTenantStorageProvider
org.amdatu.authentication.oauth.consumerregistry.fs.service.FSConsumerRegistryImpl
org.amdatu.core.useradminstore.fs.service.FSUserAdminStorageProvider
So when a new FS based implementation is created, a developer would probably
(like I did for the consumer registry) copy the classes FSTenantStore,
FSTenantStorageProvider and FSTenantIdList and then modify naming of methods
and variables a bit. That proves that this implementation contains a lot of
code duplication, which is a bad thing.
> Refactor Filebase storage bundles to prevent code duplication
> -------------------------------------------------------------
>
> Key: AMDATU-207
> URL: http://jira.amdatu.org/jira/browse/AMDATU-207
> Project: Amdatu
> Issue Type: Task
> Components: Amdatu Persistence
> Affects Versions: 0.1.0
> Reporter: Ivo Ladage - van Doorn
> Assignee: Ivo Ladage - van Doorn
> Fix For: 0.1.0
>
>
> In the current FS based implementations (i.e. FSTenantStore and
> FSStorageAdminStorageProvider) a lot of code is duplicated among different
> bundles. This should be refactored in such a way that any FS storage can use
> some shared code to quickly implement a FS store, without code duplication.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira