Introduce KeyStore Persistence Manager Factory implementation #4148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Introduce KeyStore Persistence Manager Factory implementation
Introduce a config to select keystore persistence manager(weather keystore data stores in database or registry). ATM we only have registry implementation. So always use registry as the keystore persistence manager.
Details
This pull request involves significant changes to the KeyStore management system in the WSO2 Carbon project. The main focus is on refactoring the KeyStore persistence mechanism to use a factory pattern and updating the relevant imports and usages throughout the codebase.
Key changes include:
Refactoring KeyStore Persistence
KeyStoreManager.java
: ReplacedRegistryKeyStorePersistenceManager
withKeyStorePersistenceManager
and updated the initialization to useKeyStorePersistenceManagerFactory
. This change affects multiple methods within the class. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Package and Import Adjustments
pom.xml
incore/org.wso2.carbon.core
: Removedorg.wso2.carbon.core.keystore.persistence
from the export package list.pom.xml
incore/org.wso2.carbon.utils
: Updated to include new package paths forkeystore.persistence
and its sub-packages. [1] [2]New and Renamed Files
KeyStorePersistenceManagerFactory.java
: Introduced a new factory class to provide the appropriateKeyStorePersistenceManager
based on configuration.PersistenceManagerConstants.java
: Renamed and moved to a new packageconstant
.RegistryKeyStorePersistenceManager.java
: Renamed and moved to a new packageimpl
. [1] [2]