All Frameworks Class Hierarchy This Framework Previous Indexes
VPMPersistency Class VPMSession
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---VPMSession
Usage: you must use this class as is. You should never derive it.
public class VPMSession
This class is the singleton that is the entry point to all of
LCA transaction management, as well as data model object creation.
It is not meant to be instantiated manually, nor is it meant to be
subclassed.
Constructor and Destructor Index
- o
~VPMSession()
- Destructor
Method Index
- o
CloseSession()
- Close the session.
- o
CreateLoginSession(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,int&,CATIVpmLoginSession_var&)
- Create a login session.
- o
GetListOfVaults(CATLISTV(CATBaseUnknown_var)&)
-
- o
GetLoginSession(CATIVpmLoginSession_var&)
- Retrieve the login session
- o
GetPubSubManager(PubSubManager*&)
- Retrieve the PubSubManager
- o
GetSession()
-
Retrieve the current Session if one exists.
- o
GetVPMAdmin(VPMIAdmin**)
- Retrieve the VPM Administration.
- o
GetVPMBooking(VPMIBookingManager**)
- Retrieve the VPM Booking manager.
- o
GetVPMDictionaryManager(VPMIDicMgr_var&)
- Retrieve the dictionary manager.
- o
GetVPMObjectFactory(CATIVpmFactoryManager_var&)
- Retrieve the factory manager
- o
GetVaultSession(ENOVIVaultSession**)
-
- o
GetVaultUserSession(CATUnicodeString&,ENOVIVaultUserSession**)
-
- o
OpenSession()
- Open the global LCA session.
- o
SeekContainer(CATUnicodeString&,CATIContainer_var&,boolean)
- Looking for the container.
- o
get_ENOVObjectInfo(CATUnicodeString&,ENOVIObjectInfo_var&)
- Retrieve the object info for a specific type.
- o
get_ENOVPackageInfo(CATLISTV(CATBaseUnknown_var)&)
- Retrieve all the package infos.
- o
isClosing()
- is the session in the process of being closed.
Constructor and Destructor
o ~VPMSession
public virtual ~VPMSession( | )=0 |
-
Destructor
Methods
o CloseSession
public static HRESULT CloseSession( | ) |
-
Close the session.
- Parameters:
-
- iUserId
- The Id of the user.
- iPassword
- The password of the user
- Returns:
- An HRESULT value.
- S_OK
o CreateLoginSession
-
Create a login session.
- Parameters:
-
- iUserId
- The Id of the user.
- iPassword
- The password of the user
- iRole
- The role of the user
- iNetWorkMode
- 0 : Bus communication is not activated
1 : Bus communication is activated, communication demon must be present.
- oLoginSession
- The created login session.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- All went well and the login session was successfully created
- S_FALSE
- The login session already existed
- E_FAIL
- something went wrong
This call sets up a new LCA transaction associated with the given parameters.
Up until V5R12, calling this method multiple times only created one LoginSession object,
then returned the same one in subsequent calls. Starting with V5R13, this creates a new
LoginSession object for each call.
This means that there are certain limitations on which portion of the code
can or cannot call this method. Invoking CreateLoginSession also creates a
new transaction, so modeler or applicative code (for instance single-IDL commands)
MUST NOT invoke it.
Server-side batch programs running in mono-user context MUST call it exactly
once in their code. Inside a running LCA server, there must be exactly 2 calls
to CreateLoginSession: one in the LCA client login code, and another one in the
CATIA V5 interop login code; all other calls are unlawful and FORBIDDEN.
It is also forbidden to attempt any model modifications (VPMObject or vault)
before the LoginSession has been created.
o GetListOfVaults
-
- Deprecated:
- V5R14
This method is a no-op, which should have been deprecated since V5R12.
Retrieve the list of vaults.
- Parameters:
-
- oList
- The returned list
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- List OK
- S_FALSE
- Empty list
- E_FAIL
- A problem occurs during the process
o GetLoginSession
public HRESULT GetLoginSession( | CATIVpmLoginSession_var& | oLoginSession) |
-
Retrieve the login session
- Parameters:
-
- oLoginSession
- The login session.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Login session found
- E_FAIL
- Login session does not exist
Up until V5R12, this always returned the same object created by the first CreateLoginSession call.
Starting with V5R13, this may return a different object depending on the global context. This means
that it is strictly forbidden to store the returned LoginSession object in a global or any other place
reachable accross transaction boundaries.
o GetPubSubManager
public HRESULT GetPubSubManager( | PubSubManager*& | oPubSubManager) |
-
Retrieve the PubSubManager
- Parameters:
-
- oPubSubManager
- The PubSubManager.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- PubSubManager found
- E_FAIL
- PubSubManager can not be found
o GetSession
-
Retrieve the current Session if one exists.
- Returns:
- the current Session or NULL
Almost all applicative code should use this method rather than
OpenSession. The only case where using OpenSession rather than
GetSession is justified is for batch programs where the 'main' function
is not in DS code.
In V5R12 and in that version exclusively, the first GetSession call
will behave like an OpenSession.
o GetVPMAdmin
-
Retrieve the VPM Administration.
- Parameters:
-
- ioVPMAdmin
- The returned VPMAdmin (this should be AddRef()-ed, but isn't for now, it's too big a migration just yet).
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Admin has been initialized. No release to be done
- E_FAIL
- Admin not initialized or a problem occurs during the process
o GetVPMBooking
-
Retrieve the VPM Booking manager.
- Parameters:
-
- ioVPMBooking
- The returned booking manager, AddRef()-ed (the caller must Release when done).
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Booking has been initialized. No release to be done
- E_FAIL
- Booking not initialized or a problem occurs during the process
o GetVPMDictionaryManager
public HRESULT GetVPMDictionaryManager( | VPMIDicMgr_var& | ENOVIADictionary) |
-
Retrieve the dictionary manager.
- Parameters:
-
- ENOVIADictionary
- The returned dictionary
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Dictionary has been initialized
- E_FAIL
- Dictionary not initialized or a problem occurs during the process
o GetVPMObjectFactory
public HRESULT GetVPMObjectFactory( | CATIVpmFactoryManager_var& | oFactoryMng) |
-
Retrieve the factory manager
- Parameters:
-
- oFactoryMng
- The factory manager.
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Factory manager found or created
o GetVaultSession
-
- Deprecated:
- V5R16 CATIVpmLoginSession#GetVaultSession
Retrieve vault sessions.
- Parameters:
-
- oVaultSession
- The vault sessions found
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Operation succeeded
- E_FAIL
- A problem occurs during the process
o GetVaultUserSession
-
- Deprecated:
- V5R16 CATIVpmLoginSession#GetVaultUserSession
Retrieve vault user session.
- Parameters:
-
- iVaultName
- The vault name
- oVaultUserSession
- The vault user sessions found
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Operation succeeded
- E_FAIL
- A problem occurs during the process
o OpenSession
-
Open the global LCA session.
This loads all the global constant data of the LCA session.
If you want to create per user session, you need to call CreateLoginSession, which creates
a new transaction for the given parameters.
o SeekContainer
public HRESULT SeekContainer( | const CATUnicodeString& | iDomainName, |
| CATIContainer_var& | oContainer, |
| boolean | CreateFolderIfNotFound | =TRUE) |
-
Looking for the container.
- Parameters:
-
- iDomainName
- The name of the data domain
- oContainer
- The corresponding container
- CreateFolderIfNotFound
- If TRUE, create a folder if no folder exists
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- A container exist in session
- S_FALSE
- No container exits
- E_FAIL
- A problem occurs during the process
o get_ENOVObjectInfo
-
Retrieve the object info for a specific type.
- Parameters:
-
- iObjectType
- The type requested
- oObjectInfo
- The returned object info
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- Type is defined
- S_FALSE
- Type is not defined
- E_FAIL
- A problem occurs during the process
o get_ENOVPackageInfo
-
Retrieve all the package infos.
- Parameters:
-
- oPackageInfoList
- The returned list
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- List OK
- S_FALSE
- Empty list
- E_FAIL
- A problem occurs during the process
o isClosing
public static int isClosing( | ) |
-
is the session in the process of being closed.
- Returns:
- 0 if the session is not closing
1 if the session is closing
This object is included in the file: VPMSession.h
If needed, your Imakefile.mk should include the module: VX0FACTO