Package mondrian.xmla

Class XmlaHandler


  • public class XmlaHandler
    extends java.lang.Object
    An XmlaHandler responds to XML for Analysis (XML/A) requests.
    Since:
    27 April, 2003
    Author:
    jhyde, Gang Chen
    • Constructor Detail

      • XmlaHandler

        public XmlaHandler​(XmlaHandler.ConnectionFactory connectionFactory,
                           java.lang.String prefix)
        Creates an XmlaHandler.

        The connection factory may be null, as long as you override getConnection(String, String, String, Properties).

        Parameters:
        connectionFactory - Connection factory
        prefix - XML Namespace. Typical value is "xmla", but a value of "cxmla" works around an Internet Explorer 7 bug
    • Method Detail

      • getConnection

        public OlapConnection getConnection​(XmlaRequest request,
                                            java.util.Map<java.lang.String,​java.lang.String> propMap)
        Returns a new OlapConnection opened with the credentials specified in the XMLA request or an existing connection if one can be found associated with the request session id.
        Parameters:
        request - Request
        propMap - Extra properties
      • isValidXsdInt

        public static boolean isValidXsdInt​(long l)
      • writeEmptyDatasetXmlSchema

        static void writeEmptyDatasetXmlSchema​(SaxWriter writer,
                                               mondrian.xmla.XmlaHandler.SetType setType)
      • getConnection

        protected OlapConnection getConnection​(java.lang.String catalog,
                                               java.lang.String schema,
                                               java.lang.String role)
                                        throws XmlaException
        Gets a Connection given a catalog (and implicitly the catalog's data source) and the name of a user role.

        If you want to pass in a role object, and you are making the call within the same JVM (i.e. not RPC), register the role using MondrianServer.getLockBox() and pass in the moniker for the generated lock box entry. The server will retrieve the role from the moniker.

        Parameters:
        catalog - Catalog name
        schema - Schema name
        role - User role name
        Returns:
        Connection
        Throws:
        XmlaException - If error occurs
      • getConnection

        protected OlapConnection getConnection​(java.lang.String catalog,
                                               java.lang.String schema,
                                               java.lang.String role,
                                               java.util.Properties props)
                                        throws XmlaException
        Gets a Connection given a catalog (and implicitly the catalog's data source) and the name of a user role.

        If you want to pass in a role object, and you are making the call within the same JVM (i.e. not RPC), register the role using MondrianServer.getLockBox() and pass in the moniker for the generated lock box entry. The server will retrieve the role from the moniker.

        Parameters:
        catalog - Catalog name
        schema - Schema name
        role - User role name
        props - Properties to pass down to the native driver.
        Returns:
        Connection
        Throws:
        XmlaException - If error occurs