|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecte4s.util.E4Object
e4s.application.E4ApplObjBasic
public abstract class E4ApplObjBasic
Basic functionality for application objects (e.g. E4ApplObj)
such as Language, Login-Time and E4Permission handling.
E4ApplObj| Field Summary | |
|---|---|
protected long |
m_created
|
protected Language |
m_language
|
protected java.util.Hashtable |
m_permissions
|
static java.lang.String |
PERMISSION_REASON_ADDED
Used as return value for #canDo_Reason(e4s.db.systabledef.E4Permission) ,
indicating that this was a permission added by the application using
grantPermission(e4s.db.systabledef.E4Permission). |
static java.lang.String |
PERMISSION_REASON_AND
|
static java.lang.String |
PERMISSION_REASON_COMPANY
Used as return value for #canDo_Reason(e4s.db.systabledef.E4Permission) , indicating that this was a group permission. |
static java.lang.String |
PERMISSION_REASON_GROUP
Used as return value for #canDo_Reason(e4s.db.systabledef.E4Permission) , indicating that this was a group permission. |
static java.lang.String |
PERMISSION_REASON_INITIALIZED
Used as return value for #canDo_Reason(e4s.db.systabledef.E4Permission) , indicating that the permissions have not been initialized
(all permission tables are empty). |
static java.lang.String |
PERMISSION_REASON_OR
|
static java.lang.String |
PERMISSION_REASON_USER
Used as return value for #canDo_Reason(e4s.db.systabledef.E4Permission) , indicating that this was a group permission. |
| Fields inherited from class e4s.util.E4Object |
|---|
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET |
| Fields inherited from interface e4s.application.E4ApplObj_Intf |
|---|
SESSION_OBJ_ID |
| Constructor Summary | |
|---|---|
E4ApplObjBasic()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
_getSVNVersionString()
Get version info string from subversion. |
java.lang.String |
canDo_Reason(E4Permission_Intf permission)
Get the reason for the permission. |
static java.lang.String |
canDo_Reason(E4Permission_Intf permission,
java.util.Hashtable pHash)
|
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. |
abstract 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()
Use the comma as default decimal sign. |
Language |
getLanguage()
Get the language 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 time format. |
TimeZone |
getTimeZone()
Get the time zone for the current logged in user. |
java.lang.String |
getUser_Name()
Get the name of the user. |
abstract E4User |
getUser()
|
void |
grantPermission(E4Permission perm)
|
void |
readPermission(E4Permission p)
|
void |
readPermission(E4Permission p,
E4ApplObj_Intf applobj)
|
void |
readPermissions()
Reads the group, company and user permissions into an internal structure (Hashtable) to make them available when the canDo(e4s.db.systabledef.E4Permission_Intf) function will be called. |
static java.util.Hashtable |
readPermissions(E4User user,
E4ApplObj_Intf applobj)
|
void |
setLanguage(Language language)
Set the language which depends on the client (user). |
void |
setScreenHeight(int height)
|
void |
setScreenWidth(int width)
|
void |
setSession(java.lang.String sessionId)
|
| Methods inherited from class e4s.util.E4Object |
|---|
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, toString, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface e4s.application.E4ApplObj_Intf |
|---|
canBeUsedForSystemLogin |
| Field Detail |
|---|
protected java.util.Hashtable m_permissions
protected Language m_language
protected long m_created
public static final java.lang.String PERMISSION_REASON_GROUP
#canDo_Reason(e4s.db.systabledef.E4Permission) , indicating that this was a group permission.
PERMISSION_REASON_COMPANY,
PERMISSION_REASON_USER,
#canDo_Reason(e4s.db.systabledef.E4Permission),
readPermissions(),
Constant Field Valuespublic static final java.lang.String PERMISSION_REASON_COMPANY
#canDo_Reason(e4s.db.systabledef.E4Permission) , indicating that this was a group permission.
PERMISSION_REASON_GROUP,
PERMISSION_REASON_USER,
#canDo_Reason(e4s.db.systabledef.E4Permission),
readPermissions(),
Constant Field Valuespublic static final java.lang.String PERMISSION_REASON_USER
#canDo_Reason(e4s.db.systabledef.E4Permission) , indicating that this was a group permission.
PERMISSION_REASON_GROUP,
PERMISSION_REASON_COMPANY,
#canDo_Reason(e4s.db.systabledef.E4Permission),
readPermissions(),
Constant Field Valuespublic static final java.lang.String PERMISSION_REASON_AND
public static final java.lang.String PERMISSION_REASON_OR
public static final java.lang.String PERMISSION_REASON_ADDED
#canDo_Reason(e4s.db.systabledef.E4Permission) ,
indicating that this was a permission added by the application using
grantPermission(e4s.db.systabledef.E4Permission).
PERMISSION_REASON_GROUP,
PERMISSION_REASON_COMPANY,
#canDo_Reason(e4s.db.systabledef.E4Permission),
readPermissions(),
Constant Field Valuespublic static final java.lang.String PERMISSION_REASON_INITIALIZED
#canDo_Reason(e4s.db.systabledef.E4Permission) , indicating that the permissions have not been initialized
(all permission tables are empty).
PERMISSION_REASON_GROUP,
PERMISSION_REASON_COMPANY,
PERMISSION_REASON_USER,
#canDo_Reason(e4s.db.systabledef.E4Permission),
Constant Field Values| Constructor Detail |
|---|
public E4ApplObjBasic()
| Method Detail |
|---|
public abstract E4Client getClient()
getClient in interface E4ApplObj_Intfpublic abstract E4User getUser()
getUser in interface E4ApplObj_Intfpublic java.lang.String getClient_RootPath(boolean absolute)
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().
getClient_RootPath in interface E4ApplObj_Intfabsolute - construct an absolute path using the E4Settings.getHttpRoot()E4Settings.getHttpRoot(),
e4s.application.E4Client#getRootPath(boolean),
E4Client.RELATIVE_ROOT_PATHpublic java.lang.String getClient_URL()
getClient_URL in interface E4ApplObj_Intf#getClient_RootPath(),
E4Settings.DOCBASE,
e4s.application.E4Client#getClient_URL(boolean),
E4Client.RELATIVE_ROOT_PATH
public void setLanguage(Language language)
throws java.lang.Exception
setLanguage in interface E4ApplObj_Intflanguage - the language, using ISO abbreviations
java.lang.ExceptiongetLanguage()public Language getLanguage()
getLanguage in interface E4ApplObj_IntfsetLanguage(e4s.application.Language)public java.util.Date getLoginTime()
getLoginTime in interface E4ApplObj_Intfpublic boolean canDo(E4Permission_Intf permission)
canDo in interface E4ApplObj_Intfpermission - the permission to be tested
java.lang.ExceptionE4ModuleEditPermissions,
E4PermissionRegistry,
E4ModuleImplementation.getApplication_Permissions(),
E4ModuleImplementation.getE4S_Permissions(),
#canDo_Reason(e4s.db.systabledef.E4Permission),
readPermissions()public E4Permission[] getPermissions()
getPermissions in interface E4ApplObj_Intf
public java.lang.String canDo_Reason(E4Permission_Intf permission)
throws E4PermissionException
PERMISSION_REASON_GROUP indicates that, or a company
permission which is indicated by PERMISSION_REASON_COMPANY or a user based
permission incicated by PERMISSION_REASON_USER.
E4PermissionException#canDo(e4s.db.systabledef.E4Permission),
readPermissions()
public static java.lang.String canDo_Reason(E4Permission_Intf permission,
java.util.Hashtable pHash)
public void readPermissions()
throws E4DBException
canDo(e4s.db.systabledef.E4Permission_Intf) function will be called.
E4DBExceptioncanDo(e4s.db.systabledef.E4Permission_Intf),
#canDo_Reason(e4s.db.systabledef.E4Permission)
public void readPermission(E4Permission p)
throws E4DBException
E4DBException
public void readPermission(E4Permission p,
E4ApplObj_Intf applobj)
throws E4DBException
E4DBExceptionpublic void grantPermission(E4Permission perm)
public static java.util.Hashtable readPermissions(E4User user,
E4ApplObj_Intf applobj)
throws E4DBException
E4DBExceptionpublic E4DecimalSign getDecimalSign()
getDecimalSign in interface E4ApplObj_IntfE4DecimalSign.C_COMMApublic java.text.SimpleDateFormat getDateFormat()
getDateFormat in interface E4ApplObj_IntfgetTimeFormat(),
E4ServletImplementation_Intf.getDateFormat(),
T_E4S_COMPANY_USER_Sel.CI_DATEFORMATpublic java.text.SimpleDateFormat getTimeFormat()
getTimeFormat in interface E4ApplObj_IntfgetDateFormat(),
E4ServletImplementation_Intf.getTimeFormat(),
T_E4S_COMPANY_USER_Sel.CI_TIMEFORMATpublic TimeZone getTimeZone()
getTimeZone in interface E4ApplObj_Intfpublic CountryCode getCountryCode()
E4ApplObj_IntfE4Client
dependent value, e.g. for a calendar.
getCountryCode in interface E4ApplObj_Intfpublic java.lang.String getClient_Name()
E4ApplObj_Intf
getClient_Name in interface E4ApplObj_IntfE4ApplObj_Intf.getClient()public java.lang.String getCompany_Name()
E4ApplObj_Intf
getCompany_Name in interface E4ApplObj_IntfE4ApplObj_Intf.getUser()public java.lang.String getUser_Name()
E4ApplObj_Intf
getUser_Name in interface E4ApplObj_IntfE4ApplObj_Intf.getUser()public void setScreenWidth(int width)
public void setScreenHeight(int height)
public int getScreenWidth()
E4ApplObj_Intf
getScreenWidth in interface E4ApplObj_IntfE4ApplObj_Intf.getScreenHeight()public int getScreenHeight()
E4ApplObj_Intf
getScreenHeight in interface E4ApplObj_IntfE4ApplObj_Intf.getScreenWidth()public java.lang.String getSession()
getSession in interface E4ApplObj_Intfpublic void setSession(java.lang.String sessionId)
public static java.lang.String _getSVNVersionString()
E4Util.getRevisionCodeFromSVN(Class)
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||