Class EssServerImpl
EssServerImpl(String, String, String) for information on instantiating.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classDatabase creation options.Nested classes/interfaces inherited from interface com.appliedolap.essbase.EssObject
EssObject.TypeNested classes/interfaces inherited from interface com.appliedolap.essbase.EssServer
EssServer.ApplicationType -
Field Summary
Fields inherited from class com.appliedolap.essbase.AbstractEssObject
apiFields inherited from interface com.appliedolap.essbase.EssServer
DEFAULT_REST_API_PATH, MAX_APPLICATIONS -
Constructor Summary
ConstructorsConstructorDescriptionEssServerImpl(EssServerConnectionDetailsImpl connectionDetails) EssServerImpl(String server, EssAuthentication authentication) Connects using the given authentication strategy, which need not be a username and password - seeEssAuthentication.EssServerImpl(String server, String username, String password) Creates a new server connection object. -
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.createApplicationFromWorkbook(String application, String database, EssFile file, EssWorkbookImportOptions options) Every flag is sent as the string "true" or "false" rather than a JSON boolean, which is not a style choice - the parameters bean types them as strings and the server rejects real booleans here.createFileConnection(String name, String catalogPath, String description) Creates a connection to a file in the Essbase catalogue.createGroup(String name, String description, String role) Creates a group.createVariable(String name, String value) Creates a new server-wide variable with the given name and value.voiddeleteDataSource(String name) Removes a global data source.voiddownloadLatestServerLog(String serverType, OutputStream outputStream) Writes the latest server log of the given type to the stream.voiddownloadServerLogsAsZip(String serverType, OutputStream outputStream) Writes every server log of the given type, as a zip, to the stream.getAbout()Gets the "about" information for this server.Everything the server reports about the product, exactly as it reports it.getAi()This server's own generative-AI setup: whether it supports AI, whether it is switched on, which capabilities are on, and whether any GenAI connection has been configured.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.getConnection(String name) One connection, with everything the server knows about it.The global connections defined on this server.getDataSource(String dataSourceName) Get the data source with the given name.Finds a file by the folder holding it and its name.getFiles()Gets the list of files available through the files API.One group by name.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.How each ODL log handler rotates.What the server reports about the machine it runs on - free disk and memory, and any configured ceilings.getMcp()The MCP server built into this Essbase, if it has one.The MDX functions this server understands, in the server's own groups.getName()Gets the name of this object.Who holds which service-level role - Service Administrator, Power User, User.The about information of this server.When this client's session expires, if the server has said.The shared folder every user can see,/shared.getType()Gets the type of this object.How this server wants large files uploaded - the part size, and how many parts it allows.getURLs()Returns the list of URLs known to this server.getUsers()The users this server holds.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.voidsetLogSettings(List<EssLogSetting> settings) Changes how the log handlers rotate.voidsignOff()Ends this client's own session on the server.voidstreamDataSource(String query, boolean includeHeaders, String delimiter, Map<String, Object> params, OutputStream outputStream) Runs a query against a data source and writes the rows out.testFileConnection(String name, String catalogPath) Tests a connection that hasn't been saved, so a caller can check before committing.
-
Constructor Details
-
EssServerImpl
Creates a new server connection object. At present, the server path is assumed to be in the exact format such as:.... In other words, this class will currently not try to prepend or append any information such as the protocol, port, or REST path. Note that if using HTTPS without a valid cert, you may encounter PKIX errors. Note: SSL verification is currently turned off.- Parameters:
server- the server REST API pathusername- the usernamepassword- the password
-
EssServerImpl
Connects using the given authentication strategy, which need not be a username and password - seeEssAuthentication. The way in for a session established elsewhere, such as by a user signing in through an external identity provider.- Parameters:
server- the server REST API pathauthentication- how to authenticate
-
EssServerImpl
-
-
Method Details
-
getApiSpec
Description copied from interface:EssServerThe 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.- Specified by:
getApiSpecin interfaceEssServer
-
getInstanceDetails
Description copied from interface:EssServerEverything the server reports about this deployment, exactly as it reports it.Deliberately untyped, unlike
EssServer.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.- Specified by:
getInstanceDetailsin interfaceEssServer- Returns:
- the fields the server returned, in the order it returned them
-
getAboutDetails
Description copied from interface:EssServerEverything the server reports about the product, exactly as it reports it.Untyped for the same reason
EssServer.getInstanceDetails()is:EssServer.getAbout()names four fields fixed at whatever the spec said when the client was generated, and a 26.1 server answers with five - it addslistingVersion, which a typed view drops on the floor without saying so. The fields here are whatever came back.- Specified by:
getAboutDetailsin interfaceEssServer- Returns:
- the fields the server returned, in the order it returned them
-
getAuthentication
Description copied from interface:EssServerHow 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.
- Specified by:
getAuthenticationin interfaceEssServer
-
signOff
public void signOff()Description copied from interface:EssServerEnds this client's own session on the server.Distinct from
EssServer.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
Description copied from interface:EssServerWhen 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.- Specified by:
getSessionExpiryin interfaceEssServer
-
getName
Description copied from interface:EssObjectGets the name of this object. This will generally be the "nice" and "unique" name of this object, such as the application name, cube, member, variable, or whatever. -
getType
Description copied from interface:EssObjectGets the type of this object. -
getApplications
Description copied from interface:EssServerFetch the list of applications available on the server for the currently connected user. The number of returned applications is limited to 1000 (the value ofEssServer.MAX_APPLICATIONS).- Specified by:
getApplicationsin interfaceEssServer- Returns:
- a list of applications
-
getApplication
Description copied from interface:EssServerGets an application with the given name- Specified by:
getApplicationin interfaceEssServer- Parameters:
applicationName- the application name- Returns:
- an application object for the application
-
getFiles
Description copied from interface:EssServerGets the list of files available through the files API. The returned files may include folders. -
getFile
Finds a file by the folder holding it and its name.Lists through
EssFolderImpl, which is the one listing path that encodes a path correctly - the generatedfilesListFilesescapes the separators, so anything below the top level came back as "Specified path '/%2Fapplications%2FSample' does not exist". A leading slash is fine here: catalogue paths are reported with one and the encoder trims it. -
getSessions
- Specified by:
getSessionsin interfaceEssServer
-
killSessions
public void killSessions(boolean logoff) Description copied from interface:EssServerKill all sessions on the server.- Specified by:
killSessionsin interfaceEssServer- Parameters:
logoff- true to also log them off
-
killSessions
Description copied from interface:EssServerKill all sessions on the server for the given user.- Specified by:
killSessionsin interfaceEssServer- Parameters:
userId- the user IDlogoff- true to also log them off
-
getHomePath
Description copied from interface:EssServerGets 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).- Specified by:
getHomePathin interfaceEssServer- Returns:
- a folder object for the user's home path
-
getUtilities
Description copied from interface:EssServerGets the list of utilities on this server.- Specified by:
getUtilitiesin interfaceEssServer- Returns:
- the server utilities
-
getJobs
Description copied from interface:EssServerGets the list of jobs on this server. -
getPermissions
Description copied from interface:EssServerWho holds which service-level role - Service Administrator, Power User, User.Unlike
EssServer.getUsers()andEssServer.getGroups(), this answers on a deployment behind an external identity provider: the directory lives there, but the role assignments are Essbase's own. It is the one way to see who can do what on such a server.- Specified by:
getPermissionsin interfaceEssServer- Returns:
- the service role assignments
-
getUsers
Description copied from interface:EssServerThe users this server holds.Only meaningful where Essbase owns its own security. A deployment behind an external identity provider -
idcsinEssServer.getInstanceDetails()- keeps its users in the provider and answers HTTP 400 "This operation is not supported. Contact administrator" here, the same as it does forEssServer.getGroups(). Check the flag before asking, rather than treating the refusal as a failure. -
getGroups
Description copied from interface:EssServerGets a list of groups on this server -
createGroup
Description copied from interface:EssServerCreates a group.Only on a server that owns its own security; a deployment behind an external identity provider keeps its groups in the provider and refuses this, the same as it refuses
EssServer.getGroups().- Specified by:
createGroupin interfaceEssServer- Parameters:
name- the group name, which is also its iddescription- what the group is for, or nullrole- the service-level role it grants its members -User,Power UserorService Administrator. Required: the server rejects a group without one.- Returns:
- the group as the server created it
-
getGroup
Description copied from interface:EssServerOne group by name. -
getVariables
Description copied from interface:EssServerGets server-scoped variables.- Specified by:
getVariablesin interfaceEssServer- Returns:
- the server-wide variables
-
createVariable
Description copied from interface:EssServerCreates a new server-wide variable with the given name and value.- Specified by:
createVariablein interfaceEssServer- Parameters:
name- the name of the variablevalue- the value of the variable
-
getAbout
Description copied from interface:EssServerGets the "about" information for this server. -
getAboutInstance
- Specified by:
getAboutInstancein interfaceEssServer
-
createApplication
Description copied from interface:EssServerCreates 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
EssServer.createApplication(String, String, EssServerImpl.DatabaseCreateOptions).- Specified by:
createApplicationin interfaceEssServer- Parameters:
applicationName- the application namedatabaseName- the database name
-
createApplication
public void createApplication(String applicationName, String databaseName, EssServerImpl.DatabaseCreateOptions databaseCreateOptions) Description copied from interface:EssServerCreate an application/database with the given name and options.- Specified by:
createApplicationin interfaceEssServer- Parameters:
applicationName- the name of the applicationdatabaseName- the name of the database/cubedatabaseCreateOptions- the database creation options
-
createApplicationFromWorkbook
Description copied from interface:EssServerCreates or updates an application from an uploaded workbook.- Specified by:
createApplicationFromWorkbookin interfaceEssServer- Parameters:
application- the applicationdatabase- the cube/databasefile- the XLSX file- Returns:
- a new job for the creation process
-
createApplicationFromWorkbook
public EssJob createApplicationFromWorkbook(String application, String database, EssFile file, EssWorkbookImportOptions options) Every flag is sent as the string "true" or "false" rather than a JSON boolean, which is not a style choice - the parameters bean types them as strings and the server rejects real booleans here. The job echoes back the four it acted on, which is the only way to confirm it read them.
- Specified by:
createApplicationFromWorkbookin interfaceEssServer- Parameters:
application- the application to builddatabase- the cube within itfile- the workbook, in the server's catalogueoptions- what the import should do- Returns:
- the submitted job, which runs in the background
-
getURLs
Description copied from interface:EssServerReturns 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. -
getDataSources
- Specified by:
getDataSourcesin interfaceEssServer
-
getDataSource
Description copied from interface:EssServerGet the data source with the given name. Will throwNoSuchEssbaseObjectExceptionif there is no data source with that name.- Specified by:
getDataSourcein interfaceEssServer- Parameters:
dataSourceName- the data source name- Returns:
- the data source with that name
-
streamDataSource
public void streamDataSource(String query, boolean includeHeaders, String delimiter, Map<String, Object> params, OutputStream outputStream) Runs a query against a data source and writes the rows out.Two calls, and both are load-bearing.
POST /datasources/querydoes not return data - it answers with the column list and a link carrying a stream id, and the rows come from a follow-up GET on that link.The stream lives in server-side session state, so the second call has to reach the same session as the first. Under an authentication strategy that establishes no session - Basic, for one - every request lands somewhere new and the follow-up answers
Stream id '...' does not exist. The cookies the first response set are therefore carried onto the second explicitly, which works whatever the strategy is. Oracle's own curl example hints at this with a--cookie-jarthat is easy to read as boilerplate.Not
/datasources/query/stream, which also exists, and which answers HTTP 200 withFailed to stream... Failed to execute query.in the body for every input tried.- Specified by:
streamDataSourcein interfaceEssServer- 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
-
deleteDataSource
Description copied from interface:EssServerRemoves a global data source.- Specified by:
deleteDataSourcein interfaceEssServer- Parameters:
name- the data source name
-
getConnections
Description copied from interface:EssServerThe global connections defined on this server.- Specified by:
getConnectionsin interfaceEssServer- Returns:
- the connections
-
getConnection
One connection, with everything the server knows about it.Two calls, because neither endpoint answers with the whole object: the list carries
descriptionbut nopath, and fetching one carriespathbut nodescription. A caller shouldn't have to know that, so they are merged here.- Specified by:
getConnectionin interfaceEssServer- Parameters:
name- the connection name- Returns:
- the connection, or empty if there is none
-
createFileConnection
Description copied from interface:EssServerCreates a connection to a file in the Essbase catalogue.The path names a file, not the folder holding it - a file connection stands for one file, and the data source built on it carries no filename of its own.
- Specified by:
createFileConnectionin interfaceEssServer- Parameters:
name- the connection namecatalogPath- the file, e.g./gallery/Technical/Filters/UserDetails.csvdescription- optional description- Returns:
- the connection as created
-
testFileConnection
Description copied from interface:EssServerTests a connection that hasn't been saved, so a caller can check before committing.- Specified by:
testFileConnectionin interfaceEssServer- Parameters:
name- the connection name to test undercatalogPath- the file to point at- Returns:
- empty when it connects, otherwise the server's reason
-
getServerLogTypes
The about information of this server.- Specified by:
getServerLogTypesin interfaceEssServer- Returns:
- the server log types, empty if this deployment serves none
-
downloadLatestServerLog
Description copied from interface:EssServerWrites the latest server log of the given type to the stream.- Specified by:
downloadLatestServerLogin interfaceEssServer- Parameters:
serverType- one ofEssServer.getServerLogTypes()outputStream- where to write it
-
downloadServerLogsAsZip
Description copied from interface:EssServerWrites every server log of the given type, as a zip, to the stream.- Specified by:
downloadServerLogsAsZipin interfaceEssServer- Parameters:
serverType- one ofEssServer.getServerLogTypes()outputStream- where to write it
-
getMdxFunctions
Description copied from interface:EssServerThe MDX functions this server understands, in the server's own groups.A property of the server's MDX dialect, not of any cube - the same server answers byte-for-byte identically whichever cube is asked. There is no server-level endpoint for it though, so this finds a cube and asks through that; a stopped application will do, since the answer does not depend on the data.
- Specified by:
getMdxFunctionsin interfaceEssServer- Returns:
- the function groups, in the order the server listed them
-
getMcp
Description copied from interface:EssServerThe MCP server built into this Essbase, if it has one.Points the opposite way from
EssCube.getAi(): this is Essbase offering itself as a tool provider to somebody else's model, rather than Essbase calling out to one. A server can have this working while every/aiendpoint is unconfigured, and usually does. -
getAi
Description copied from interface:EssServerThis server's own generative-AI setup: whether it supports AI, whether it is switched on, which capabilities are on, and whether any GenAI connection has been configured.The server-level answer to a question
EssCube.getAi()can only answer per cube. The cube walks the whole setup chain, so asking it "is AI configured here" costs one walk per cube and mixes the server's answer in with each application's. This is the half that is the same for every cube on the server, asked once. -
getMaintenanceLimits
Description copied from interface:EssServerWhat the server reports about the machine it runs on - free disk and memory, and any configured ceilings. The only window the REST API offers onto the host.- Specified by:
getMaintenanceLimitsin interfaceEssServer- Returns:
- the limits
-
getLogSettings
Description copied from interface:EssServerHow each ODL log handler rotates.Worth having beside the logs themselves: a handler holding ten megabytes per file and five hundred in total has silently discarded everything older, and nothing in the log says so.
- Specified by:
getLogSettingsin interfaceEssServer- Returns:
- one entry per handler
-
setLogSettings
Description copied from interface:EssServerChanges how the log handlers rotate.Send every handler, not only the changed one - this replaces the set. Start from
EssServer.getLogSettings()and useEssLogSetting.withSizes(java.lang.Integer, java.lang.Integer)on the one being altered.- Specified by:
setLogSettingsin interfaceEssServer- Parameters:
settings- the full set of handlers
-
getUploadConfig
Description copied from interface:EssServerHow this server wants large files uploaded - the part size, and how many parts it allows.Rarely needed directly:
EssFolder.uploadFile(java.io.File)already reads this and sends a file whichever way the server asks for. Worth having for anything that wants to say in advance what an upload is going to involve.- Specified by:
getUploadConfigin interfaceEssServer- Returns:
- the upload configuration
-