|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.accpac.sm.Session
@ThreadSafe public class Session
Represents an authenticated session with the Sage Sage 300 ERP System
Manager.
The caller must call the dispose
method when finished with
the object so that all its resources can be released. The caller must not
call any other method on the object after calling dispose.
Constructor Summary | |
---|---|
Session(ProgramSet programSet,
SharedDataSet sharedDataSet,
java.lang.String userID,
java.lang.String password,
java.lang.String companyID,
java.util.Date sessionDate)
constructs an instance of the Session class using a full set of
arguments. |
|
Session(java.lang.String userID,
java.lang.String password,
java.lang.String companyID,
java.util.Date sessionDate)
Constructs an instance of the Session class with a default
ProgramSet and SharedDataSet . |
Method Summary | |
---|---|
void |
dispose()
call this when the instance is no longer required, to free up resources. |
protected void |
finalize()
This implementation overrides the finalize method of object so that the dispose gets called if it hasn't already. |
java.lang.String |
getCharacterSetName()
Gets the name of the character set used for the session. |
java.lang.String |
getCompanyID()
Gets the company database ID that the current session is signed on to. |
java.lang.String |
getCompanyName()
Returns the name of the company |
IProgramSet |
getIProgramSet()
Get the session's program set |
ISharedDataSet |
getISharedDataSet()
Get the shared data set for this session |
LicenseStatus |
getLicenseStatus(java.lang.String appID,
java.lang.String appVersion)
Gets the license status of the given version of the given application. |
static Session |
getMetaDataInquirySession(ProgramSet programSet,
SharedDataSet sharedDataSet,
java.lang.String companyID)
constructs an instance of the Session class that can only be used
to inquire about the metadata of the application. |
ProgramSet |
getProgramSet()
Get the session's program set |
java.util.Date |
getSessionDate()
Gets the date represented by the session |
SharedDataSet |
getSharedDataSet()
Get the shared data set for this session |
java.lang.String |
getSystemID()
Gets the system database ID that the current session is signed on to. |
static java.lang.String |
getSystemVersion()
get the system version (e.g., "60A") |
java.lang.String |
getUserID()
Gets the Sage 300 ERP user ID of the session. |
java.lang.String |
getUserLanguage()
Gets the language preference of the current user. |
java.lang.String |
getUserName()
Gets the name of the current user. |
boolean |
isMetaDataInquiryOnly()
checks if the session is only to be used for inquiring about the metadata (e.g. |
boolean |
isTimecardUser()
check if the current user is a Timecard user. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Session(ProgramSet programSet, SharedDataSet sharedDataSet, java.lang.String userID, java.lang.String password, java.lang.String companyID, java.util.Date sessionDate)
Session
class using a full set of
arguments.
programSet
- the non-null ProgramSet
that the Session will usesharedDataSet
- the non-null SharedDataSet
that the Session will useuserID
- the non-null user IDpassword
- the non-null passwordcompanyID
- the non-null company ID (dataset)sessionDate
- the non-null session datepublic Session(java.lang.String userID, java.lang.String password, java.lang.String companyID, java.util.Date sessionDate)
Session
class with a default
ProgramSet
and SharedDataSet
.
userID
- the non-null user IDpassword
- the non-null passwordcompanyID
- the non-null company ID (dataset)sessionDate
- the non-null session dateMethod Detail |
---|
public static Session getMetaDataInquirySession(ProgramSet programSet, SharedDataSet sharedDataSet, java.lang.String companyID)
Session
class that can only be used
to inquire about the metadata of the application.
This is equivalent to logging on with the administrator credentials but only being able to look at the screens, not the data.
This is intended for internal use only; do not use this in third party code.
programSet
- the non-null ProgramSet
that the Session will usesharedDataSet
- the non-null SharedDataSet
that the Session will usecompanyID
- the non-null company ID (dataset)
Session
.isMetaDataInquiryOnly()
public void dispose()
NullPointerException
if this has already
been called.
dispose
in interface HasDispose
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getCharacterSetName()
getCharacterSetName
in interface ISession
public java.lang.String getCompanyID()
getCompanyID
in interface ISession
public final java.lang.String getCompanyName()
getCompanyName
in interface ISession
public IProgramSet getIProgramSet()
getIProgramSet
in interface ISession
IProgramSet
that the Session is using.public ISharedDataSet getISharedDataSet()
getISharedDataSet
in interface ISession
ISharedDataSet
for this sessionpublic LicenseStatus getLicenseStatus(java.lang.String appID, java.lang.String appVersion)
getLicenseStatus
in interface ISession
appID
- ID of the applicationappVersion
- version of the application
public ProgramSet getProgramSet()
ProgramSet
that the Session is using.public java.util.Date getSessionDate()
getSessionDate
in interface ISession
public java.lang.String getSystemID()
getSystemID
in interface ISession
public SharedDataSet getSharedDataSet()
SharedDataSet
for this sessionpublic static java.lang.String getSystemVersion()
public java.lang.String getUserID()
getUserID
in interface ISession
public java.lang.String getUserLanguage()
getUserLanguage
in interface ISession
public java.lang.String getUserName()
getUserName
in interface ISession
public boolean isMetaDataInquiryOnly()
isMetaDataInquiryOnly
in interface ISession
true
if the session is only to be used for inquiring about
field names etc.public boolean isTimecardUser()
isTimecardUser
in interface ISession
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |