Class AbstractWebFeatures

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected WebComponent _wc
      A WebComponent object from which to get more information.
    • 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 session
      void 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 supported
      boolean isFeatureAvailable​(java.lang.String feature, java.lang.Object dependencyObject)
      Checks whether the feature that is passed in is supported
      protected abstract boolean resolveFeature​(java.lang.String feature)
      Derived classes are expected to implement this method to indicate whether the feature is supported
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _wc

        protected WebComponent _wc
        A WebComponent object from which to get more information.
    • Constructor Detail

      • AbstractWebFeatures

        public AbstractWebFeatures()
        Default constructor.
      • AbstractWebFeatures

        public AbstractWebFeatures​(WebComponent wc)
                            throws MSTRUncheckedException
        Constructor with the specified WebComponent.
        Parameters:
        wc - a WebComponent object from which to get more information.
        Throws:
        MSTRUncheckedException - thrown if the specified WebComponent 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 interface WebFeatures
        Parameters:
        feature - The feature that we are checking for
        dependencyObject - 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 interface WebFeatures
        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