Interface DataSource


  • public interface DataSource
    The DataSource interface represents a single Data Source, which represents the settings for a 2- or 3-tier connection. DataSource objects can be obtained and created from the DataSourceEnumerator interface. The name and connection type of a DataSource object is set upon creation, and cannot be changed. Note that any changes made to the DataSource object will not take place until either the save method on the DataSourceEnumerator interface or the save method on this interface is called.
    Since:
    MicroStrategy Web 7.5.2
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void changePassword​(java.lang.String newP)
      This method changes the password to the newly set password on the Intelligence Server which this data source points to.
      void clearKeyValues()
      Clears all key values from the key values collection.
      WebIServerSession createSession()
      Creates a 4-tier session using the parameters set on this interface.
      int getApplicationType()
      Returns the application type set on the DataSource, from EnumDSSXMLApplicationType.}
      int getAuthMode()
      Returns the current setting of the AuthMode parameter.
      int getAvailableAuthModes()
      Returns the list of available auth modes, based on the type of the DataSource.
      java.lang.String getCacheSetting​(int settingType)
      This method will return the current setting for the given cache setting type.
      java.lang.String getClientID()
      Returns the identifier that will be sent to the IntelligenceServer upon calling createSession, which identifies the IP address of the XMLAPI machine.
      java.lang.String getConfigurationID()
      Returns the current value of the configuration ID property of the DataSource.
      java.lang.String getConfigurationName()
      Returns the configuration name property of the DataSource.
      int getConnectionType()
      Returns the connection type of the data source.
      int getDBType()
      Returns the DB type property set on the DataSource.
      int getFlags()
      Returns the flags property of the DataSource.
      int getInternalProjectID()
      Returns the internal project ID set on the DataSource.
      java.lang.String getKeyValue​(java.lang.String key)
      Returns the key value with the given name in the key value collection.
      java.lang.String[] getKeyValueNames()
      Returns the names of all currently existing key values.
      java.util.Locale getLocale()
      Returns the locale property of the DataSource
      java.lang.String getLocation()
      Returns the location property on the DataSource.
      java.lang.String getLogin()
      Returns the login parameter of the DataSource.
      java.lang.String getMDLogin()
      Returns the MD login parameter of the DataSource.
      int getMDVersion()
      Returns the metadata version set on the DataSource.
      java.lang.String getName()
      Returns the name of the data source.
      int getPort()
      Returns the port property of the DataSource.
      java.lang.String getProjectID()
      Returns the project ID set on the DataSource.
      java.lang.String getProjectName()
      Returns the project name set on the DataSource.
      java.lang.String getServerInstanceID()
      Returns the current setting of the server instance ID of the DataSource.
      java.lang.String getServerInstanceName()
      Returns the current setting of the server instance name property of the DataSource.
      int getServerVersion()
      Returns the server version property.
      int getSessionFlags()
      Returns the current session flags property on the DataSource.
      int getTimeout()
      Returns the timeout property of the DataSource.
      java.lang.String getWHLogin()
      Returns the current value of the WH login property of the DataSource.
      boolean isHidden()
      Returns whether the DataSource is hidden.
      void removeKeyValue​(java.lang.String key)
      Removes the given key value from the list of key values.
      void save()
      Saves any changes to this data source object back to the registry.
      void setApplicationType​(int type)
      Sets the application type of the DataSource.
      void setAuthMode​(int mode)
      Sets the AuthMode parameter of the DataSource.
      void setCacheSetting​(int settingType, java.lang.String settingValue)
      Sets the given cache setting to the given value.
      void setClientID​(java.lang.String clientID)
      Sets the identifier that will be sent to the IntelligenceServer upon calling createSession, which identifies the IP address of the XMLAPI machine.
      void setConfigurationID​(java.lang.String id)
      Sets the configuration ID property of the DataSource.
      void setConfigurationName​(java.lang.String name)
      Sets the configuration name property of the DataSource.
      void setDBType​(int type)
      Sets the DB type property.
      void setFlags​(int flags)
      Sets the flags on the DataSource.
      void setHidden​(boolean hidden)
      Sets the hidden flag of the DataSource.
      void setInternalProjectID​(int id)
      Sets the internal project ID on the DataSource.
      void setKeyValue​(java.lang.String key, java.lang.String val)
      Sets a key value with the given name.
      void setLocale​(java.util.Locale locale)
      Sets the locale property of the DataSource.
      void setLocation​(java.lang.String location)
      Sets the location property on the DataSource.
      void setLogin​(java.lang.String l)
      Sets the login parameter of the DataSource.
      void setMDLogin​(java.lang.String l)
      Sets the MD login parameter of the DataSource.
      void setMDPasswd​(java.lang.String p)
      Sets the MD password parameter of the DataSource.
      void setMDVersion​(int version)
      Sets the metadata version on the DataSource.
      void setPasswd​(java.lang.String p)
      Sets the password on the DataSource.
      void setPort​(int port)
      Sets the port property of the DataSource.
      void setProjectID​(java.lang.String id)
      Sets the project ID on the DataSource.
      void setProjectName​(java.lang.String name)
      Sets the project name on the DataSource.
      void setServerInstanceID​(java.lang.String id)
      Sets the server instance ID on the DataSource.
      void setServerInstanceName​(java.lang.String name)
      Sets the server instance name of the DataSource.
      void setServerVersion​(int version)
      Sets the server version on the data source.
      void setSessionFlags​(int flags)
      Sets the session flags on the DataSource.
      void setTimeout​(int timeout)
      Sets the timeout property of the DataSource.
      void setUseSSL​(boolean _useSSL)
      Sets useSSL flag which identifies whether to use secure connection.
      void setWHLogin​(java.lang.String l)
      Sets the WH login property of the DataSource.
      void setWHPasswd​(java.lang.String p)
      Sets the WH password property of the DataSource.
      boolean useSSL()
      Returns useSSL flag.
    • Method Detail

      • getName

        java.lang.String getName()
        Returns the name of the data source.
        Returns:
        The name of the data source object.
      • save

        void save()
           throws WebObjectsAdminException
        Saves any changes to this data source object back to the registry. Note that if the object has been removed from the owner DataSourceEnumerator, then this call will fail.
        Throws:
        WebObjectsAdminException - Thrown if an error occurs when saving.
        java.lang.UnsupportedOperationException - Thrown if the data source has been removed from the parent enumerator.
      • getMDVersion

        int getMDVersion()
        Returns the metadata version set on the DataSource.
        Returns:
        The metadata version set on the DataSource, from EnumDSSXMLMDVersion.
      • setMDVersion

        void setMDVersion​(int version)
        Sets the metadata version on the DataSource.
        Parameters:
        version - The metadata version to set on the DataSource, from EnumDSSXMLMDVersion.
      • getLocation

        java.lang.String getLocation()
        Returns the location property on the DataSource.
        Returns:
        The current value for location.
      • setLocation

        void setLocation​(java.lang.String location)
        Sets the location property on the DataSource.
        Parameters:
        location - The location to set on the DataSource.
      • getPort

        int getPort()
        Returns the port property of the DataSource.
        Returns:
        The port property of the DataSource.
      • setPort

        void setPort​(int port)
        Sets the port property of the DataSource.
        Parameters:
        port - The new value of the port property of the DataSource.
      • getConfigurationName

        java.lang.String getConfigurationName()
        Returns the configuration name property of the DataSource.
        Returns:
        The current setting of the configuration name.
      • setConfigurationName

        void setConfigurationName​(java.lang.String name)
        Sets the configuration name property of the DataSource.
        Parameters:
        name - The new value of the configuration name property of the data source.
      • getConfigurationID

        java.lang.String getConfigurationID()
        Returns the current value of the configuration ID property of the DataSource.
        Returns:
        The value of the configuration ID property.
      • setConfigurationID

        void setConfigurationID​(java.lang.String id)
        Sets the configuration ID property of the DataSource.
        Parameters:
        id - The new value of the configuration ID property of the DataSource.
      • getServerInstanceName

        java.lang.String getServerInstanceName()
        Returns the current setting of the server instance name property of the DataSource.
        Returns:
        The current server instance name of the DataSource.
      • setServerInstanceName

        void setServerInstanceName​(java.lang.String name)
        Sets the server instance name of the DataSource.
        Parameters:
        name - The new server instance name to set on the DataSource.
      • getServerInstanceID

        java.lang.String getServerInstanceID()
        Returns the current setting of the server instance ID of the DataSource.
        Returns:
        The server instance ID set on the DataSource.
      • setServerInstanceID

        void setServerInstanceID​(java.lang.String id)
        Sets the server instance ID on the DataSource.
        Parameters:
        id - The new value for the server instance ID.
      • getProjectName

        java.lang.String getProjectName()
        Returns the project name set on the DataSource.
        Returns:
        The project name set on the DataSource.
      • setProjectName

        void setProjectName​(java.lang.String name)
        Sets the project name on the DataSource.
        Parameters:
        name - The new project name to set on the property on the DataSource.
      • getProjectID

        java.lang.String getProjectID()
        Returns the project ID set on the DataSource.
        Returns:
        The current value of the project ID property on the DataSource.
      • setProjectID

        void setProjectID​(java.lang.String id)
        Sets the project ID on the DataSource.
        Parameters:
        id - The ID ot set on the DataSource.
      • getAuthMode

        int getAuthMode()
        Returns the current setting of the AuthMode parameter.
        Returns:
        The current setting of the AuthMode parameter, from EnumDSSXMLAuthModes.
      • setAuthMode

        void setAuthMode​(int mode)
        Sets the AuthMode parameter of the DataSource.
        Parameters:
        mode - The new value of the AuthMode parameter, from EnumDSSXMLAuthModes.}
      • getLogin

        java.lang.String getLogin()
        Returns the login parameter of the DataSource.
        Returns:
        The current setting of the login parameter of the DataSource.
      • setLogin

        void setLogin​(java.lang.String l)
        Sets the login parameter of the DataSource.
        Parameters:
        l - A new value of the login parameter of the DataSource.
      • setPasswd

        void setPasswd​(java.lang.String p)
        Sets the password on the DataSource.
        Parameters:
        password - The password to set on the DataSource.
      • getMDLogin

        java.lang.String getMDLogin()
        Returns the MD login parameter of the DataSource.
        Returns:
        The MD login on the DataSource.
      • setMDLogin

        void setMDLogin​(java.lang.String l)
        Sets the MD login parameter of the DataSource.
        Parameters:
        l - The new value of the MD login parameter of the DataSource.
      • setMDPasswd

        void setMDPasswd​(java.lang.String p)
        Sets the MD password parameter of the DataSource.
        Parameters:
        password - The new value of the MD password parameter of the DataSource.
      • getWHLogin

        java.lang.String getWHLogin()
        Returns the current value of the WH login property of the DataSource.
        Returns:
        The current setting for WH login.
      • setWHLogin

        void setWHLogin​(java.lang.String l)
        Sets the WH login property of the DataSource.
        Parameters:
        l - The new value of the WH login property.
      • setWHPasswd

        void setWHPasswd​(java.lang.String p)
        Sets the WH password property of the DataSource.
        Parameters:
        password - The new value of the WH password property.
      • setApplicationType

        void setApplicationType​(int type)
        Sets the application type of the DataSource.
        Parameters:
        type - The new application type, from EnumDSSXMLApplicationType.
      • isHidden

        boolean isHidden()
        Returns whether the DataSource is hidden.
        Returns:
        True if the DataSource is hidden, false otherwise.
      • setHidden

        void setHidden​(boolean hidden)
        Sets the hidden flag of the DataSource.
        Parameters:
        hidden - The new value of the hidden flag.
      • getFlags

        int getFlags()
        Returns the flags property of the DataSource.
        Returns:
        The current flags of the DataSource. This should be the bitwise or(|) of values from EnumDSSXMLDataSourceFlags.
      • setFlags

        void setFlags​(int flags)
        Sets the flags on the DataSource.
        Parameters:
        flags - The new setting for the flags property. This should be the bitwise OR(|) of values from EnumDSSXMLDataSourceFlags.
      • getInternalProjectID

        int getInternalProjectID()
        Returns the internal project ID set on the DataSource.
        Returns:
        The internal project ID property of the DataSource.
      • setInternalProjectID

        void setInternalProjectID​(int id)
        Sets the internal project ID on the DataSource.
        Parameters:
        id - The new value for the internal project ID property.
      • getDBType

        int getDBType()
        Returns the DB type property set on the DataSource.
        Returns:
        The current setting of the DB type property, from EnumDSSXMLDatabaseType.
      • setDBType

        void setDBType​(int type)
        Sets the DB type property.
        Parameters:
        type - The new setting for the DB type property - a value from EnumDSSXMLDatabaseType.
      • getCacheSetting

        java.lang.String getCacheSetting​(int settingType)
        This method will return the current setting for the given cache setting type.
        Parameters:
        settingType - The type of the setting to return, from EnumDSSXMLCacheSetting.
        Returns:
        The current value of the given cache setting.
      • setCacheSetting

        void setCacheSetting​(int settingType,
                             java.lang.String settingValue)
        Sets the given cache setting to the given value.
        Parameters:
        settingType - The type of the cache setting, from EnumDSSXMLCacheSetting.
        settingValue - The new value for the cache setting.
      • getTimeout

        int getTimeout()
        Returns the timeout property of the DataSource.
        Returns:
        The current timeout property of the DataSource.
      • setTimeout

        void setTimeout​(int timeout)
        Sets the timeout property of the DataSource.
        Parameters:
        timeout - The timeout to set on the DataSource.
      • getSessionFlags

        int getSessionFlags()
        Returns the current session flags property on the DataSource.
        Returns:
        The current session flags property, from EnumDSSXMLSessionFlags.
      • setSessionFlags

        void setSessionFlags​(int flags)
        Sets the session flags on the DataSource.
        Parameters:
        flags - The bitwise or of values from EnumDSSXMLSessionFlags.
      • getLocale

        java.util.Locale getLocale()
        Returns the locale property of the DataSource
        Returns:
        A java.util.Locale which represents the Locale set on the DataSource.
      • setLocale

        void setLocale​(java.util.Locale locale)
        Sets the locale property of the DataSource.
        Parameters:
        locale - A java.util.Locale representing the Locale to be set on the DataSource.
      • getServerVersion

        int getServerVersion()
        Returns the server version property.
        Returns:
        The current value of the server version property.
      • setServerVersion

        void setServerVersion​(int version)
        Sets the server version on the data source.
        Parameters:
        version - The server version to set on the data source.
      • getKeyValue

        java.lang.String getKeyValue​(java.lang.String key)
        Returns the key value with the given name in the key value collection.
        Parameters:
        key - The name of the key value to return.
        Returns:
        The value corresponding to the given key name.
      • setKeyValue

        void setKeyValue​(java.lang.String key,
                         java.lang.String val)
        Sets a key value with the given name. If one already exists with the given name, then the old value will be overwritten.
        Parameters:
        key - The name of the key whose value will be changed.
        val - The new value for the key.
      • removeKeyValue

        void removeKeyValue​(java.lang.String key)
        Removes the given key value from the list of key values.
        Parameters:
        key - The name of the key to remove.
      • clearKeyValues

        void clearKeyValues()
        Clears all key values from the key values collection.
      • getKeyValueNames

        java.lang.String[] getKeyValueNames()
        Returns the names of all currently existing key values.
        Returns:
        An array of Strings containing the names of the existing key values.
      • getAvailableAuthModes

        int getAvailableAuthModes()
        Returns the list of available auth modes, based on the type of the DataSource.
        Returns:
        A bitwise or of values from EnumDSSXMLAuthModes.
      • getClientID

        java.lang.String getClientID()
        Returns the identifier that will be sent to the IntelligenceServer upon calling createSession, which identifies the IP address of the XMLAPI machine.
        Returns:
        The current setting for the client ID.
      • setClientID

        void setClientID​(java.lang.String clientID)
        Sets the identifier that will be sent to the IntelligenceServer upon calling createSession, which identifies the IP address of the XMLAPI machine.
        Parameters:
        clientID - The setting to be used for client ID upon creating a session.
      • changePassword

        void changePassword​(java.lang.String newP)
                     throws WebObjectsException
        This method changes the password to the newly set password on the Intelligence Server which this data source points to. It creates a 4-tier connection to do this. This will also change the password variable on this DataSource to the new password. This method will only work on a DataSource with connection type EnumDSSXMLDataSourceConnectionType.DssXmlConnectionType3Tier.
        Parameters:
        newP - The new password to use.
        Throws:
        WebObjectsException - Thrown if an error occurs.
      • useSSL

        boolean useSSL()
        Returns useSSL flag.
        Returns:
        true or false.
      • setUseSSL

        void setUseSSL​(boolean _useSSL)
        Sets useSSL flag which identifies whether to use secure connection.
        Parameters:
        _useSSL - true or false.