public class SessionOM extends Object
Here is the sample code to open an application.
Map context = new HashMap(5);
CSSSystem system = CSSSystem.getInstance(context, "C:\Oracle\Middleware\EPMSystem11R1");
CSSAPIIF css = system.getCSSAPI();
CSSUserIF user = css.authenticate(context, "admin", "password");
String ssoToken = user.getToken();
SessionInfo session = sessionOM.createSession(ssoToken, Locale.ENGLISH, "Cluster_name", "Application_name");
Every open application call should have a corresponding close application.
sessionOM.closeSession(session);
| Constructor and Description |
|---|
SessionOM()
Creates the Session OM object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
backupApplication(String clusterName,
String ssoToken,
String appName,
String path,
boolean isToBeScrambled,
double scramblingValue,
boolean isCopyTaskAudit,
boolean isCopyDataAudit,
int rowCount)
Creates the backup for the given application name.
|
void |
closeSession(SessionInfo sessionInfo)
closes the application, takes the session info object of the application has to be closed.
|
void |
createApplication(String ssoToken,
String clusterName,
String appName,
String appDescription,
InputStream profileStream,
String projectName,
String webServerURL,
APPLICATION_TYPES appType)
Creates an applicaiton on the server.
|
SessionInfo |
createSession(String ssoToken,
Locale locale,
String server,
int port,
String appName)
This opens the application specified and returns a valid sessionId for that application.
|
SessionInfo |
createSession(String ssoToken,
Locale locale,
String clusterName,
String appName)
This opens the application specified and returns a valid sessionId for that application.
|
SessionInfo |
createSession(String user,
String password,
Locale locale,
String server,
int port,
String appName)
This opens the application specified and returns a valid sessionId for that application.
|
void |
deleteApplication(String ssoToken,
String clusterName,
String applicationName)
Deletes the application.
|
int |
duplicateApplication(String clusterName,
String ssoToken,
String appName,
String newAppName,
String newAppDescription,
boolean isCopyTaskAudit,
boolean isCopyDataAudit,
String projectName,
boolean isHFMMode)
Duplicates the source application to given new application name.
|
List<String> |
enumCluster()
Return the list of Clusters for a user, the cluster information would be avilable in the cluster list with update more than 2 mins ago.
|
List<String> |
enumProvisioningProjects(String ssoToken)
Return the list of provisioning projects.
|
List<String> |
enumServers(String cluster)
Return the list of Servers for a user in given Cluster.
It calls enumServers() method of JHsxClient class if, server list was update more than 2 mins ago. |
byte[] |
getAdminTaskLogData(String ssoToken,
String clusterName,
int taskID)
Returns the log file path information of the specified admin task id.
|
AdminTaskProgress |
getAdminTaskProgress(String clusterName,
String ssoToken,
int taskID)
the synchornised method to get the status of the admin task progress.
|
AdminTaskProgress |
getAdminTaskProgress(String clusterName,
String ssoToken,
int taskID,
long poolingTime)
returns the status of the Admin task prgress.
|
Map<USERPREFERENCES,String> |
getAllUserPreferenceValues(String ssoToken,
String clusterName,
String appName)
Gets all the user preferences.
|
APPLICATION_ENABLED_STATUS |
getApplicationEnabledStatus(String ssoToken,
String clusterName,
String serverName,
String applicationName)
Returns the application mode status as enabled or disabled for the list of application name.
|
List<String> |
getApplicationLanguages(String ssoToken,
String clusterName,
String applicationName)
Returns the list of languages supported for the given application.
|
APPLICATION_MODE |
getApplicationMode(String ssoToken,
String clusterName,
String appName)
Gets the application mode for the Application specified.
|
byte[] |
getApplicationProfileData(String ssoToken,
String clusterName,
String applicationName)
Extracts the profile data for the given application name.
|
APPLICATION_RULES_MODE |
getApplicationRulesMode(String ssoToken,
String clusterName,
String appName)
Gets the application rules mode for the Application specified.
|
List<ApplicationInformation> |
getApplications(String clusterName,
String ssoToken,
String language)
Return the List of applications in the form the ApplicationInformation object..
the application list would be provisioned for this user. identifies with the Sso Token. |
List<APPLICATION_ENABLED_STATUS> |
getApplicationsEnabledStatus(String ssoToken,
String clusterName,
String serverName,
List<String> applicationNames)
Returns the list of application mode status as enabled or disabled for the list of application names.
|
byte[] |
getApplicationSettingsData(String ssoToken,
String clusterName,
String applicationName)
Extracts the app settings data for the given application name.
|
List<APPLICATION_TYPES> |
getApplicationType(String ssoToken,
String serverName,
String applicationName)
Return the application type enum.
|
String |
getAvailableCluster(String ssoToken)
Return the list of Clusters for a user, It calls enumClusters() method of JHsxClient class if, cluster list was update more than 2 mins ago.
|
String |
getAvailableServer(String ssoToken)
Returns the available server .
|
String |
getAvailableServer(String ssoToken,
String clusterName)
Returns the available server in the given cluster.
|
Map<String,String> |
getDSNDetails(String clusterName,
String ssoToken,
String dsnName)
Extracts the DSN information as a map for the given dsn name.
|
int |
getHsxServerPort(String serverName)
Returns the get HsxServer port of the given server.
|
List<ModuleDetails> |
getModuleConfig(String ssoToken,
String clusterName,
String applicationName)
Get the modules that are disabled for the application.
|
String |
getUserPreferenceValue(String ssoToken,
String clusterName,
String appName,
USERPREFERENCES preference)
Gets the user preferences.
|
int |
importApplication(String clusterName,
String ssoToken,
String appName,
String newAppName,
String newAppDescription,
boolean isImportTaskAudit,
boolean isImportData,
String projectName,
boolean isHFMMode,
String dbLinkName,
String scenarioList,
String yearList,
String hfmDBName) |
int |
importApplication(String clusterName,
String ssoToken,
String appName,
String newAppName,
String newAppDescription,
boolean isImportTaskAudit,
boolean isImportData,
String projectName,
boolean isHFMMode,
String dbLinkName,
String scenarioList,
String yearList,
String hfmDBName,
boolean purgeSourceData) |
void |
killAdminTask(String ssoToken,
String internalKey,
String clusterName,
String applicationName)
Kills the admin task (that is running) specified.
|
List<LogoutUserStatus> |
logoutAllUsers(String ssoToken,
String clusterName,
String serverName,
String applicationName,
boolean forcedLogout)
Logouts the all the users from the environment.
|
List<LogoutUserStatus> |
logoutUsers(String ssoToken,
String clusterName,
List<LogoutUserInfo> userInfoList,
boolean forcedLogout)
Logouts the list of users given.
|
int |
modifyApplication(String clusterName,
String ssoToken,
String applicationName,
InputStream profileFileContents)
Modifies the application , with the profile content given.
|
List<String> |
provisionedAppsForUser(String ssoToken)
This mthod return the list of Application names provisioned for a user.
|
void |
refreshCachedXfmParameter(String clusterName,
String ssoToken,
String appName) |
void |
registerApplication(String ssoToken,
String clusterName,
String appName,
String appDescription,
String projectName,
String webServerURL)
Creates an applicaiton on the server.
|
void |
removeDeadAdminTasks(String ssoToken,
String internalKey,
String clusterName)
Removes all the Admin tasks that are not running currently.
|
void |
restartApplication(String serverName,
String applicationName,
String ssoToken,
Locale locale,
boolean force)
Will shutdown the Datasource associated with the application.
|
int |
restoreApplication(String clusterName,
String ssoToken,
String appName,
String path,
int rowCount,
boolean isForceRestore)
Restores the application from the backup file .
|
void |
setAdminMode(String ssoToken,
String clusterName,
String appName,
boolean adminMode)
Enables/Disables the admin mode for the Application specified.
|
void |
setAllUserPreferenceValues(String ssoToken,
String clusterName,
String appName,
Map<USERPREFERENCES,String> preferences)
Sets the user preference for the given application name.
|
void |
setApplicationMode(String ssoToken,
String clusterName,
String appName,
APPLICATION_MODE appMode)
Sets the application mode for the Application specified.
|
boolean |
setApplicationsEnabledStatus(String ssoToken,
String clusterName,
List<String> serverName,
List<String> applicationName,
APPLICATION_ENABLED_STATUS status)
Sets the application enabled / disabled mode.
|
void |
setModuleConfig(String ssoToken,
String clusterName,
String applicationName,
List<ModuleDetails> moduleDetailsList)
Set the modules that are disabled for the application.
|
boolean |
shutDownApplication(String applicationName,
String ssoToken,
boolean isForceKill)
Shuts down the application on all the Jhsxserver instances across all the clusters and servers.
|
boolean |
shutDownApplication(String serverName,
String applicationName,
String ssoToken,
boolean isForceKill)
Shuts down the application on the mentioned server name.
|
public SessionOM()
throws HFMException
HFMException - - throws HFMException.public List<String> enumCluster() throws HFMException
HFMException - - throws HFMException.
usage : List of Strings = SessionOM.enumClusters();public String getAvailableCluster(String ssoToken) throws HFMException
ssoToken - - the sso token.HFMExceptionpublic List<String> enumServers(String cluster) throws HFMException
cluster - - the cluster name.HFMExceptionpublic List<APPLICATION_TYPES> getApplicationType(String ssoToken, String serverName, String applicationName) throws HFMException
ssoToken - -the ssoTokenserverName - - Name of the server.applicationName - - the application name.HFMException - - throws HFM exception.public List<ApplicationInformation> getApplications(String clusterName, String ssoToken, String language) throws HFMException
clusterName - - Name of the serverssoToken - ssoToken.language - - the language .HFMException - - throws HFM Exception.public List<String> enumProvisioningProjects(String ssoToken) throws HFMException
ssoToken - ssoTokenHFMExceptionpublic List<String> provisionedAppsForUser(String ssoToken) throws HFMException
ssoToken - - the sso token.HFMExceptionpublic SessionInfo createSession(String ssoToken, Locale locale, String clusterName, String appName) throws HFMException
ssoToken - a valid ssoTokenlocale - object.clusterName - a vaid Custer nameappName - Application which wil be openedHFMException - - throws HFM Exception.public SessionInfo createSession(String user, String password, Locale locale, String server, int port, String appName) throws HFMException
user - a valid user namepassword - password for userlocale - object.server - a vaid server nameappName - Application which wil be openedHFMException - - throws HFM Exception.public SessionInfo createSession(String ssoToken, Locale locale, String server, int port, String appName) throws HFMException
ssoToken - locale - object.server - a vaid server nameappName - Application which wil be openedHFMException - - throws HFM Exception.public void createApplication(String ssoToken, String clusterName, String appName, String appDescription, InputStream profileStream, String projectName, String webServerURL, APPLICATION_TYPES appType) throws HFMException
ssoToken - - web session, not application session id for current userclusterName - - the server or cluster to create the application onappName - - the name of the application to createappDescription - - the description of the applicationprofileStream - - inputstream that contains the profile informationprojectName - - the profile the application will be created underwebServerURL - - the HFM web server urlappType - - type of the applicationHFMException - - if an error occurs while creating the applicationpublic void registerApplication(String ssoToken, String clusterName, String appName, String appDescription, String projectName, String webServerURL) throws HFMException
ssoToken - - web session, not application session id for current userclusterName - - the server or cluster to create the application onappName - - the name of the application to createappDescription - - the description of the applicationprojectName - - the profile the application will be created underwebServerURL - - the HFM web server urlHFMException - - if an error occurs while creating the applicationpublic void deleteApplication(String ssoToken, String clusterName, String applicationName) throws HFMException
ssoToken - The unique token for the logged in userclusterName - The cluser name to delete the application underapplicationName - The name of the applicationHFMExceptionpublic void setApplicationMode(String ssoToken, String clusterName, String appName, APPLICATION_MODE appMode) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.appName - - the application name.appMode - - the application mode.HFMException - - throws HFMException.public APPLICATION_MODE getApplicationMode(String ssoToken, String clusterName, String appName) throws HFMException
ssoToken - - the sso Token.clusterName - - the cluster name.appName - - the application name.HFMException - - throws HFMException.public APPLICATION_RULES_MODE getApplicationRulesMode(String ssoToken, String clusterName, String appName) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.appName - - the application name.HFMException - - throws HFMException.public void setAdminMode(String ssoToken, String clusterName, String appName, boolean adminMode) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.appName - - the application name.adminMode - - the admin mode flag.HFMException - - throws HFMException.public Map<USERPREFERENCES,String> getAllUserPreferenceValues(String ssoToken, String clusterName, String appName) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.appName - - the application name.HFMException - - throws HFMException.public String getUserPreferenceValue(String ssoToken, String clusterName, String appName, USERPREFERENCES preference) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.appName - - the application name.preference - - the user preferences.HFMException - - throws HFMException.public void setAllUserPreferenceValues(String ssoToken, String clusterName, String appName, Map<USERPREFERENCES,String> preferences) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.appName - - the app name.preferences - - the map of USERPREFERENCESHFMException - - throws HFMException.public List<String> getApplicationLanguages(String ssoToken, String clusterName, String applicationName) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.applicationName - - the application name.HFMException - - throw HFMException.public int duplicateApplication(String clusterName, String ssoToken, String appName, String newAppName, String newAppDescription, boolean isCopyTaskAudit, boolean isCopyDataAudit, String projectName, boolean isHFMMode) throws HFMException
clusterName - - the cluster name,ssoToken - - the sso token.appName - - the application name.newAppName - - the new application name.newAppDescription - - the new application description.isCopyTaskAudit - - is copy task audit table is enabled.isCopyDataAudit - - is copy data audit table is enabled/HFMException - - throws HFMException.public int importApplication(String clusterName, String ssoToken, String appName, String newAppName, String newAppDescription, boolean isImportTaskAudit, boolean isImportData, String projectName, boolean isHFMMode, String dbLinkName, String scenarioList, String yearList, String hfmDBName) throws HFMException
HFMExceptionpublic int importApplication(String clusterName, String ssoToken, String appName, String newAppName, String newAppDescription, boolean isImportTaskAudit, boolean isImportData, String projectName, boolean isHFMMode, String dbLinkName, String scenarioList, String yearList, String hfmDBName, boolean purgeSourceData) throws HFMException
HFMExceptionpublic void refreshCachedXfmParameter(String clusterName, String ssoToken, String appName) throws HFMException
HFMExceptionpublic int backupApplication(String clusterName, String ssoToken, String appName, String path, boolean isToBeScrambled, double scramblingValue, boolean isCopyTaskAudit, boolean isCopyDataAudit, int rowCount) throws HFMException
clusterName - - the cluster name.ssoToken - - the sso token.appName - - the application name.path - - the absolute path where the backup file should be placed.isToBeScrambled - - is the data tables has to be scrambled.scramblingValue - - the scrambling value for the data files.isCopyTaskAudit - - is copy task audit table is enabled.isCopyDataAudit - - is copy data audit table is enabled.rowCount - - the table query row count fetch.HFMException - - throws HFMException.public int restoreApplication(String clusterName, String ssoToken, String appName, String path, int rowCount, boolean isForceRestore) throws HFMException
clusterName - - the cluster name.ssoToken - - the sso token.appName - - the application name.path - - the absolute path for the backup file.rowCount - - the row count for table fetch size.isForceRestore - - is force restore is enabled.HFMException - - throws HFMexception.public AdminTaskProgress getAdminTaskProgress(String clusterName, String ssoToken, int taskID) throws HFMException
clusterName - - the cluster name.ssoToken - - the cluster name.taskID - - the admin task id.HFMException - - throws HFMException.public AdminTaskProgress getAdminTaskProgress(String clusterName, String ssoToken, int taskID, long poolingTime) throws HFMException, InterruptedException
clusterName - - the clustername.ssoToken - - the sso token.taskID - - the task id.poolingTime - - the configurable pooling time.HFMExceptionInterruptedExceptionpublic byte[] getAdminTaskLogData(String ssoToken, String clusterName, int taskID) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.taskID - - the admin task id.HFMException - - throws HFMException.public void removeDeadAdminTasks(String ssoToken, String internalKey, String clusterName) throws HFMException
ssoToken - valid sso token for authenticationinternalKey - Internal code for validationclusterName - valid cluster nameHFMExceptionpublic byte[] getApplicationProfileData(String ssoToken, String clusterName, String applicationName) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.applicationName - - the application name.HFMException - - throws HFMException.public void killAdminTask(String ssoToken, String internalKey, String clusterName, String applicationName) throws HFMException
ssoToken - valid sso token for authenticationinternalKey - Internal code for validationclusterName - valid cluster nameapplicationName - Application NameHFMExceptionpublic String getAvailableServer(String ssoToken, String clusterName) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.HFMException - - throws HFMException.public String getAvailableServer(String ssoToken) throws HFMException
ssoToken - - the sso token.HFMException - - throws HFMException.public int getHsxServerPort(String serverName) throws HFMException
serverName - - the server name.HFMException - - throws HFMException.public List<LogoutUserStatus> logoutUsers(String ssoToken, String clusterName, List<LogoutUserInfo> userInfoList, boolean forcedLogout) throws HFMException
ssoToken - - the sso token.clusterName - - the clustername.userInfoList - - the list of user information list.forcedLogout - - is forced log out is enabled.HFMException - - throws HFMException.public List<LogoutUserStatus> logoutAllUsers(String ssoToken, String clusterName, String serverName, String applicationName, boolean forcedLogout) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.serverName - - the server name,applicationName - - the application name.forcedLogout - - is forced logout.HFMException - - throws HFMException.public List<ModuleDetails> getModuleConfig(String ssoToken, String clusterName, String applicationName) throws HFMException
ssoToken - sso tokenclusterName - cluster that will be responsible for connectingapplicationName - the application name of the application to be updatedHFMException - - throws HFMException.public void closeSession(SessionInfo sessionInfo) throws HFMException
sessionInfo - - the session info information.HFMException - -throws HFMException.public void setModuleConfig(String ssoToken, String clusterName, String applicationName, List<ModuleDetails> moduleDetailsList) throws HFMException
ssoToken - sso token.clusterName - cluster that will be responsible for connecting.applicationName - the application name of the application to be updated.moduleDetailsList - List of disabled modules.HFMException - - throws HFMException.public Map<String,String> getDSNDetails(String clusterName, String ssoToken, String dsnName) throws HFMException
ssoToken - sso token.clusterName - cluster that will be responsible for connecting.dsnName - - the dsn name.HFMException - - throws HFMException.public boolean shutDownApplication(String applicationName, String ssoToken, boolean isForceKill) throws HFMException
ssoToken - applicationName - isForceKill - HFMExceptionpublic boolean shutDownApplication(String serverName, String applicationName, String ssoToken, boolean isForceKill) throws HFMException
serverName - applicationName - ssoToken - isForceKill - HFMExceptionpublic int modifyApplication(String clusterName, String ssoToken, String applicationName, InputStream profileFileContents) throws HFMException
clusterName - ssoToken - applicationName - profileFileContents - HFMExceptionpublic boolean setApplicationsEnabledStatus(String ssoToken, String clusterName, List<String> serverName, List<String> applicationName, APPLICATION_ENABLED_STATUS status) throws HFMException
ssoToken - clusterName - serverName - applicationName - status - HFMExceptionpublic List<APPLICATION_ENABLED_STATUS> getApplicationsEnabledStatus(String ssoToken, String clusterName, String serverName, List<String> applicationNames) throws HFMException
ssoToken - clusterName - serverName - applicationNames - HFMExceptionpublic APPLICATION_ENABLED_STATUS getApplicationEnabledStatus(String ssoToken, String clusterName, String serverName, String applicationName) throws HFMException
ssoToken - clusterName - serverName - applicationName - HFMExceptionpublic void restartApplication(String serverName, String applicationName, String ssoToken, Locale locale, boolean force) throws HFMException
ssoToken - credentials.applicationName - name of application cannot be null or empty.locale - locale to createSession.force - force shutdown of datasource regardless of whether there are running tasks (Currently not used).HFMException - if parameters are invalid errorCode=INVALID_PARAMETERS.
if the user does not have admin rights errorCode=USER_NOT_PROVISIONED_FOR_SYS_ADMIN.
if an unknown exception occurs errorCode=ERROR_RESTARING_APPLICATION.public byte[] getApplicationSettingsData(String ssoToken, String clusterName, String applicationName) throws HFMException
ssoToken - - the sso token.clusterName - - the cluster name.applicationName - - the application name.HFMException - - throws HFMException.Copyright 2007, 2026, Oracle. All rights reserved.