Package com.onenetwork.platform.features
Interface SubscribedFeaturesService
- All Superinterfaces:
Service
public interface SubscribedFeaturesService extends Service
FeatureService is an api that verify if a the feature enabled for a given user context.
Two methods are provided:
isSubscribedToFeature verifies if a specific feature is currently subscribed
getSubscribedFeatures returns the list of features currently subscribed
A typical use case would look something like below:
PlatformUserContext platformUserContext = Services.get(PlatformUserContext.class); if(featureService.isSubscribedToFeature("TMS.Scheduling", platformUserContext)) { LOG.Info("Scheduling shipment"); ... }
-
Method Summary
Modifier and Type Method Description java.util.Set<java.lang.String>
getSubscribedFeatures(PlatformUserContext context)
Returns a list of features subscribed by the enterprise in the provided contextboolean
isSubscribedToFeature(java.lang.String feature, PlatformUserContext context)
Verifies if the feature provided is subscribed by the enterprise in provided context
-
Method Details
-
isSubscribedToFeature
Verifies if the feature provided is subscribed by the enterprise in provided context -
getSubscribedFeatures
Returns a list of features subscribed by the enterprise in the provided context
-