Primavera Integration API 7.0

com.primavera.integration.client
Class DistributedSession

java.lang.Object
  extended by com.primavera.integration.client.Session
      extended by com.primavera.integration.client.DistributedSession

public class DistributedSession
extends Session

Distributed Session class, used with RMI when running in Remote Mode.


Field Summary
 
Fields inherited from class com.primavera.integration.client.Session
DEFAULT_BIND_PARAM_LIMIT_ON_LOAD, DEFAULT_LOCAL_BATCH_SIZE, MAX_BIND_PARAM_LIMIT_ON_LOAD, MAX_BUSINESS_OBJECT_BATCH_SIZE, MIN_BIND_PARAM_LIMIT_ON_LOAD, MIN_BUSINESS_OBJECT_BATCH_SIZE
 
Method Summary
 JobInfo[] getCurrentJobs()
          Retrieves job information for any current asynchronous jobs of this user.
static DatabaseInstance[] getDatabaseInstances(java.lang.String sUrl)
          Retrieves all database instances supported by the server.
 DocumentManager getDocumentManager()
          Deprecated. As of release 6.2, this method is no longer supported in the API.
 com.primavera.integration.collab.initiation.InitiationManager getInitiationManager()
          Deprecated. As of release 6.2, this method is no longer supported in the API.
 ObjectId getUserObjectId()
          Gets the user id of the current user.
 ObjectId getUSessionId()
          Returns an ObjectId representation of the usession id
 boolean isValid()
          Verifies if the session is valid.
 java.sql.Timestamp loadSafetyDate()
          Loads the safety date from the database.
static Session login(java.lang.String sUrl, java.lang.String sDbId, java.lang.String sUserName, java.lang.String sPassword)
          Logs in and obtains a Session object.
 void logout()
          Notifies the server that this session is no longer needed and release any resource allocated for this session.
 
Methods inherited from class com.primavera.integration.client.Session
getBatchFailOnFirstFlag, getBindParameterLimitOnLoad, getBusinessObjectBatchSize, getDatabaseEncoding, getDatabaseInstanceId, getDatabaseName, getDatabaseType, getDatabaseUrl, getEnterpriseLoadManager, getGlobalObjectManager, getJobManager, getUserName, getXMLExporter, getXMLImporter, isLocalModeAvailable, isRemoteModeAvailable, setBatchFailOnFirstFlag, setBindParameterLimitOnLoad, setBusinessObjectBatchSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDatabaseInstances

public static DatabaseInstance[] getDatabaseInstances(java.lang.String sUrl)
                                               throws ServerException,
                                                      NetworkException
Retrieves all database instances supported by the server.

Parameters:
sUrl - identify the location of the server
Returns:
DatabaseInstance[] array of DatabaseInstance objects representing available databases
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer

login

public static Session login(java.lang.String sUrl,
                            java.lang.String sDbId,
                            java.lang.String sUserName,
                            java.lang.String sPassword)
                     throws ServerException,
                            NetworkException
Logs in and obtains a Session object.

Parameters:
sUrl - the location of the server
sDbId - the database instance id
sUserName - the user name
sPassword - the password
Returns:
Session session object
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer

logout

public void logout()
Notifies the server that this session is no longer needed and release any resource allocated for this session. You should always call logout after you finish working with the API.

Specified by:
logout in class Session

isValid

public boolean isValid()
                throws NetworkException
Verifies if the session is valid.

Specified by:
isValid in class Session
Returns:
true if session is valid
Throws:
NetworkException - if a problem occurred in the network layer

getUserObjectId

public ObjectId getUserObjectId()
                         throws ServerException,
                                NetworkException
Gets the user id of the current user.

Specified by:
getUserObjectId in class Session
Returns:
ObjectId the user object id
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer

getUSessionId

public ObjectId getUSessionId()
                       throws ServerException,
                              NetworkException
Returns an ObjectId representation of the usession id

Specified by:
getUSessionId in class Session
Returns:
ObjectId USessionId
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer

getCurrentJobs

public JobInfo[] getCurrentJobs()
                         throws ServerException,
                                NetworkException
Retrieves job information for any current asynchronous jobs of this user.

Returns:
JobInfo[] array of JobInfo
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer

getDocumentManager

@Deprecated
public DocumentManager getDocumentManager()
Deprecated. As of release 6.2, this method is no longer supported in the API.

Description copied from class: Session
Gets the class that allows access to collaboration.

Specified by:
getDocumentManager in class Session
Returns:
the DocumentManager to access the collaboration space.

getInitiationManager

@Deprecated
public com.primavera.integration.collab.initiation.InitiationManager getInitiationManager()
Deprecated. As of release 6.2, this method is no longer supported in the API.

Description copied from class: Session
Gets the class that allows access to Initiation.

Specified by:
getInitiationManager in class Session
Returns:
the InitiationManager to access the Initiation space.

loadSafetyDate

public java.sql.Timestamp loadSafetyDate()
                                  throws ServerException,
                                         NetworkException
Description copied from class: Session
Loads the safety date from the database. The safety date can be used to identify business objects that have been updated since the last load of the safety date.

Specified by:
loadSafetyDate in class Session
Returns:
the safety date
Throws:
ServerException - when a Server exception occurs
NetworkException - when a Network exception occurs

Primavera Integration API 7.0

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.