public abstract class AbstractFeatureStore extends Object implements FeatureStore
| Constructor and Description |
|---|
AbstractFeatureStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToGroup(String featureId,
String groupName)
Add target
Feature to target group. |
protected void |
assertFeatureExist(String uid)
Validate feature uid.
|
protected void |
assertFeatureNotExist(String uid)
Check that current feature does not exist.
|
protected void |
assertFeatureNotNull(Feature feature)
Validate feature uid.
|
protected void |
assertGroupExist(String groupName)
Validate feature uid.
|
void |
createSchema()
Initialize the target database schema by creating expected structures.
|
void |
disable(String uid)
Create Feature is does not exist and enable it.
|
void |
disableGroup(String groupName)
Disable all features contained in the following group.
|
void |
enable(String uid)
Enable/UP/switch on a FlipPoint.
|
void |
enableGroup(String groupName)
Enable all features contained in the following group.
|
boolean |
existGroup(String groupName)
Check if current group exist or not.
|
void |
grantRoleOnFeature(String flipId,
String roleName)
Add a role to a flipPOINT.
|
void |
importFeatures(Collection<Feature> features)
Import features from a set of feature.
|
Map<String,Feature> |
importFeaturesFromXmlFile(String xmlConfFile)
Initialize store from XML Configuration File.
|
Set<String> |
readAllGroups()
Return a set of existing groups.
|
Map<String,Feature> |
readGroup(String groupName)
Read all features within target group.
|
void |
removeFromGroup(String featureId,
String groupName)
Remove target
Feature from group. |
void |
removeRoleFromFeature(String flipId,
String roleName)
Remove role to acess flip point
|
String |
toJson() |
String |
toString() |
public Map<String,Feature> importFeaturesFromXmlFile(String xmlConfFile)
xmlConfFile - xml configuration filepublic void enable(String uid)
enable in interface FeatureStoreuid - unique feature identifierpublic void disable(String uid)
disable in interface FeatureStorepublic void grantRoleOnFeature(String flipId, String roleName)
grantRoleOnFeature in interface FeatureStorepublic void removeRoleFromFeature(String flipId, String roleName)
removeRoleFromFeature in interface FeatureStorepublic Map<String,Feature> readGroup(String groupName)
readGroup in interface FeatureStoregroupName - target group namepublic boolean existGroup(String groupName)
existGroup in interface FeatureStoregroupName - target group namepublic void enableGroup(String groupName)
enableGroup in interface FeatureStoregroupName - target group namepublic void disableGroup(String groupName)
disableGroup in interface FeatureStoregroupName - target group namepublic void addToGroup(String featureId, String groupName)
Feature to target group.addToGroup in interface FeatureStorefeatureId - target feature identifiergroupName - target groupNamepublic void removeFromGroup(String featureId, String groupName)
Feature from group.removeFromGroup in interface FeatureStorefeatureId - target feature identifiergroupName - target groupNamepublic Set<String> readAllGroups()
readAllGroups in interface FeatureStorepublic void createSchema()
createSchema in interface FeatureStorepublic void importFeatures(Collection<Feature> features)
importFeatures in interface FeatureStorefeatures - public String toJson()
protected void assertFeatureExist(String uid)
uid - target uidprotected void assertFeatureNotExist(String uid)
uid - current feature identifier.sprotected void assertGroupExist(String groupName)
uid - target uidprotected void assertFeatureNotNull(Feature feature)
uid - target uidCopyright © 2013–2020 FF4J. All rights reserved.