Interface SourceLookup


  • public interface SourceLookup
    The SourceLookup interface assists StyleCatalog to resolve FormalParameter with dynamic sources such as preferences etc.
    Since:
    MicroStrategy Web 8.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SOURCE_CONSTANT
      A constant key used to look up a constant SourceLookup.
      static java.lang.String SOURCE_PREFERENCE
      A constant key used to look up a preference SourceLookup.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object getValue​(java.lang.String source, java.lang.String key, int paramType, StyleRequestContext context)
      Returns the value from the specified source.
      boolean hasValue​(java.lang.String source, java.lang.String key, int paramType, StyleRequestContext context)
      Returns whether the specified source contains a value for the specified key and parameter type.
    • Field Detail

      • SOURCE_CONSTANT

        static final java.lang.String SOURCE_CONSTANT
        A constant key used to look up a constant SourceLookup.
        See Also:
        Constant Field Values
      • SOURCE_PREFERENCE

        static final java.lang.String SOURCE_PREFERENCE
        A constant key used to look up a preference SourceLookup.
        See Also:
        Constant Field Values
    • Method Detail

      • hasValue

        boolean hasValue​(java.lang.String source,
                         java.lang.String key,
                         int paramType,
                         StyleRequestContext context)
        Returns whether the specified source contains a value for the specified key and parameter type.
        Parameters:
        source - the source name of a SourceLookup object
        key - the key used by the SourceLookup to resolve the dynamic value
        paramType - the parameter type defined in FormalParameter
        context - the StyleRequestContext object to resolve dynamic values.
        Returns:
        True if the is a value for the specified key and type.
      • getValue

        java.lang.Object getValue​(java.lang.String source,
                                  java.lang.String key,
                                  int paramType,
                                  StyleRequestContext context)
                           throws WebTransformException
        Returns the value from the specified source.
        Parameters:
        source - the source name of a SourceLookup object
        key - the key used by the SourceLookup to resolve the dynamic value
        paramType - the parameter type defined in FormalParameter
        context - the StyleRequestContext object to resolve dynamic values.
        Returns:
        the value from the specified source.
        Throws:
        WebTransformException - thrown if there is any error when looking up the dynamic value