Package com.microstrategy.web.beans
Class AbstractWebFeatures
- java.lang.Object
-
- com.microstrategy.web.beans.AbstractWebFeatures
-
- All Implemented Interfaces:
WebFeatures
- Direct Known Subclasses:
AbstractAppWebFeatures,AggregatedWebFeatures,DefaultViewBeanFeaturesImpl,ThresholdEditorBeanFeaturesImpl
public abstract class AbstractWebFeatures extends java.lang.Object implements WebFeatures
This acts as the base for all classes implementing feature support resolution. Any derived classes are expected to implement the resolveFeature method to indicate whether a specific feature is supported. Each feature is identified by a String name fromEnumWebFeatures- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description protected WebComponent_wcAWebComponentobject from which to get more information.
-
Constructor Summary
Constructors Constructor Description AbstractWebFeatures()Default constructor.AbstractWebFeatures(WebComponent wc)Constructor with the specifiedWebComponent.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancheckUserPrivilege(int userPrivilege)Checks whether the userPrivilege passed in granted for the current sessionvoidflushCache()Flushes the internal cache where resolved values of features are stored.protected WebSessionInfogetSession()booleanisFeatureAvailable(java.lang.String feature)Checks whether the feature that is passed in is supportedbooleanisFeatureAvailable(java.lang.String feature, java.lang.Object dependencyObject)Checks whether the feature that is passed in is supportedprotected abstract booleanresolveFeature(java.lang.String feature)Derived classes are expected to implement this method to indicate whether the feature is supported
-
-
-
Field Detail
-
_wc
protected WebComponent _wc
AWebComponentobject from which to get more information.
-
-
Constructor Detail
-
AbstractWebFeatures
public AbstractWebFeatures()
Default constructor.
-
AbstractWebFeatures
public AbstractWebFeatures(WebComponent wc) throws MSTRUncheckedException
Constructor with the specifiedWebComponent.- Parameters:
wc- aWebComponentobject from which to get more information.- Throws:
MSTRUncheckedException- thrown if the specifiedWebComponentis null.
-
-
Method Detail
-
getSession
protected WebSessionInfo getSession()
- Returns:
WebSessionInfoinstance available for this features implementation, from where privileges can be tested from- Since:
- MicroStrategy Web 9.0.0
-
checkUserPrivilege
protected boolean checkUserPrivilege(int userPrivilege)
Checks whether the userPrivilege passed in granted for the current session- Parameters:
userPrivilege-- Returns:
- whether the userPrivilege passed in granted for the current session
-
isFeatureAvailable
public boolean isFeatureAvailable(java.lang.String feature, java.lang.Object dependencyObject)Checks whether the feature that is passed in is supported- Specified by:
isFeatureAvailablein interfaceWebFeatures- Parameters:
feature- The feature that we are checking fordependencyObject- not used in this context- Returns:
trueif the feature is available.
-
isFeatureAvailable
public boolean isFeatureAvailable(java.lang.String feature)
Checks whether the feature that is passed in is supported- Specified by:
isFeatureAvailablein interfaceWebFeatures- Parameters:
feature- The feature that we are checking for- Returns:
trueif the feature is available.
-
flushCache
public void flushCache()
Flushes the internal cache where resolved values of features are stored.- Since:
- MicroStrategy Web 8.0.1
-
resolveFeature
protected abstract boolean resolveFeature(java.lang.String feature)
Derived classes are expected to implement this method to indicate whether the feature is supported- Parameters:
feature- the feature to check for- Returns:
- boolean indicating whether the feature is supported
-
-