Interface EssServer
- All Known Implementing Classes:
EssServerImpl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumA cube type, despite the name. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intFor now, we're setting a generous upper limit on the number of applications that can be returned in a listing. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateApplication(String applicationName, String databaseName) Creates an application (and a database) with the given names.voidcreateApplication(String applicationName, String databaseName, EssServerImpl.DatabaseCreateOptions databaseCreateOptions) Create an application/database with the given name and options.createApplicationFromWorkbook(String application, String database, EssFile file) Creates or updates an application from an uploaded workbook.voidcreateVariable(String name, String value) Creates a new server-wide variable with the given name and value.getAbout()Gets the "about" information for this server.The server's own OpenAPI/Swagger definition of its REST API.getApplication(String applicationName) Gets an application with the given nameFetch the list of applications available on the server for the currently connected user.How this connection authenticates, so that code outside the generated client can present the same identity - a download bypass, or a local proxy standing in front of the server's own web pages.getDataSource(String dataSourceName) Get the data source with the given name.Get the list of global data sources defined on the server.Gets a file using the specified path and name.getFiles()Gets the list of files available through the files API.Gets a list of groups on this serverGets the home path of the currently connected user.Everything the server reports about this deployment, exactly as it reports it.getJobs()Gets the list of jobs on this server.getName()When this client's session expires, if the server has said.getType()getURLs()Returns the list of URLs known to this server.Gets the list of utilities on this server.Gets server-scoped variables.voidkillSessions(boolean logoff) Kill all sessions on the server.voidkillSessions(String userId, boolean logoff) Kill all sessions on the server for the given user.voidsignOff()Ends this client's own session on the server.voidstreamDataSource(String query, boolean includeHeaders, String delimiter, Map<String, Object> params, OutputStream outputStream) Calls the global data source endpoint to execute a query against a data source with the given parameters.
-
Field Details
-
MAX_APPLICATIONS
static final int MAX_APPLICATIONSFor now, we're setting a generous upper limit on the number of applications that can be returned in a listing. We may want to revisit this in the future. This library is currently designed to hide pagination details so that they don't leak into the abstractions provided in this library, but we may need to rethink this in the future.- See Also:
-
DEFAULT_REST_API_PATH
- See Also:
-
-
Method Details
-
getName
String getName() -
getType
EssObject.Type getType() -
getApplications
List<EssApplication> getApplications()Fetch the list of applications available on the server for the currently connected user. The number of returned applications is limited to 1000 (the value ofMAX_APPLICATIONS).- Returns:
- a list of applications
-
getApplication
Gets an application with the given name- Parameters:
applicationName- the application name- Returns:
- an application object for the application
-
getFiles
Gets the list of files available through the files API. The returned files may include folders.- Returns:
- the list of files on this server
-
getFile
Gets a file using the specified path and name.- Parameters:
path- the path to the file, such asgallery/Applications/Demo Samples/Block Storagefilename- the name of the file, such asSample_Basic.xlsx- Returns:
- the file if it exists, null otherwise
-
getSessions
List<EssSession> getSessions() -
getApiSpec
EssApiSpec getApiSpec()The server's own OpenAPI/Swagger definition of its REST API.Where it lives depends on the release, which is the reason this exists rather than callers building the URL themselves: 21.7 serves a Swagger 2.0 document at
/rest/v1/swagger.jsonand answers 404 foropenapi.json, while 26.1 serves an OpenAPI 3.0.1 document at/rest/v1/openapi.jsonand answers 404 forswagger.json. Asking for the wrong one is not a soft failure - it is a 404 - so the candidates are tried in turn.- Throws:
EssApiException- if no known location answered
-
getInstanceDetails
Everything the server reports about this deployment, exactly as it reports it.Deliberately untyped, unlike
getAboutInstance(). This endpoint is a bag of capability flags describing one deployment, and which flags exist varies by version: 21.7 answers withidcsandprovisioningSupported, while 26.1 answers with ten fields including a split of that one into service- and application-role provisioning, several AI feature flags, and a logout URL. A generated model pins the field names at whatever the spec said when it was generated and silently discards the rest, so against a newer server the typed view goes empty precisely when the server has more to say. A map cannot go out of date that way.Values are left as the server sent them - booleans stay booleans - so a caller can test a flag as well as display it.
idcsis the interesting one: it says the deployment authenticates through Oracle's identity service, which is what makes a username and password useless for a federated user.- Returns:
- the fields the server returned, in the order it returned them
-
getAuthentication
EssAuthentication getAuthentication()How this connection authenticates, so that code outside the generated client can present the same identity - a download bypass, or a local proxy standing in front of the server's own web pages.Returns the live strategy rather than a snapshot: ask it for headers at the moment of the request, because a session-based strategy's answer changes once a session is established, and again once it is signed off.
-
signOff
void signOff()Ends this client's own session on the server.Distinct from
killSessions(boolean), which ends other people's. This is signing off: the session this client established stops being valid, and the server stops holding it.What happens next depends on how this connection authenticates. With a username and password, the next call simply authenticates again and gets a fresh session. With a session supplied from outside - a federated sign-in, say - there is nothing to fall back to and subsequent calls will be rejected, which is precisely what signing off means in that case.
-
getSessionExpiry
When this client's session expires, if the server has said. Empty when there is no session, or when the session was supplied from outside rather than established here - the expiry is reported alongside the session, so only the client that established it hears about it. -
killSessions
void killSessions(boolean logoff) Kill all sessions on the server.- Parameters:
logoff- true to also log them off
-
killSessions
Kill all sessions on the server for the given user.- Parameters:
userId- the user IDlogoff- true to also log them off
-
getHomePath
EssFolder getHomePath()Gets the home path of the currently connected user. The value of the home path is returned by a REST API call (curiously, one that returns plaintext instead of JSON but whatever). The value is ostensibly/users/followed by the name of the connected user (e.g./users/admin).- Returns:
- a folder object for the user's home path
-
getUtilities
List<EssUtility> getUtilities()Gets the list of utilities on this server.- Returns:
- the server utilities
-
getJobs
Gets the list of jobs on this server.- Returns:
- the list of jobs
-
getGroups
Gets a list of groups on this server- Returns:
- the list of groups
-
getVariables
List<EssVariable> getVariables()Gets server-scoped variables.- Returns:
- the server-wide variables
-
createVariable
Creates a new server-wide variable with the given name and value.- Parameters:
name- the name of the variablevalue- the value of the variable
-
getAbout
EssServerImpl.About getAbout()Gets the "about" information for this server.- Returns:
- the server about info
-
getAboutInstance
EssServerImpl.AboutInstance getAboutInstance() -
createApplication
Creates an application (and a database) with the given names. While we tend to historically think of Essbase as employing the concept of an application containing one or more databases/cubes, most of the operations in the REST API are centered around actions you do on a particular cube, and in cases like these where you are creating a cube, there is no separate application creation step, it just gets created or re-used as the case may be.The default database creation options will be BSO cube with scenarios and duplicates turned off. For more granular control of the created database type, use
createApplication(String, String, EssServerImpl.DatabaseCreateOptions).- Parameters:
applicationName- the application namedatabaseName- the database name
-
createApplication
void createApplication(String applicationName, String databaseName, EssServerImpl.DatabaseCreateOptions databaseCreateOptions) Create an application/database with the given name and options.- Parameters:
applicationName- the name of the applicationdatabaseName- the name of the database/cubedatabaseCreateOptions- the database creation options
-
createApplicationFromWorkbook
Creates or updates an application from an uploaded workbook.- Parameters:
application- the applicationdatabase- the cube/databasefile- the XLSX file- Returns:
- a new job for the creation process
-
getURLs
Returns the list of URLs known to this server. Generally speaking this seems to be the URL for the Jet UI, REST API, XMLA provider, and some others.- Returns:
- list of URLs from the corresponding API
-
getDataSources
List<EssDataSource> getDataSources()Get the list of global data sources defined on the server.- Returns:
- list of global data sources
-
getDataSource
Get the data source with the given name. Will throwNoSuchEssbaseObjectExceptionif there is no data source with that name.- Parameters:
dataSourceName- the data source name- Returns:
- the data source with that name
-
streamDataSource
void streamDataSource(String query, boolean includeHeaders, String delimiter, Map<String, Object> params, OutputStream outputStream) Calls the global data source endpoint to execute a query against a data source with the given parameters.- Parameters:
query- the queryincludeHeaders- whether to include headers in the resultdelimiter- the delimiter (currently only space and tab are supported by the server, you can use constants inEssDataSourceImplfor convenience)params- the parameters, if any. If none, supply an empty mapoutputStream- the output stream to write results to
-