Package com.primavera.integration.client
Class DistributedSession
java.lang.Object
com.primavera.integration.client.Session
com.primavera.integration.client.DistributedSession
- All Implemented Interfaces:
Closeable,AutoCloseable
Distributed Session class, used with RMI when running in Remote Mode.
-
Field Summary
Fields inherited from class com.primavera.integration.client.Session
BATCH_OVERRIDE, DEFAULT_BIND_PARAM_LIMIT_ON_LOAD, DEFAULT_LOCAL_BATCH_SIZE, DEFAULT_REMOTE_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
Modifier and TypeMethodDescriptioncom.primavera.integration.apiapps.ImportExportProjectsOutputexportProjects(com.primavera.integration.apiapps.ImportExportProjectsInput input) getAdminConfigSetting(String name, Class type) JobInfo[]Retrieves job information for any current asynchronous jobs of this user.static DatabaseInstance[]getDatabaseInstances(String sUrl) Retrieves all database instances supported by the server.getTemplateMap(String templateId, String userId) byte[]getUCMDocument(String uuid, String version) Gets the byte array of UCM document.getUCMDocumentDetail(String uuid) Gets the most recent version of a content repository document.getUCMDocumentsRecentVersion(List<String> uuids) Gets the most recent version of each document.getUCMVersionHistory(String uuid) Gets all the versions of a content repository document.Gets the user id of the current user.Returns anObjectIdrepresentation of the usession idcom.primavera.integration.apiapps.ImportExportProjectsOutputimportProjects(com.primavera.integration.apiapps.ImportExportProjectsInput input) booleanisValid()Verifies if the session is valid.Loads the safety date from the database.static SessionLogs in and obtains a Session object.voidlogout()Notifies the server that this session is no longer needed and release any resource allocated for this session.intpopulateUPKLIST(ObjectId epsObjectId) intremoveDeletedObjectsFromBaseline(String boTypeName, ObjectId origProjectId, ObjectId blProjectId, Collection<String> parentActivityIdsToConsider) Removes certain child objects from a baseline which do not exist in the original project This method is only supported for local sessions.voidMethods inherited from class com.primavera.integration.client.Session
close, fixupWhereClause, getBatchFailOnFirstFlag, getBindParameterLimitOnLoad, getBusinessObjectBatchSize, getDatabaseEncoding, getDatabaseInstanceId, getDatabaseName, getDatabaseType, getDatabaseTypeEnum, getDatabaseUrl, getEnterpriseLoadManager, getGlobalObjectManager, getJobManager, getSessionId, getUserName, isLocalModeAvailable, isRemoteModeAvailable, login, pagingLoad, setBatchFailOnFirstFlag, setBindParameterLimitOnLoad, setBusinessObjectBatchSize, setExportOption, setIpmDarExportOption
-
Method Details
-
getDatabaseInstances
public static DatabaseInstance[] getDatabaseInstances(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-sideNetworkException- if a problem occurred in the network layer
-
login
public static Session login(String sUrl, String sDbId, String sUserName, String sPassword, String remoteClientIP) throws ServerException, NetworkException Logs in and obtains a Session object.- Parameters:
sUrl- the location of the serversDbId- the database instance idsUserName- the user namesPassword- the password- Returns:
- Session session object
- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- 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. -
isValid
Verifies if the session is valid.- Specified by:
isValidin classSession- Returns:
- true if session is valid
- Throws:
NetworkException- if a problem occurred in the network layer
-
getUserObjectId
Gets the user id of the current user.- Specified by:
getUserObjectIdin classSession- Returns:
- ObjectId the user object id
- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layer
-
getUSessionId
Returns anObjectIdrepresentation of the usession id- Specified by:
getUSessionIdin classSession- Returns:
- ObjectId USessionId
- Throws:
ServerException- if a problem occurred on the server-sideNetworkException- if a problem occurred in the network layer
-
getCurrentJobs
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-sideNetworkException- if a problem occurred in the network layer
-
loadSafetyDate
Description copied from class:SessionLoads 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:
loadSafetyDatein classSession- Returns:
- the safety date
- Throws:
ServerException- when a Server exception occursNetworkException- when a Network exception occurs
-
getUCMDocument
Description copied from class:SessionGets the byte array of UCM document.- Specified by:
getUCMDocumentin classSession- Parameters:
uuid- the UCM ID of a document.version- the version of the document.- Returns:
- the contents of a content repository document.
- Throws:
Exception- if a problem occurred.
-
getUCMVersionHistory
Description copied from class:SessionGets all the versions of a content repository document.- Specified by:
getUCMVersionHistoryin classSession- Parameters:
uuid- the ID of a content repository document.- Returns:
- all versions of a content repository document.
- Throws:
Exception- if a problem occurred.
-
getUCMDocumentsRecentVersion
Description copied from class:SessionGets the most recent version of each document.- Specified by:
getUCMDocumentsRecentVersionin classSession- Parameters:
uuids- the unique ID of content repository documents.- Returns:
- the most recent version of content repository documents.
- Throws:
Exception- if a problem occurred.
-
getUCMDocumentDetail
Description copied from class:SessionGets the most recent version of a content repository document.- Specified by:
getUCMDocumentDetailin classSession- Parameters:
uuid- the unique ID of a content repository document.- Returns:
- the recent version a content repository document.
- Throws:
Exception- if a problem occurred.
-
importProjects
public com.primavera.integration.apiapps.ImportExportProjectsOutput importProjects(com.primavera.integration.apiapps.ImportExportProjectsInput input) throws Exception - Overrides:
importProjectsin classSession- Throws:
Exception
-
exportProjects
public com.primavera.integration.apiapps.ImportExportProjectsOutput exportProjects(com.primavera.integration.apiapps.ImportExportProjectsInput input) throws Exception - Overrides:
exportProjectsin classSession- Throws:
Exception
-
removeDeletedObjectsFromBaseline
public int removeDeletedObjectsFromBaseline(String boTypeName, ObjectId origProjectId, ObjectId blProjectId, Collection<String> parentActivityIdsToConsider) throws ServerException Description copied from class:SessionRemoves certain child objects from a baseline which do not exist in the original project This method is only supported for local sessions.- Overrides:
removeDeletedObjectsFromBaselinein classSession- Parameters:
boTypeName- - the type of objects to remove. Supported type names are ["ActivityCodeAssignment", "ActivityUDFValue"]origProjectId- - ObjectId of original projectblProjectId- - ObjectId of the baseline projectparentActivityIdsToConsider- - If non-null, only the child objects owned by these activities will be considered for removal- Returns:
- The number of objects deleted
- Throws:
ServerException- if a problem occurred on the server-side, or an unsupported bOTypeName was provided, or if this method was called from a non-local session
-
populateUPKLIST
- Specified by:
populateUPKLISTin classSession- Throws:
ServerExceptionNetworkException
-
getTemplateMap
public Map<Object,Object> getTemplateMap(String templateId, String userId) throws ServerException, NetworkException - Specified by:
getTemplateMapin classSession- Throws:
ServerExceptionNetworkException
-
getAdminConfigSetting
public Object getAdminConfigSetting(String name, Class type) throws ServerException, NetworkException - Specified by:
getAdminConfigSettingin classSession- Throws:
ServerExceptionNetworkException
-
updateLicense
- Specified by:
updateLicensein classSession- Throws:
ServerExceptionNetworkException
-