Package edm.edom3
Interface EDMContext
-
- All Known Subinterfaces:
EDMContextSSO
,EDMLocalContext
,EDMRemoteContext
public interface EDMContext
The context provides access to an EDM database.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EDMRow
communication()
Retrieve communication paramneter setjava.lang.String
getContextName()
Retrieve context nameEDMDataFactory
getDataFactory()
Get the data factory for this context.EDMGroup
getGroup()
Returns the group for the current userjava.lang.Object
getObject(java.lang.String key)
Assign an object to the contextedm.edom3.sdai.EDMSdaiFactory
getSdaiFactory()
Get the SDAI data factory for this context.EDMServer
getServer()
Get the EDM server wrapperEDMUser
getUser()
Returns the current EDM UserEDMWorkerFactory
getWorkerFactory()
Get the worker factory for this context.boolean
isLocal()
Check if this context is a local context or a remote contextvoid
login(java.lang.String username, java.lang.String groupname, java.lang.String password)
Login to EDM with the given user credentials.void
login(java.lang.String username, java.lang.String groupname, java.lang.String password, long timeout)
Login to EDM withthe given user credentials and a given timeoutvoid
logout()
Stop using this context and release allocated resourcesjava.lang.Object
removeObject(java.lang.String key)
Remove object from contextjava.lang.Object
setObject(java.lang.String key, java.lang.Object value)
Add object to context
-
-
-
Method Detail
-
communication
EDMRow communication() throws EdmiException
Retrieve communication paramneter set- Returns:
- communication parameter wrapper
- Throws:
EdmiException
- if the method fails
-
login
void login(java.lang.String username, java.lang.String groupname, java.lang.String password) throws EdmiException
Login to EDM with the given user credentials.- Parameters:
username
- user name for logingroupname
- null to use standard group, "" to use no grouppassword
- the user's password- Throws:
EdmiException
- if the method fails
-
login
void login(java.lang.String username, java.lang.String groupname, java.lang.String password, long timeout) throws EdmiException
Login to EDM withthe given user credentials and a given timeout- Parameters:
username
- user name for logingroupname
- null to use standard group, "" to use no grouppassword
- the user's passwordtimeout
- maximum idle time in millisecods before auto logout- Throws:
EdmiException
- if the method fails
-
logout
void logout() throws EdmiException
Stop using this context and release allocated resources- Throws:
EdmiException
- if the method fails
-
getUser
EDMUser getUser() throws EdmiException
Returns the current EDM User- Returns:
- the logged in user
- Throws:
EdmiException
- if the method fails
-
getGroup
EDMGroup getGroup() throws EdmiException
Returns the group for the current user- Returns:
- group object
- Throws:
EdmiException
- if the method fails
-
getDataFactory
EDMDataFactory getDataFactory() throws EdmiException
Get the data factory for this context.- Returns:
- current data factory
- Throws:
EdmiException
- if factory cannot be retrieved
-
getWorkerFactory
EDMWorkerFactory getWorkerFactory() throws EdmiException
Get the worker factory for this context. A worker is an non-instance object doing some work against the database, for example import file, export file, compile schema etc.- Returns:
- current worker factory
- Throws:
EdmiException
- if factory cannot be retrieved
-
getSdaiFactory
edm.edom3.sdai.EDMSdaiFactory getSdaiFactory() throws EdmiException
Get the SDAI data factory for this context.- Returns:
- current data factory
- Throws:
EdmiException
- if factory cannot be retrieved
-
isLocal
boolean isLocal() throws EdmiException
Check if this context is a local context or a remote context- Returns:
- true if local
- Throws:
EdmiException
- if something fails
-
getServer
EDMServer getServer() throws EdmiException
Get the EDM server wrapper- Returns:
- EDM server wrapper
- Throws:
EdmiException
- if the method fails
-
getContextName
java.lang.String getContextName()
Retrieve context name- Returns:
- name identifing this context
-
getObject
java.lang.Object getObject(java.lang.String key)
Assign an object to the context- Parameters:
key
- identifying key for this object, think of it as an Hashtable key- Returns:
- The found object
-
removeObject
java.lang.Object removeObject(java.lang.String key)
Remove object from context- Parameters:
key
- identifying key for this object, think of it as an Hashtable key- Returns:
- The deleted object, null if not found
-
setObject
java.lang.Object setObject(java.lang.String key, java.lang.Object value)
Add object to context- Parameters:
key
- identifying key for this object, think of it as an Hashtable keyvalue
- object to add- Returns:
- old object with same key, null if no previous object
-
-