|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.primavera.integration.client.Session
public abstract class Session
Session is the main class used for communicating with the server. A static login method is used to establish a valid session, that can then be used to access other main objects, such as the EnterpriseLoadManager
and the JobManager
. Logging in requires a valid database instance to be specified if multiple instances were defined, but a list of available database instances can be retrieved by calling getDatabaseInstances
(), even without first logging in.
Note that the only differences in client code between Local Mode and Remote Mode is the calls to getDatabaseInstances
() and login
(). For Remote Mode, the URL of the RMI server needs to be specified. The RMIURL
helper class can be used to create the URL.
Session is not a singleton, meaning you can establish multiple simultaneous sessions communicating with different servers and/or database instances. This can be useful for integrating with multiple Primavera databases.
When you are done working with the API, you should call logout
() to release the session.
Field Summary | |
---|---|
static int |
DEFAULT_BIND_PARAM_LIMIT_ON_LOAD
The default where clause bind parameter limit |
static int |
DEFAULT_LOCAL_BATCH_SIZE
The default batch size for loading business objects in Local Mode. |
static int |
MAX_BIND_PARAM_LIMIT_ON_LOAD
The maximum where clause bind parameter limit |
static int |
MAX_BUSINESS_OBJECT_BATCH_SIZE
The maximum batch size for loading the business objects. |
static int |
MIN_BIND_PARAM_LIMIT_ON_LOAD
The minimum where clause bind parameter limit |
static int |
MIN_BUSINESS_OBJECT_BATCH_SIZE
The minimum batch size for loading the business objects. |
Method Summary | |
---|---|
boolean |
getBatchFailOnFirstFlag()
Gets the flag that indicates whether batch creates and updates should be aborted when the first exception occurs (the default behavior), or whether the entire batch should be processed and then all business rule exceptions reported in a single BatchException. |
int |
getBindParameterLimitOnLoad()
Retrieves the current limit on bind parameters |
int |
getBusinessObjectBatchSize()
Retrieves the current batch size for loading business objects. |
java.lang.String |
getDatabaseEncoding()
Retrieves the database encoding this session is logged into |
java.lang.String |
getDatabaseInstanceId()
Retrieves the database instance ID used to login and establish this session. |
static DatabaseInstance[] |
getDatabaseInstances(java.lang.String sUrl)
Retrieves all database instances supported by the server. |
java.lang.String |
getDatabaseName()
Retrieves the name of the database this session is logged into. |
int |
getDatabaseType()
Retrieves the database type this session is logged into. |
java.lang.String |
getDatabaseUrl()
Retrieves the URL of the database this session is logged into. |
abstract DocumentManager |
getDocumentManager()
Deprecated. As of release 6.2, this method is no longer supported in the API. |
EnterpriseLoadManager |
getEnterpriseLoadManager()
Gets the EnterpriseLoadManager for this session. |
GlobalObjectManager |
getGlobalObjectManager()
Gets the GlobalObjectManager for this session. |
abstract com.primavera.integration.collab.initiation.InitiationManager |
getInitiationManager()
Deprecated. As of release 6.2, this method is no longer supported in the API. |
JobManager |
getJobManager()
Gets the JobManager for this session. |
java.lang.String |
getUserName()
Retrieves the name of the User who is logged in using this Session instance. |
abstract ObjectId |
getUserObjectId()
Retrieves the ObjectId of the User who is logged in using this Session instance. |
abstract ObjectId |
getUSessionId()
Returns and ObjectId representation of the usession id |
XMLExporter |
getXMLExporter()
Deprecated. As of release 6.2, the flat XML exporter XMLExporter should be used instead of the hierarchical exporter. |
XMLImporter |
getXMLImporter()
Deprecated. As of release 6.2, the flat XML importer XMLImporter should be used instead of the hierarchical importer. |
static boolean |
isLocalModeAvailable()
Indicates whether Local Mode is available. |
static boolean |
isRemoteModeAvailable()
Indicates whether Remote Mode is available. |
abstract boolean |
isValid()
Verifies if the session is valid. |
abstract 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. |
abstract void |
logout()
Notifies the server that this session is no longer needed and releases any resources allocated for this session. |
void |
setBatchFailOnFirstFlag(boolean fail)
Sets the flag that indicates whether batch creates and updates should be aborted when the first exception occurs (the default behavior), or whether the entire batch should be processed and then all business rule exceptions reported in a single BatchException. |
void |
setBindParameterLimitOnLoad(int iBindParameterLimit)
Set the new bind parameter limit for loading business objects. |
void |
setBusinessObjectBatchSize(int iBatchSize)
Set the new batch size for loading business objects. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_LOCAL_BATCH_SIZE
public static final int MAX_BUSINESS_OBJECT_BATCH_SIZE
public static final int MIN_BUSINESS_OBJECT_BATCH_SIZE
public static final int MAX_BIND_PARAM_LIMIT_ON_LOAD
public static final int MIN_BIND_PARAM_LIMIT_ON_LOAD
public static final int DEFAULT_BIND_PARAM_LIMIT_ON_LOAD
Method Detail |
---|
public static boolean isLocalModeAvailable()
public static boolean isRemoteModeAvailable()
public static DatabaseInstance[] getDatabaseInstances(java.lang.String sUrl) throws ServerException, NetworkException, ClientException
isRemoteModeAvailable
and isLocalModeAvailable
methods to check
if the specific modes are available. Note that instances can be added to a
configuration using the Primavera Administrator utility. See the Integration
API Installation Guide for more information.
sUrl
- the location of the server, or null for Local Mode. Use the RMIURL
class to create the URL.
ServerException
- if a problem occurred on the server-side
ClientException
- if a problem occurred on the client-side
NetworkException
- if a problem occurred in the network layerisRemoteModeAvailable
,
isLocalModeAvailable
public static Session login(java.lang.String sUrl, java.lang.String sDbId, java.lang.String sUserName, java.lang.String sPassword) throws ServerException, NetworkException, ClientException
isRemoteModeAvailable
and isLocalModeAvailable
methods to check
if the specific mode is available.
sUrl
- the location of the server, or null for Local Mode. Use the RMIURL
class to create the URL.sDbId
- the database instance idsUserName
- the user namesPassword
- the password
ServerException
- if a problem occurred on the server-side
ClientException
- if a problem occurred on the client-side
NetworkException
- if a problem occurred in the network layerisRemoteModeAvailable
,
isLocalModeAvailable
public abstract void logout()
public abstract boolean isValid() throws NetworkException
NetworkException
public abstract ObjectId getUserObjectId() throws ServerException, NetworkException
ObjectId
of the User
who is logged in using this Session instance.
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layerpublic GlobalObjectManager getGlobalObjectManager()
GlobalObjectManager
for this session.
public EnterpriseLoadManager getEnterpriseLoadManager()
EnterpriseLoadManager
for this session.
public JobManager getJobManager()
JobManager
for this session.
@Deprecated public XMLExporter getXMLExporter()
XMLExporter
should be used instead of the hierarchical exporter.
@Deprecated public XMLImporter getXMLImporter()
XMLImporter
should be used instead of the hierarchical importer.
public java.lang.String getDatabaseInstanceId()
public java.lang.String getUserName()
User
who is logged in using this Session instance.
public java.lang.String getDatabaseUrl()
public java.lang.String getDatabaseName()
public int getDatabaseType()
public java.lang.String getDatabaseEncoding()
public int getBusinessObjectBatchSize()
public void setBusinessObjectBatchSize(int iBatchSize) throws ClientException
iBatchSize
- the new batch size for loading business objects
ClientException
- the new batch size was wrongpublic int getBindParameterLimitOnLoad()
public void setBindParameterLimitOnLoad(int iBindParameterLimit) throws ClientException
iBindParameterLimit
- the new bind parameter limit for loading business objects
ClientException
- the new bind parameter limit is outside of acceptable rangepublic abstract ObjectId getUSessionId() throws ServerException, NetworkException
ObjectId
representation of the usession id
ServerException
- if a problem occurred on the server-side
NetworkException
@Deprecated public abstract DocumentManager getDocumentManager()
@Deprecated public abstract com.primavera.integration.collab.initiation.InitiationManager getInitiationManager()
public abstract java.sql.Timestamp loadSafetyDate() throws ServerException, NetworkException
ServerException
- when a Server exception occurs
NetworkException
- when a Network exception occurspublic void setBatchFailOnFirstFlag(boolean fail)
fail
- true to fail on first, false otherwisepublic boolean getBatchFailOnFirstFlag()
|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |