www.element4solution.com

e4s.application
Interface E4ApplObj_Intf

All Known Implementing Classes:
E4ApplObj, E4ApplObjBasic, E4ApplObjSimple, E4DBApplObjectTemporary, E4ModuleLogin.E4TempApplObj

public interface E4ApplObj_Intf

Holds some general but application specific data, based on the current user running this session. Object will be created after login.

Since:
JDK 1.4
See Also:
E4Client, {@tutorial Example_E4ApplObj}

Field Summary
static java.lang.String SESSION_OBJ_ID
           
 
Method Summary
 boolean canBeUsedForSystemLogin()
           
 boolean canDo(E4Permission_Intf permission)
          Checks, if the user is allowed on the specified permission.
 java.lang.String getClient_Name()
          Get the name of the client.
 java.lang.String getClient_RootPath(boolean absolute)
          Get the root path for the current E4Client.
 java.lang.String getClient_URL()
          Get the URL related to the client.
 E4Client getClient()
          Get the E4Client of the user running the application.
 java.lang.String getCompany_Name()
          Get the name of the company.
 CountryCode getCountryCode()
          Get the country-code which depends on the client.
 java.text.SimpleDateFormat getDateFormat()
          Get the date format.
 E4DecimalSign getDecimalSign()
          Get the decimal sign, as to be used for float representation.
 Language getLanguage()
          Get the language-code which depends on the client (user).
 java.util.Date getLoginTime()
          Get the login time (the time this object was instanciated)
 E4Permission[] getPermissions()
          Get all valid permissions for that user.
 int getScreenHeight()
          Get Screen Height (if supported by login method)
 int getScreenWidth()
          Get Screen Width (if supported by login method)
 java.lang.String getSession()
           
 java.text.SimpleDateFormat getTimeFormat()
          Get the date format.
 TimeZone getTimeZone()
          Get the time zone for the current logged in user.
 java.lang.String getUser_Name()
          Get the name of the user.
 E4User getUser()
           
 void setLanguage(Language language)
          Set the language-code which depends on the client (user).
 

Field Detail

SESSION_OBJ_ID

static final java.lang.String SESSION_OBJ_ID
See Also:
Constant Field Values
Method Detail

getClient

E4Client getClient()
Get the E4Client of the user running the application.

Returns:
the E4Client

getClient_RootPath

java.lang.String getClient_RootPath(boolean absolute)
Get the root path for the current E4Client. The root path of the client identifies the area where client specific files to be stored. It is based on the entry E4Settings.getHttpRoot().

Parameters:
absolute - construct an absolute path using the E4Settings.getHttpRoot()
See Also:
getClient_URL(), E4Settings.getHttpRoot(), e4s.application.E4Client#getRootPath(boolean), E4Client.RELATIVE_ROOT_PATH

getClient_URL

java.lang.String getClient_URL()
Get the URL related to the client.

Parameters:
absolute - construct an absolute path using the E4Settings.getHttpRoot()
See Also:
#getClient_RootPath(), E4Settings.DOCBASE, e4s.application.E4Client#getClient_URL(boolean), E4Client.RELATIVE_ROOT_PATH

getClient_Name

java.lang.String getClient_Name()
Get the name of the client.

See Also:
getClient()

getCompany_Name

java.lang.String getCompany_Name()
Get the name of the company.

See Also:
getUser()

getUser_Name

java.lang.String getUser_Name()
Get the name of the user.

See Also:
getUser()

getUser

E4User getUser()

getLoginTime

java.util.Date getLoginTime()
Get the login time (the time this object was instanciated)

Returns:
the login time

getDecimalSign

E4DecimalSign getDecimalSign()
Get the decimal sign, as to be used for float representation.

Returns:
decimalsign (common used either ',' or '.')

getDateFormat

java.text.SimpleDateFormat getDateFormat()
Get the date format.

Returns:
the dateformat
See Also:
getTimeFormat(), E4ServletImplementation_Intf.getDateFormat(), T_E4S_COMPANY_USER_Sel.CI_DATEFORMAT

getTimeFormat

java.text.SimpleDateFormat getTimeFormat()
Get the date format.

Returns:
the timeformat
See Also:
getDateFormat(), E4ServletImplementation_Intf.getTimeFormat(), T_E4S_COMPANY_USER_Sel.CI_TIMEFORMAT

getTimeZone

TimeZone getTimeZone()
Get the time zone for the current logged in user.

Returns:
the timezone, 0 means GMT

getCountryCode

CountryCode getCountryCode()
Get the country-code which depends on the client. Note, that this is not the user's countrycode as it is necessary to have a E4Client dependent value, e.g. for a calendar.

Returns:
countrycode, using ISO abbreviations

getLanguage

Language getLanguage()
Get the language-code which depends on the client (user).

Returns:
language-code, using ISO abbreviations
See Also:
getLanguage()

setLanguage

void setLanguage(Language language)
                 throws java.lang.Exception
Set the language-code which depends on the client (user).

Parameters:
language - the language-code, using ISO abbreviations
Throws:
java.lang.Exception
See Also:
setLanguage(e4s.application.Language)

canDo

boolean canDo(E4Permission_Intf permission)
Checks, if the user is allowed on the specified permission. The group permission stands above the company permission which stands above the user permission. A group permission can deny (-1), grant (+1) or delegate (0) a permission. If delegated, then the company permission becames relevant, which also can deny, grant or delegate. Again, if delegated on company level then the user permission becomes relevant.

See Also:
E4ModuleEditPermissions, E4PermissionRegistry, E4ModuleImplementation.getApplication_Permissions(), E4ModuleImplementation.getE4S_Permissions()

getPermissions

E4Permission[] getPermissions()
Get all valid permissions for that user.

Returns:
null if no permissions are defined

getScreenWidth

int getScreenWidth()
Get Screen Width (if supported by login method)

See Also:
getScreenHeight()

getScreenHeight

int getScreenHeight()
Get Screen Height (if supported by login method)

See Also:
getScreenWidth()

getSession

java.lang.String getSession()

canBeUsedForSystemLogin

boolean canBeUsedForSystemLogin()

www.element4solution.com