Class MediaEntity

    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • CONFIG_TABLE_CONTENT_SOURCE_CONNECTION_INFO

        public static final java.lang.String CONFIG_TABLE_CONTENT_SOURCE_CONNECTION_INFO
        See Also:
        Constant Field Values
      • NO_CACHE_HEADER_CHECKBOX

        public static final java.lang.String NO_CACHE_HEADER_CHECKBOX
        See Also:
        Constant Field Values
      • CACHE_HEADER_NAME

        public static final java.lang.String CACHE_HEADER_NAME
        See Also:
        Constant Field Values
      • NO_CACHE_HEADER_VALUE

        public static final java.lang.String NO_CACHE_HEADER_VALUE
        See Also:
        Constant Field Values
      • IGNORE_SSL_ERRORS

        public static final java.lang.String IGNORE_SSL_ERRORS
        See Also:
        Constant Field Values
      • SSL_CONFIG_TABLE

        public static final java.lang.String SSL_CONFIG_TABLE
        See Also:
        Constant Field Values
      • SSL_KEYSTORE_PATH

        public static final java.lang.String SSL_KEYSTORE_PATH
        See Also:
        Constant Field Values
      • SSL_KEYSTORE_PASSWORD

        public static final java.lang.String SSL_KEYSTORE_PASSWORD
        See Also:
        Constant Field Values
      • SSL_TRUSTSTORE_PATH

        public static final java.lang.String SSL_TRUSTSTORE_PATH
        See Also:
        Constant Field Values
      • SSL_TRUSTSTORE_PASSWORD

        public static final java.lang.String SSL_TRUSTSTORE_PASSWORD
        See Also:
        Constant Field Values
      • SESSION_USER_QUERY_PARAMETER

        public static final java.lang.String SESSION_USER_QUERY_PARAMETER
        See Also:
        Constant Field Values
      • POST_PROXY_HEADERS_TO_FORWARD

        public static final java.lang.String POST_PROXY_HEADERS_TO_FORWARD
        See Also:
        Constant Field Values
      • SESSION_USER_CONFIGURATION_TABLE

        public static final java.lang.String SESSION_USER_CONFIGURATION_TABLE
        See Also:
        Constant Field Values
      • AUTHORIZATION_SERVER_ID

        public static final java.lang.String AUTHORIZATION_SERVER_ID
        See Also:
        Constant Field Values
      • AUTHENTICATION_TYPE

        public static final java.lang.String AUTHENTICATION_TYPE
        See Also:
        Constant Field Values
      • AUTHENTICATION_TYPE_NONE

        public static final java.lang.String AUTHENTICATION_TYPE_NONE
        See Also:
        Constant Field Values
      • AUTHENTICATION_TYPE_BASIC

        public static final java.lang.String AUTHENTICATION_TYPE_BASIC
        See Also:
        Constant Field Values
      • AUTHENTICATION_TYPE_SSO

        public static final java.lang.String AUTHENTICATION_TYPE_SSO
        See Also:
        Constant Field Values
      • AUTHENTICATION_TYPE_SESSION_USER

        public static final java.lang.String AUTHENTICATION_TYPE_SESSION_USER
        See Also:
        Constant Field Values
      • CONFIGURATION_SCOPE_TABLE_NAME

        public static final java.lang.String CONFIGURATION_SCOPE_TABLE_NAME
        See Also:
        Constant Field Values
      • FLOW_CONNECTOR_CONFIGURATION

        public static final java.lang.String FLOW_CONNECTOR_CONFIGURATION
        See Also:
        Constant Field Values
      • FLOW_CONNECTION_NAME

        public static final java.lang.String FLOW_CONNECTION_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • MediaEntity

        public MediaEntity()
    • Method Detail

      • GetImage

        @ThingworxExtensionApiMethod(since={6,6})
        public byte[] GetImage()
                        throws java.lang.Exception
        Service Category:
        Images
        Service Description:
        Get the content as an image.
        Returns:
        result Image content - IMAGE
        Throws:
        java.lang.Exception - If an error occurs
      • GetMimeType

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String GetMimeType()
                                     throws java.lang.Exception
        Service Category:
        Images
        Service Description:
        Get the mime type.
        Returns:
        result Image mime type - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • GetProxyUrl

        @ThingworxExtensionApiMethod(since={7,4},
                                     deprecatedSince={8,5})
        @Deprecated
        public java.lang.String GetProxyUrl​(java.lang.String targetUrl,
                                            java.lang.Boolean isAbsoluteTargetUrl)
                                     throws java.lang.Exception
        Deprecated.
        As of release 8.5.0, replaced by GetProxyUrl(String, Boolean, Boolean)


        Parameters:
        targetUrl - Actual URL of content to stream. Must be under the configured origin server
        isAbsoluteTargetUrl - Is the provided target URL an absolute URL or relative.
        Returns:
        proxy URL to remote content
        Throws:
        java.lang.Exception
      • GetProxyUrl

        @ThingworxExtensionApiMethod(since={8,5})
        public java.lang.String GetProxyUrl​(java.lang.String targetUrl,
                                            java.lang.Boolean isAbsoluteTargetUrl,
                                            java.lang.Boolean clientFollowsRedirect)
                                     throws java.lang.Exception
        Service Category:
        Images
        Service Description:
        Get a URL to proxy content relative to the configured origin server.
        Parameters:
        targetUrl - Actual URL of content to stream. Must be under the configured origin server - STRING
        isAbsoluteTargetUrl - Is the provided target URL an absolute URL or relative. - BOOLEAN
        clientFollowsRedirect - If the response of the proxied URL is of redirect type, then whether the client should call the redirected url or media entity.Set this flag value to true if client should follow the redirect rather than Media Entity - BOOLEAN
        Returns:
        result proxy URL to remote content - STRING
        Throws:
        java.lang.Exception - If an error occurs