public class JdbcFeatureStore extends AbstractFeatureStore implements JdbcStoreConstants
FeatureStore to work with RDBMS through JDBC.COL_EVENT_TIME, COL_EVENT_TYPE, COL_EVENT_UID, COL_FEAT_DESCRIPTION, COL_FEAT_ENABLE, COL_FEAT_EXPRESSION, COL_FEAT_GROUPNAME, COL_FEAT_STRATEGY, COL_FEAT_UID, COL_PROPERTY_DESCRIPTION, COL_PROPERTY_FEATID, COL_PROPERTY_FIXED, COL_PROPERTY_ID, COL_PROPERTY_TYPE, COL_PROPERTY_VALUE, COL_ROLE_FEATID, COL_ROLE_ROLENAME, SQL_ADD_ROLE, SQL_ADD_TO_GROUP, SQL_AUDIT_COUNT, SQL_AUDIT_COUNTFEATURE, SQL_AUDIT_DELETE, SQL_AUDIT_FEATURE_ALLEVENTS, SQL_AUDIT_FEATURE_EVENTOK, SQL_AUDIT_INSERT, SQL_AUDIT_LISTFEATURES, SQL_CREATE, SQL_CREATE_CUSTOMPROPERTY, SQL_DELETE, SQL_DELETE_CUSTOMPROPERTIES, SQL_DELETE_CUSTOMPROPERTY, SQL_DELETE_ROLE, SQL_DISABLE, SQL_DISABLE_GROUP, SQL_ENABLE, SQL_ENABLE_GROUP, SQL_EXIST, SQL_EXIST_GROUP, SQL_GET_ALLROLES, SQL_GET_CUSTOMPROPERTIES_BYFEATUREID, SQL_GET_CUSTOMPROPERTY_BYID, SQL_GET_ROLES, SQL_PROPERTY_CREATE, SQL_PROPERTY_DELETE, SQL_PROPERTY_EXIST, SQL_PROPERTY_READ, SQL_PROPERTY_READALL, SQL_PROPERTY_UPDATE, SQL_REMOVE_FROM_GROUP, SQL_UPDATE, SQLQUERY_ALLFEATURES, SQLQUERY_ALLGROUPS, SQLQUERY_GET_FEATURE_BY_ID, SQLQUERY_GET_FEATURE_GROUP, TABLE_AUDIT| Constructor and Description |
|---|
JdbcFeatureStore()
Default Constructor.
|
JdbcFeatureStore(DataSource jdbcDS)
Constructor from DataSource.
|
JdbcFeatureStore(DataSource jdbcDS,
String xmlConfFile)
Constructor from DataSource.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToGroup(String uid,
String groupName)
Add target
Feature to target group. |
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 |
getCachedTargetStore() |
String |
getCacheProvider()
Return false.
|
DataSource |
getDataSource()
Getter accessor for attribute 'dataSource'.
|
void |
grantRoleOnFeature(String uid,
String roleName)
Add a role to a flipPOINT.
|
boolean |
isCached()
Implementation of Store to get cache.
|
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 |
setDataSource(DataSource dataSource)
Setter accessor for attribute 'dataSource'.
|
String |
toString() |
void |
update(Feature fp)
Update FlipPoint within store.
|
importFeaturesFromXmlFile, toJsonpublic JdbcFeatureStore()
public JdbcFeatureStore(DataSource jdbcDS)
jdbcDS - native jdbc datasourcepublic JdbcFeatureStore(DataSource jdbcDS, String xmlConfFile)
jdbcDS - native jdbc datasourcepublic void enable(String uid)
enable in interface FeatureStoreuid - unique feature identifierpublic void disable(String uid)
disable in interface FeatureStorepublic boolean exist(String uid)
exist in interface FeatureStorepublic Feature read(String uid)
read in interface FeatureStorepublic void create(Feature fp)
create in interface FeatureStorefp - create rolespublic void delete(String uid)
delete in interface FeatureStorepublic void grantRoleOnFeature(String uid, String roleName)
grantRoleOnFeature in interface FeatureStorepublic void removeRoleFromFeature(String uid, String roleName)
removeRoleFromFeature in interface FeatureStorepublic Map<String,Feature> readAll()
readAll in interface FeatureStorepublic Set<String> readAllGroups()
readAllGroups in interface FeatureStorepublic void update(Feature fp)
update in interface FeatureStorefp - flipPoint new elementpublic 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 Map<String,Feature> readGroup(String groupName)
readGroup in interface FeatureStoregroupName - target group namepublic void addToGroup(String uid, String groupName)
Feature to target group.addToGroup in interface FeatureStoreuid - target feature identifiergroupName - target groupNamepublic void removeFromGroup(String uid, String groupName)
Feature from group.removeFromGroup in interface FeatureStoreuid - target feature identifiergroupName - target groupNamepublic boolean isCached()
isCached in interface FeatureStorepublic String getCacheProvider()
getCacheProvider in interface FeatureStorepublic String getCachedTargetStore()
getCachedTargetStore in interface FeatureStorepublic DataSource getDataSource()
public void setDataSource(DataSource dataSource)
dataSource - new value for 'dataSource 'Copyright © 2013–2015 FF4J. All rights reserved.