public class InMemoryFeatureStore extends AbstractFeatureStore
| Constructor and Description |
|---|
InMemoryFeatureStore()
Default constructor.
|
InMemoryFeatureStore(InputStream xmlIN)
Constructor with inputstream fileName.
|
InMemoryFeatureStore(Map<String,Feature> maps)
Constructor with full set of feature.
|
InMemoryFeatureStore(String fileName)
Constructor with configuration fileName.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToGroup(String uid,
String groupName)
Add target
Feature to target group. |
void |
clear()
Empty features set.
|
void |
create(Feature fp)
Create flipPoint in storage (with roles).
|
void |
delete(String uid)
Remove fliPoint from store.
|
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 |
exist(String uid)
Check if Feature Exist.
|
boolean |
existGroup(String groupName)
Check if current group exist or not.
|
String |
getFileName()
Getter accessor for attribute 'fileName'.
|
void |
grantRoleOnFeature(String uid,
String roleName)
Add a role to a flipPOINT.
|
Feature |
read(String uid)
Create Feature is does not exist and enable it.
|
Map<String,Feature> |
readAll()
Access to all features to get information.
|
Set<String> |
readAllGroups()
Return a set of existing groups.
|
Map<String,Feature> |
readGroup(String groupName)
Read all features within target group.
|
void |
removeFromGroup(String uid,
String groupName)
Remove target
Feature from group. |
void |
removeRoleFromFeature(String uid,
String roleName)
Remove role to acess flip point
|
void |
setLocation(String locations)
Setter accessor for attribute 'locations'.
|
String |
toJson() |
void |
update(Feature fp)
Update FlipPoint within store.
|
assertFeatureExist, assertFeatureNotExist, assertFeatureNotNull, assertGroupExist, createSchema, importFeatures, importFeaturesFromXmlFile, toStringpublic InMemoryFeatureStore()
public InMemoryFeatureStore(String fileName)
fileName - fileName present in classPath or on fileSystem.public InMemoryFeatureStore(InputStream xmlIN)
fileName - fileName present in classPath or on fileSystem.public void create(Feature fp)
fp - create rolespublic void update(Feature fp)
fp - flipPoint new elementpublic void delete(String uid)
public void grantRoleOnFeature(String uid, String roleName)
grantRoleOnFeature in interface FeatureStoregrantRoleOnFeature in class AbstractFeatureStorepublic void removeRoleFromFeature(String uid, String roleName)
removeRoleFromFeature in interface FeatureStoreremoveRoleFromFeature in class AbstractFeatureStorepublic boolean exist(String uid)
public void enable(String uid)
enable in interface FeatureStoreenable in class AbstractFeatureStoreuid - unique feature identifierpublic void disable(String uid)
disable in interface FeatureStoredisable in class AbstractFeatureStorepublic boolean existGroup(String groupName)
existGroup in interface FeatureStoreexistGroup in class AbstractFeatureStoregroupName - target group namepublic void enableGroup(String groupName)
enableGroup in interface FeatureStoreenableGroup in class AbstractFeatureStoregroupName - target group namepublic void disableGroup(String groupName)
disableGroup in interface FeatureStoredisableGroup in class AbstractFeatureStoregroupName - target group namepublic Map<String,Feature> readGroup(String groupName)
readGroup in interface FeatureStorereadGroup in class AbstractFeatureStoregroupName - target group namepublic Set<String> readAllGroups()
readAllGroups in interface FeatureStorereadAllGroups in class AbstractFeatureStorepublic void addToGroup(String uid, String groupName)
Feature to target group.addToGroup in interface FeatureStoreaddToGroup in class AbstractFeatureStoreuid - target feature identifiergroupName - target groupNamepublic void removeFromGroup(String uid, String groupName)
Feature from group.removeFromGroup in interface FeatureStoreremoveFromGroup in class AbstractFeatureStoreuid - target feature identifiergroupName - target groupNamepublic void clear()
public Map<String,Feature> readAll()
public String toJson()
toJson in class AbstractFeatureStorepublic void setLocation(String locations)
locations - new value for 'locations 'public String getFileName()
Copyright © 2013–2020 FF4J. All rights reserved.