Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
*/
package org.eclipse.daanse.xmla.api;

import java.util.List;
public interface UserRolePrincipal {

public interface UserPrincipal {
String userName();

String userId();

List<String> roles();
boolean hasRole(String role);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.List;

import org.eclipse.daanse.xmla.api.RequestMetaData;
import org.eclipse.daanse.xmla.api.UserPrincipal;
import org.eclipse.daanse.xmla.api.UserRolePrincipal;
import org.eclipse.daanse.xmla.api.XmlaService;
import org.eclipse.daanse.xmla.api.discover.dbschema.catalogs.DbSchemaCatalogsRequest;
import org.eclipse.daanse.xmla.api.discover.dbschema.catalogs.DbSchemaCatalogsResponseRow;
Expand Down Expand Up @@ -89,7 +89,7 @@ public interface DiscoverService {
* @return the list
*/
List<DiscoverDataSourcesResponseRow> dataSources(DiscoverDataSourcesRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* returns the catalogs that are accessible on the server.
Expand All @@ -98,7 +98,7 @@ List<DiscoverDataSourcesResponseRow> dataSources(DiscoverDataSourcesRequest requ
* @return the list
*/
List<DbSchemaCatalogsResponseRow> dbSchemaCatalogs(DbSchemaCatalogsRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* describes the structure of cubes within a database. Perspectives are also returned in this
Expand All @@ -108,7 +108,7 @@ List<DbSchemaCatalogsResponseRow> dbSchemaCatalogs(DbSchemaCatalogsRequest reque
* @return the list
*/
List<DbSchemaColumnsResponseRow> dbSchemaColumns(DbSchemaColumnsRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* describes the properties of members and cell properties.
Expand All @@ -117,7 +117,7 @@ List<DbSchemaColumnsResponseRow> dbSchemaColumns(DbSchemaColumnsRequest request,
* @return the list
*/
List<DbSchemaProviderTypesResponseRow> dbSchemaProviderTypes(DbSchemaProviderTypesRequest request,
RequestMetaData metaData, UserPrincipal userPrincipal);
RequestMetaData metaData, UserRolePrincipal userPrincipal);

/**
* identifies the (base) data types supported by the server.
Expand All @@ -126,7 +126,7 @@ List<DbSchemaProviderTypesResponseRow> dbSchemaProviderTypes(DbSchemaProviderTyp
* @return the list
*/
List<DbSchemaSchemataResponseRow> dbSchemaSchemata(DbSchemaSchemataRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
*
Expand All @@ -135,7 +135,7 @@ List<DbSchemaSchemataResponseRow> dbSchemaSchemata(DbSchemaSchemataRequest reque
* @return the list
*/
List<DbSchemaSourceTablesResponseRow> dbSchemaSourceTables(DbSchemaSourceTablesRequest request,
RequestMetaData metaData, UserPrincipal userPrincipal);
RequestMetaData metaData, UserRolePrincipal userPrincipal);

/**
* returns dimensions, measure groups, or schema rowsets exposed as tables.
Expand All @@ -144,7 +144,7 @@ List<DbSchemaSourceTablesResponseRow> dbSchemaSourceTables(DbSchemaSourceTablesR
* @return the list
*/
List<DbSchemaTablesResponseRow> dbSchemaTables(DbSchemaTablesRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
*
Expand All @@ -153,7 +153,7 @@ List<DbSchemaTablesResponseRow> dbSchemaTables(DbSchemaTablesRequest request, Re
* @return the list
*/
List<DbSchemaTablesInfoResponseRow> dbSchemaTablesInfo(DbSchemaTablesInfoRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* returns a row for each measure, each cube dimension attribute, and each schema rowset column,
Expand All @@ -164,7 +164,7 @@ List<DbSchemaTablesInfoResponseRow> dbSchemaTablesInfo(DbSchemaTablesInfoRequest
*/
// discover
List<DiscoverEnumeratorsResponseRow> discoverEnumerators(DiscoverEnumeratorsRequest request,
RequestMetaData metaData, UserPrincipal userPrincipal);
RequestMetaData metaData, UserRolePrincipal userPrincipal);

/**
* returns information about keywords that are reserved by the XMLA server.
Expand All @@ -173,7 +173,7 @@ List<DiscoverEnumeratorsResponseRow> discoverEnumerators(DiscoverEnumeratorsRequ
* @return the list
*/
List<DiscoverKeywordsResponseRow> discoverKeywords(DiscoverKeywordsRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* returns information about literals supported by the server.
Expand All @@ -182,7 +182,7 @@ List<DiscoverKeywordsResponseRow> discoverKeywords(DiscoverKeywordsRequest reque
* @return the list
*/
List<DiscoverLiteralsResponseRow> discoverLiterals(DiscoverLiteralsRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* returns a list of information and values about the properties that are supported by the server
Expand All @@ -192,7 +192,7 @@ List<DiscoverLiteralsResponseRow> discoverLiterals(DiscoverLiteralsRequest reque
* @return the list
*/
List<DiscoverPropertiesResponseRow> discoverProperties(DiscoverPropertiesRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* returns the names, restrictions, description, and other information for all Discover requests.
Expand All @@ -201,7 +201,7 @@ List<DiscoverPropertiesResponseRow> discoverProperties(DiscoverPropertiesRequest
* @return the list
*/
List<DiscoverSchemaRowsetsResponseRow> discoverSchemaRowsets(DiscoverSchemaRowsetsRequest request,
RequestMetaData metaData, UserPrincipal userPrincipal);
RequestMetaData metaData, UserRolePrincipal userPrincipal);

/**
* describes the actions that can be available to the client application.
Expand All @@ -211,7 +211,7 @@ List<DiscoverSchemaRowsetsResponseRow> discoverSchemaRowsets(DiscoverSchemaRowse
*/
// md
List<MdSchemaActionsResponseRow> mdSchemaActions(MdSchemaActionsRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* describes the structure of cubes within a database. Perspectives are also returned in this
Expand All @@ -221,7 +221,7 @@ List<MdSchemaActionsResponseRow> mdSchemaActions(MdSchemaActionsRequest request,
* @return the list
*/
List<MdSchemaCubesResponseRow> mdSchemaCubes(MdSchemaCubesRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* describes the dimensions within a database.
Expand All @@ -230,7 +230,7 @@ List<MdSchemaCubesResponseRow> mdSchemaCubes(MdSchemaCubesRequest request, Reque
* @return the list
*/
List<MdSchemaDimensionsResponseRow> mdSchemaDimensions(MdSchemaDimensionsRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* returns information about the functions that are currently available for use in the DAX and MDX
Expand All @@ -240,7 +240,7 @@ List<MdSchemaDimensionsResponseRow> mdSchemaDimensions(MdSchemaDimensionsRequest
* @return the list
*/
List<MdSchemaFunctionsResponseRow> mdSchemaFunctions(MdSchemaFunctionsRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* describes each hierarchy within a particular dimension.
Expand All @@ -249,7 +249,7 @@ List<MdSchemaFunctionsResponseRow> mdSchemaFunctions(MdSchemaFunctionsRequest re
* @return the list
*/
List<MdSchemaHierarchiesResponseRow> mdSchemaHierarchies(MdSchemaHierarchiesRequest request,
RequestMetaData metaData, UserPrincipal userPrincipal);
RequestMetaData metaData, UserRolePrincipal userPrincipal);

/**
* describes the KPIs within a database
Expand All @@ -258,7 +258,7 @@ List<MdSchemaHierarchiesResponseRow> mdSchemaHierarchies(MdSchemaHierarchiesRequ
* @return the list
*/
List<MdSchemaKpisResponseRow> mdSchemaKpis(MdSchemaKpisRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* describes each level within a particular hierarchy.
Expand All @@ -267,7 +267,7 @@ List<MdSchemaKpisResponseRow> mdSchemaKpis(MdSchemaKpisRequest request, RequestM
* @return the list
*/
List<MdSchemaLevelsResponseRow> mdSchemaLevels(MdSchemaLevelsRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* enumerates the dimensions of measure groups.
Expand All @@ -276,7 +276,7 @@ List<MdSchemaLevelsResponseRow> mdSchemaLevels(MdSchemaLevelsRequest request, Re
* @return the list
*/
List<MdSchemaMeasureGroupDimensionsResponseRow> mdSchemaMeasureGroupDimensions(
MdSchemaMeasureGroupDimensionsRequest request, RequestMetaData metaData, UserPrincipal userPrincipal);
MdSchemaMeasureGroupDimensionsRequest request, RequestMetaData metaData, UserRolePrincipal userPrincipal);

/**
* describes the MeasureGroups within a database
Expand All @@ -285,7 +285,7 @@ List<MdSchemaMeasureGroupDimensionsResponseRow> mdSchemaMeasureGroupDimensions(
* @return the list
*/
List<MdSchemaMeasureGroupsResponseRow> mdSchemaMeasureGroups(MdSchemaMeasureGroupsRequest request,
RequestMetaData metaData, UserPrincipal userPrincipal);
RequestMetaData metaData, UserRolePrincipal userPrincipal);

/**
* describes the members within a database
Expand All @@ -294,7 +294,7 @@ List<MdSchemaMeasureGroupsResponseRow> mdSchemaMeasureGroups(MdSchemaMeasureGrou
* @return the list
*/
List<MdSchemaMeasuresResponseRow> mdSchemaMeasures(MdSchemaMeasuresRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* describes the members within a database
Expand All @@ -303,7 +303,7 @@ List<MdSchemaMeasuresResponseRow> mdSchemaMeasures(MdSchemaMeasuresRequest reque
* @return the list
*/
List<MdSchemaMembersResponseRow> mdSchemaMembers(MdSchemaMembersRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* describes the properties of members and cell properties.
Expand All @@ -312,7 +312,7 @@ List<MdSchemaMembersResponseRow> mdSchemaMembers(MdSchemaMembersRequest request,
* @return the list
*/
List<MdSchemaPropertiesResponseRow> mdSchemaProperties(MdSchemaPropertiesRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* describes any sets that are currently defined in a database, including session- scoped sets.
Expand All @@ -321,7 +321,7 @@ List<MdSchemaPropertiesResponseRow> mdSchemaProperties(MdSchemaPropertiesRequest
* @return the list
*/
List<MdSchemaSetsResponseRow> mdSchemaSets(MdSchemaSetsRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/**
* returns a rowset with one row and one column. The single cell in the rowset contains an XML
Expand All @@ -331,5 +331,5 @@ List<MdSchemaSetsResponseRow> mdSchemaSets(MdSchemaSetsRequest request, RequestM
* @return the list
*/
List<DiscoverXmlMetaDataResponseRow> xmlMetaData(DiscoverXmlMetaDataRequest request, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package org.eclipse.daanse.xmla.api.execute;

import org.eclipse.daanse.xmla.api.RequestMetaData;
import org.eclipse.daanse.xmla.api.UserPrincipal;
import org.eclipse.daanse.xmla.api.UserRolePrincipal;
import org.eclipse.daanse.xmla.api.execute.alter.AlterRequest;
import org.eclipse.daanse.xmla.api.execute.alter.AlterResponse;
import org.eclipse.daanse.xmla.api.execute.cancel.CancelRequest;
Expand All @@ -29,23 +29,23 @@ public interface ExecuteService {
/*
* The method is used to alter an object that already exists on a server.
*/
AlterResponse alter(AlterRequest statementRequest, RequestMetaData metaData, UserPrincipal userPrincipal);
AlterResponse alter(AlterRequest statementRequest, RequestMetaData metaData, UserRolePrincipal userPrincipal);

/*
* The method cancels the currently running command on the specified connection.
*/
CancelResponse cancel(CancelRequest capture, RequestMetaData metaData, UserPrincipal userPrincipal);
CancelResponse cancel(CancelRequest capture, RequestMetaData metaData, UserRolePrincipal userPrincipal);

/*
* The method clears the in-memory cache of the specified object.
*/
ClearCacheResponse clearCache(ClearCacheRequest clearCacheRequest, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);

/*
* The method consists of a string. This MUST be a valid string in a language that is understood by
* the server, such as MDX, DMX, or SQL.
*/
StatementResponse statement(StatementRequest statementRequest, RequestMetaData metaData,
UserPrincipal userPrincipal);
UserRolePrincipal userPrincipal);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@

import java.util.Optional;

import org.eclipse.daanse.xmla.api.UserPrincipal;
import org.eclipse.daanse.xmla.api.UserRolePrincipal;
import org.eclipse.daanse.xmla.api.xmla.BeginSession;
import org.eclipse.daanse.xmla.api.xmla.EndSession;
import org.eclipse.daanse.xmla.api.xmla.Session;

public interface SessionService {

Optional<Session> beginSession(BeginSession beginSession, UserPrincipal userPrincipal);
Optional<Session> beginSession(BeginSession beginSession, UserRolePrincipal userPrincipal);

boolean checkSession(Session session, UserPrincipal userPrincipal);
boolean checkSession(Session session, UserRolePrincipal userPrincipal);

void endSession(EndSession endSession, UserPrincipal userPrincipal);
void endSession(EndSession endSession, UserRolePrincipal userPrincipal);

}
Loading
Loading