Package com.primavera.integration.client
Class LocalSession
java.lang.Object
com.primavera.integration.client.Session
com.primavera.integration.client.LocalSession
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
Local Session, used to avoid the RMI layer when running in Local Mode.
- See Also:
-
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAdminConfigSetting(String name, Class type) static SessionJobInfo[]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 idbooleanisValid()Verifies if the session is valid.Loads the safety date from the database.static Sessionstatic 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, exportProjects, fixupWhereClause, getBatchFailOnFirstFlag, getBindParameterLimitOnLoad, getBusinessObjectBatchSize, getDatabaseEncoding, getDatabaseInstanceId, getDatabaseName, getDatabaseType, getDatabaseTypeEnum, getDatabaseUrl, getEnterpriseLoadManager, getGlobalObjectManager, getJobManager, getSessionId, getUserName, importProjects, isLocalModeAvailable, isRemoteModeAvailable, pagingLoad, setBatchFailOnFirstFlag, setBindParameterLimitOnLoad, setBusinessObjectBatchSize, setExportOption, setIpmDarExportOption
-
Constructor Details
-
LocalSession
public LocalSession()
-
-
Method Details
-
getDatabaseInstances
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
-
login
public static Session login(String sUrl, String sDbId, String sUserName, String sPassword) throws ServerException - Throws:
ServerException
-
login
public static Session login(String sUrl, String sDbId, String sUserName, String sPassword, String remoteClientIP) throws ServerException 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-side
-
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
public boolean isValid()Verifies if the session is valid. -
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-side
-
getUSessionId
Returns anObjectIdrepresentation of the usession id- Specified by:
getUSessionIdin classSession- Returns:
- ObjectId USessionId
- Throws:
ServerException- if a problem occurred on the server-side
-
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
-
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-side
-
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 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.
-
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
-
updateLicense
- Specified by:
updateLicensein classSession- Throws:
ServerExceptionNetworkException
-
getAdminConfigSetting
public Object getAdminConfigSetting(String name, Class type) throws ServerException, NetworkException - Specified by:
getAdminConfigSettingin classSession- Throws:
ServerExceptionNetworkException
-
getAPISession
-