001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2005-2011 Pentaho 008// All Rights Reserved. 009*/ 010package mondrian.xmla; 011 012import org.olap4j.metadata.XmlaConstants; 013 014import java.util.Map; 015 016/** 017 * XML/A request interface. 018 * 019 * @author Gang Chen 020 */ 021public interface XmlaRequest { 022 023 /** 024 * Indicate DISCOVER or EXECUTE method. 025 */ 026 XmlaConstants.Method getMethod(); 027 028 /** 029 * Properties of XML/A request. 030 */ 031 Map<String, String> getProperties(); 032 033 /** 034 * Restrictions of DISCOVER method. 035 * 036 * <p>If the value is a list of strings, the restriction passes if the 037 * column has one of the values. 038 */ 039 Map<String, Object> getRestrictions(); 040 041 /** 042 * Statement of EXECUTE method. 043 */ 044 String getStatement(); 045 046 /** 047 * Role name binds with this XML/A request. Maybe null. 048 */ 049 String getRoleName(); 050 051 /** 052 * Request type of DISCOVER method. 053 */ 054 String getRequestType(); 055 056 /** 057 * Indicate whether statement is a drill through statement of 058 * EXECUTE method. 059 */ 060 boolean isDrillThrough(); 061 062 /** 063 * The username to use to open the underlying olap4j connection. 064 * Can be null. 065 */ 066 String getUsername(); 067 068 /** 069 * The password to use to open the underlying olap4j connection. 070 * Can be null. 071 */ 072 String getPassword(); 073 074 /** 075 * Returns the id of the session this request belongs to. 076 * 077 * <p>Not necessarily the same as the HTTP session: the SOAP request 078 * contains its own session information.</p> 079 * 080 * <p>The session id is used to retrieve existing olap connections. And 081 * username / password only need to be passed on the first request in a 082 * session.</p> 083 * 084 * @return Id of the session 085 */ 086 String getSessionId(); 087} 088 089// End XmlaRequest.java