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
_wc
AWebComponent
object 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 boolean
checkUserPrivilege(int userPrivilege)
Checks whether the userPrivilege passed in granted for the current sessionvoid
flushCache()
Flushes the internal cache where resolved values of features are stored.protected WebSessionInfo
getSession()
boolean
isFeatureAvailable(java.lang.String feature)
Checks whether the feature that is passed in is supportedboolean
isFeatureAvailable(java.lang.String feature, java.lang.Object dependencyObject)
Checks whether the feature that is passed in is supportedprotected abstract boolean
resolveFeature(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
AWebComponent
object 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
- aWebComponent
object from which to get more information.- Throws:
MSTRUncheckedException
- thrown if the specifiedWebComponent
is null.
-
-
Method Detail
-
getSession
protected WebSessionInfo getSession()
- Returns:
WebSessionInfo
instance 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:
isFeatureAvailable
in interfaceWebFeatures
- Parameters:
feature
- The feature that we are checking fordependencyObject
- not used in this context- Returns:
true
if the feature is available.
-
isFeatureAvailable
public boolean isFeatureAvailable(java.lang.String feature)
Checks whether the feature that is passed in is supported- Specified by:
isFeatureAvailable
in interfaceWebFeatures
- Parameters:
feature
- The feature that we are checking for- Returns:
true
if 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
-
-