Package com.simplicite.util
Class GrantCore
- java.lang.Object
-
- com.simplicite.util.GrantCore
-
- All Implemented Interfaces:
com.simplicite.util.engine.CacheInterface
,java.io.Serializable
- Direct Known Subclasses:
Grant
public abstract class GrantCore extends java.lang.Object implements java.io.Serializable, com.simplicite.util.engine.CacheInterface
Core user rights- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
API_SESSION_PREFIX
API pseudo-session IDs prefixstatic char
FUNCTION_ACTION
Action functionstatic java.lang.String
FUNCTION_ALL
Delete functionstatic char
FUNCTION_CREATE
Create functionstatic char
FUNCTION_DELETE
Delete functionstatic char
FUNCTION_READ
Read functionstatic char
FUNCTION_UPDATE
Update functionstatic char
FUNCTION_VIEW
View functionstatic java.lang.String
IO_SESSION_PREFIX
I/O pseudo-session IDs prefixstatic int
STATUS_ACTIVE
Active statusstatic int
STATUS_INACTIVE
Inactive statusstatic int
STATUS_PENDING
Pending statusstatic int
STATUS_WEBSERVICES
Webservices only statusstatic java.lang.String
SYSTEM_ADMIN_SESSION
System admin pseudo-session IDstatic java.lang.String
SYSTEM_PUBLIC_SESSION
Public pseudo-session IDstatic java.lang.String
USER_ACTIVE
Active user statusstatic java.lang.String
USER_INACTIVE
Inactive user statusstatic java.lang.String
USER_PENDING
Pending user statusstatic java.lang.String
USER_WEBSERVICES
Webservices only user statsus
-
Constructor Summary
Constructors Constructor Description GrantCore()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
accessAction(java.lang.String obj, java.lang.String action)
Check if the action is granted to the user for a given objectboolean
accessCreate(java.lang.String obj)
Check if the creation is granted to the userboolean
accessDelete(java.lang.String obj)
Check if deletion is granted to the userboolean
accessDomain(java.lang.String domain)
Check if the domain is granted to the userboolean
accessIndexedObject(java.lang.String obj)
Check if the object is granted to the user and indexablejava.util.List<java.lang.String>
accessIndexedObjects()
List of accessible objects with fulltext indexboolean
accessObject(java.lang.String obj)
Check if the object is granted to the userboolean
accessProcess(java.lang.String process)
Check if the process is granted to the userboolean
accessShortcut(java.lang.String name)
Check if the shortcut is granted to the userboolean
accessUpdate(java.lang.String obj)
Check if update is granted to the userboolean
accessWebZone(java.lang.String zone, int order, java.lang.String lang)
Deprecated, for removal: This API element is subject to removal in a future version.void
addAccessCreate(java.lang.String obj)
Grant the object creation to the uservoid
addAccessDelete(java.lang.String obj)
Grant the object deletion to the uservoid
addAccessObject(java.lang.String obj)
Grant the right to read/open the objectvoid
addAccessProcess(java.lang.String process)
Grant the right to read/open the processvoid
addAccessRead(java.lang.String obj)
Alias to addAccessObjectvoid
addAccessUpdate(java.lang.String obj)
Grant the object update to the uservoid
addHomePage(java.lang.String viewName)
Add home page viewvoid
addObjectCalculated(java.lang.String object, java.lang.String field, java.lang.String target, java.lang.String refId)
Not null when the field is linked to calculated field in DB.void
addPredefinedSearch(java.lang.String object, PredefinedSearch ps)
Add a predefined search to objectvoid
addResource(Resource res, java.lang.String objectClass, java.lang.String objId)
Deprecated.void
addResource(Resource res, java.lang.String objectClass, java.lang.String objId, java.lang.String objName)
Add a resourcevoid
addSharedScript(SharedScript scr)
Add a shared codevoid
addText(java.lang.String code, java.lang.String value)
Add a translated textboolean
canUpdateSystem()
Can update system modules' objects (ADMIN_SYSTEM = yes/no)boolean[]
changeAccess(java.lang.String obj, boolean[] crud)
Change the Create/Read/Update/Delete access to objectboolean[]
changeAccess(java.lang.String obj, boolean create, boolean read, boolean update, boolean delete)
Change the Create/Read/Update/Delete access to objectboolean
checkPwd(java.lang.String password)
Check current user passwordvoid
clearTreeViews()
Clear tree viewsvoid
delAccessCreate(java.lang.String obj)
Revoke the object creation to the uservoid
delAccessDelete(java.lang.String obj)
Revoke the object deletion to the uservoid
delAccessObject(java.lang.String obj)
Revoke the right to read/open the objectvoid
delAccessProcess(java.lang.String process)
Revoke the right to read/open the processvoid
delAccessRead(java.lang.String obj)
Alias to delAccessObjectvoid
delAccessUpdate(java.lang.String obj)
Revoke the object update to the uservoid
disableAction(java.lang.String obj, java.lang.String action)
Disable one action on a given objectvoid
enableAction(java.lang.String obj, java.lang.String action)
Enable one action on a given objectvoid
enableGC(boolean enabled)
Not used : System full GC is managed after the expiration of user sessionjava.lang.Object
evalExpression(java.lang.String expr)
Prepare and evaluate an expression (seeprepareExpression
for details on tokens)java.lang.Object
evalExpression(java.lang.String expr, java.util.Map<java.lang.String,java.lang.Object> in, java.util.Map<java.lang.String,java.lang.Object> out)
Prepare and evaluate an expression (seeprepareExpression
for details on tokens)java.lang.String
evalExpressionAsString(java.lang.String expr)
Prepare and evaluate an expression token (enclosed in[EXPR:]
) as a string (seeprepareExpression
for details on tokens).java.lang.String
evalURLExpression(java.lang.String url)
Prepare and evaluate an URL expression (seeprepareExpression
for details on tokens)boolean
garbageCollection()
Not used : System full GC is managed after the expiration of user sessionAction
getAction(java.lang.String obj, java.lang.String name)
Get a specific action of one objectjava.util.List<Action>
getActions(java.lang.String obj)
Get all specific actions of one objectjava.util.List<Action>
getActions(java.lang.String obj, java.lang.String startsWith)
Get all actions of one objectjava.lang.String
getAjaxKey()
Set the user Ajax keyint
getAuthMethod()
Get the authentication methodjava.lang.String
getAuthProvider()
Get the authentication provider namejava.lang.String
getAuthToken()
Get the user authentication tokenlong
getAuthTokenExpiry()
Get the user authentication token expiry timejava.lang.String
getBeanDir()
Deprecated.Use Platform.getSrcDirjava.lang.String
getBinDir()
Deprecated.Use Platform.getBinDirboolean
getBooleanParameter(java.lang.String name)
Gets an boolean session system parameter as boolean (false if absent)boolean
getBooleanParameter(java.lang.String name, boolean def)
Gets an boolean session system parameter as booleanjava.lang.String
getCacheDir()
Deprecated.Use Platform.getCacheDirjava.lang.String
getCacheKey(Grant g)
Get grant unique cache keyjava.lang.String
getCellPhoneNumber()
Get the user's cell phone number (alias togetMobilePhoneNumber
)java.lang.String
getClassesDir()
Deprecated.Use Platform.getClassesDirjava.lang.String
getClientTabId()
Client/browser tab Idjava.lang.String
getContentDir()
Deprecated.Use Platform.getContentDirjava.util.Map<java.lang.String,java.lang.String>
getCreatable()
Get granted objects for creationcom.simplicite.util.engine.GrantData
getData()
Get the GrantData infosjava.lang.String
getDateFormat()
User date format (ex MM/DD/YYYY)java.lang.String
getDBPatchLevel()
Get database patch leveljava.util.Map<java.lang.String,java.lang.String>
getDel()
Deprecated.Use getDeletablejava.util.Map<java.lang.String,java.lang.String>
getDeletable()
Get granted objects for deletionDisposition
getDisposition()
Get dispositionjava.lang.String
getDispositionName()
Get the disposition name (from current disposition definition or, if not yet loaded from the configured system parameter).java.lang.String
getDocDir()
Deprecated.Use Platform.getDocDirlong
getDocDirMax()
Deprecated.Use Platform.getDocDirMaxjava.lang.String
getDocLocalDir()
Deprecated.Use Platform.getDocLocalDirjava.util.List<java.lang.String>
getDomains()
Get all granted domainsjava.lang.String
getEmail()
Get the user's email addressjava.lang.String
getExportDir()
Deprecated.Use Platform.getExportDirjava.lang.String
getExternalDocsDir()
Deprecated.Use Platform.getExternalDocsDirjava.lang.String
getFirstName()
Get the user's first nameboolean
getFlagParameter(java.lang.String name)
Gets a flag session system parameter as boolean (false if absent)boolean
getFlagParameter(java.lang.String name, boolean def)
Gets a flag session system parameter as booleanjava.lang.String
getFullName()
Get the user's full name (or the login if unknown)com.simplicite.util.engine.GrantInterface
getGrantInterface()
Get the invocation interface for grants (Local EJB, Remote EJB, WebService, Direct)java.lang.String
getHashAlgorithm()
Deprecated, for removal: This API element is subject to removal in a future version.Use SystemParameters.getHashEncodingjava.lang.String
getHashEncoding()
Deprecated, for removal: This API element is subject to removal in a future version.Use SystemParameters.getHashEncodingView
getHome()
Get the current home pagejava.lang.String
getHomeName()
Get the current home page name if existsjava.util.List<java.lang.String>
getHomePages()
Get all granted home pagesjava.lang.String
getHomePhoneNumber()
Get the user's home phone numberjava.lang.String
getImportDir()
Deprecated.Use Platform.getImportDirjava.lang.String
getIndexDir()
Deprecated.Use Platform.getIndexDirint
getIntParameter(java.lang.String name)
Gets an integer session system parameter as boolean (0 if absent)int
getIntParameter(java.lang.String name, int def)
Gets an integer session system parameter as booleanjava.lang.String
getJavadocDir()
Deprecated.Use Platform.getJavadocDirorg.json.JSONArray
getJSONArrayParameter(java.lang.String name)
Gets an JSON array string session system parameter as JSON arrayorg.json.JSONArray
getJSONArrayParameter(java.lang.String name, java.lang.String def)
Gets an JSON array string session system parameter as JSON arrayorg.json.JSONArray
getJSONArrayParameter(java.lang.String name, org.json.JSONArray def)
Gets an JSON array string session system parameter as JSON arrayorg.json.JSONObject
getJSONObjectParameter(java.lang.String name)
Gets an JSON object string session system parameter as JSON objectorg.json.JSONObject
getJSONObjectParameter(java.lang.String name, java.lang.String def)
Gets an JSON object string session system parameter as JSON objectorg.json.JSONObject
getJSONObjectParameter(java.lang.String name, org.json.JSONObject def)
Gets an JSON object string session system parameter as JSON objectjava.lang.String
getLang()
Get the user's languagejava.lang.String
getLangPreference()
Get the user's preferred languagejava.util.List<java.lang.String>
getLanguages()
Get available languages for the user (default all known languages)java.lang.String
getLastName()
Get the user's last namejava.lang.String
getLibsDir()
Deprecated.Use Platform.getLibsDirjava.util.Locale
getLocale()
Get locale for grantjava.lang.Object
getLock()
Get the lock to be used in synchronized blocksjava.lang.String
getLogDir()
Deprecated.Use Platform.getLogDirAppLogEvent
getLogEvent(java.lang.String code)
Get the log event for a given codejava.util.Map<java.lang.String,AppLogEvent>
getLogEvents()
Get all log eventsjava.lang.String
getLogin()
Get the user loginlong
getLongParameter(java.lang.String name)
Gets an long integre session system parameter as boolean (0 if absent)long
getLongParameter(java.lang.String name, long def)
Gets an long integer session system parameter as booleanjava.lang.String
getMavenDir()
Deprecated.Use Platform.getMavenDirint
getMaxRows()
Get the list maximum size (for paginated search)long
getMaxUploadSize()
Get the upload limit size (in Mb)MenuItem
getMenu()
Get the main menujava.util.List<MenuItem>
getMenuItems(java.lang.String domain)
Get items in a domainjava.lang.String
getMenuStyle()
Get menu stylejava.lang.String
getMFAMethod()
Get the user's MFA method (or null if the authentication provider is not the internal provider)java.lang.String
getMFASettings()
Get the user's MFA settingsorg.json.JSONObject
getMFASettingsJSONObject()
Get the user's MFA settings as JSON objectint
getMinRows()
Get the list page minimum size (for paginated searches)java.lang.String
getMobilePhoneNumber()
Get the user's mobile phone numberjava.lang.String
getName()
Get namejava.util.Map<java.lang.String,java.lang.String>
getNew()
Deprecated.Use getCreatablejava.lang.String
getNumberFormat()
User number formatjava.util.Map<java.lang.String,java.util.List<Action>>
getObjectActions()
Get granted objects for external actionsjava.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<java.lang.String>>>
getObjectCalculated()
Get ref object calculated fieldscom.simplicite.util.engine.ObjectInterface
getObjectInterface()
Get the invocation interface for objects (Local EJB, Remote EJB, WebService, Direct)java.lang.Object
getObjectParameter(ObjectCore obj, java.lang.String name)
Gets one object parameterjava.lang.Object
getObjectParameter(java.lang.String name)
Gets one object session parameterjava.lang.Object
getObjectParameter(java.lang.String name, java.lang.Object def)
Gets one object session parameterjava.util.Map<java.lang.String,java.io.Serializable>
getObjectParameters(ObjectCore obj)
Gets all object parametersjava.util.List<Resource>
getObjectResources(java.lang.String objectClass, java.lang.String objId)
Get object resourcesjava.util.List<java.lang.String>
getObjects()
Get all granted objectsjava.util.Map<java.lang.String,java.util.List<View>>
getObjectViews()
Get the views associated to objectsint
getPanelCharMax()
Get panels (tabs) max width in charjava.lang.String
getParameter(java.lang.String name)
Gets a text session parameterjava.lang.String
getParameter(java.lang.String name, java.lang.String def)
Gets a text session parameterjava.lang.String
getParameterId(java.lang.String code)
java.util.Map<java.lang.String,java.io.Serializable>
getParameters()
Get all parametersjava.lang.String
getPassword()
Get the user passwordDocumentDB
getPicture()
Get the user picture documentjava.lang.String
getPoweredBy()
Get the powered by textjava.util.Map<java.lang.String,java.util.List<PredefinedSearch>>
getPredefinedSearch()
Get all predefined searchesjava.util.List<PredefinedSearch>
getPredefinedSearch(java.lang.String object)
Get predefined searches of objectPredefinedSearch
getPredefinedSearch(java.lang.String object, java.lang.String id)
Get predefined searches of objectjava.util.Map<java.lang.String,java.lang.String>
getProcess()
Get the granted processesProcessusInterface
getProcessInterface()
Get the invocation interface for processes (Local EJB, Remote EJB, WebService, Direct)java.lang.String
getProjectDir()
Deprecated.Use Platform.getProjectDirint
getRailway()
Get the railway size to display in the navigation barstatic java.lang.String
getRandomPassword(int length)
Get random passwordjava.lang.String
getRecycleBinDir()
Deprecated.Use Platform.getRecycleBinDirjava.util.List<GroupDB>
getRegistrationGroups()
Get the registration groupsResource
getResource(java.lang.String code)
Get a resource for a specified codeResource
getResource(java.lang.String type, java.lang.String code)
Get a disposition resource for specified code and typeResource
getResource(java.lang.String code, java.lang.String type, java.lang.String objectName)
Get a resource for specified code, type or objectNameResource
getResource(java.lang.String type, java.lang.String code, java.lang.String objectClass, java.lang.String objId)
Get a resource for specified code and typeResource
getResourceById(java.lang.String resId)
Get a resource for specified resource IDjava.util.List<java.lang.String>
getResourceCodes(java.lang.String type, java.lang.String objectClass, java.lang.String objId)
Get resource codes for specified typejava.util.Map<java.lang.String,Resource>
getResources()
Get all resourcesjava.util.Map<java.lang.String,GroupDB>
getResp()
Get all groups granted in the user sessionjava.lang.String
getRespList()
Get all groups granted in the user session in a text format (separated with comma)java.lang.String
getScope()
Get the current scope if existsSharedScript
getScriptById(java.lang.String scrId)
Get a shared code for specified IDcom.simplicite.util.engine.ScriptInterpreter
getScriptInterpreter()
Get script interpreter for the user sessionjava.lang.String
getScriptInterpreterEngineName()
Get script interpreter engine namejava.lang.String
getSessionId()
Get the user SessionId (web or technical)SharedScript
getSharedScript(java.lang.String name)
Get a shared code for specified codeShortcut
getShortcut(java.lang.String name)
Get shortcutjava.util.List<Shortcut>
getShortcuts()
Get all shortcutsView
getSimpleView(java.lang.String name)
Get a standalone viewjava.util.Map<java.lang.String,View>
getSimpleViews()
Get all standalone viewsjava.lang.String
getSourcesDir()
Deprecated.Use Platform.getSourcesDirjava.lang.String
getSrcDir()
Deprecated.Use Platform.getSrcDirint
getStatus()
Get the user's statusjava.lang.String
getSubPackage()
Get subpackage of specific classesjava.util.Map<java.lang.String,java.lang.String>
getText()
Get all the translated text values (in current user's language)java.lang.String
getText(java.lang.String code)
Same as Tjava.lang.String
getTheme()
Get the theme namejava.util.TimeZone
getTimeZone()
Get the user time zonejava.lang.String
getTimeZoneID()
User time zone IDjava.lang.String
getTmpDir()
Deprecated.Use Platform.getTmpDirTreeView
getTreeView(java.lang.String name)
Get a tree viewjava.util.Map<java.lang.String,TreeView>
getTreeViews()
Get all tree viewsjava.util.List<TreeView>
getTreeViewsOfObject(java.lang.String name, boolean root)
Get treeviews with a given object in hierarchyjava.util.Map<java.lang.String,java.lang.String>
getUpdatable()
Get granted objects for updateint
getUserId()
Get the user unique ID as integerjava.lang.String
getUserModuleId()
Get the user Module IDjava.lang.String
getUserUniqueId()
Get the user unique ID as stringjava.lang.String
getVersion()
Get the application versionjava.util.Map<java.lang.String,java.util.List<ObjectVisibility>>
getVisibilities()
Get object all visibilitiesjava.util.List<ObjectVisibility>
getVisibility(java.lang.String object, char type)
Get the object's standard access visibilitiesjava.util.List<ObjectVisibility>
getVisibility(java.lang.String object, java.lang.String action)
Get object ACTION visibilitiesWebZone
getWebZone(java.lang.String zone, int order, java.lang.String lang)
Deprecated, for removal: This API element is subject to removal in a future version.WebZone
getWebZone(java.lang.String zone, java.lang.String name, java.lang.String lang)
Deprecated, for removal: This API element is subject to removal in a future version.java.util.List<WebZone>
getWebZones()
Deprecated, for removal: This API element is subject to removal in a future version.java.util.List<WebZone>
getWebZones(java.lang.String zone)
Deprecated, for removal: This API element is subject to removal in a future version.java.lang.String
getWindowTitle()
Get the window titlejava.lang.String
getWorkPhoneNumber()
Get the user's work phone numberboolean
hasParameter(java.lang.String name)
Check if a text session parameter is setboolean
hasRegistration()
Has registration?boolean
hasResponsibility(java.lang.String group)
Check if the user has one responsibilityboolean
isAboutEnable()
Is about info enabled ? Forced for admin profilesboolean
isAPIInterfaceEnable()
Deprecated.boolean
isCompletionEnable()
Is the completion feature enabled?boolean
isConvertWildcards()
Are wildcard converted (from * and ? to SQL's % and _)?boolean
isCROWDAuthMethod()
Is the authentication method CROWD?boolean
isCustomAuthMethod()
Is the authentication method custom?boolean
isDefaultAuthMethod()
Is the authentication method default?boolean
isDesigner()
Is "designer" user?boolean
isEasyModeClearCache()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isForcedChangePassword()
Is forced change password ?boolean
isGITInterfaceEnable()
Deprecated.boolean
isHtmlEditorEnable()
Is the HTML editor enabled ?boolean
isHybridApp()
Hybrid application on mobile device (cordova)boolean
isInternalOAuth2AuthMethod()
Is the authentication method OAuth2?boolean
isIOInterfaceEnable()
Deprecated.boolean
isJavaImplemented()
Is implemented in Javaboolean
isLDAPAuthMethod()
Is the authentication method LDAP?boolean
isLoaded()
Checks if grants are loadedboolean
isMFAChecked()
Is the MFA checked for user?boolean
isOAuth2AuthMethod()
Is the authentication method OAuth2?boolean
isPanelFilterEnable()
Is display panel filter?boolean
isPublic()
Is "public" user?boolean
isRightToLeft()
Get the user language direction (not yet implemented)boolean
isSAMLAuthMethod()
Is the authentication method SAML?boolean
isSystem()
Is "system" user?boolean
isSystemAdmin()
Is "system" user (alias to isSystem)?long
lastUsage(boolean update)
Not used : System full GC is managed after the expiration of user sessionvoid
limitLicenseRights()
Allow access but with restricted rights to update the LicenseKey onlyboolean
logActivity()
Are the user's activities (redo log) logged?boolean
logDebug()
Are the debug events logged ?boolean
logDocument()
Are the document events logged?boolean
logError()
Are the error events logged?boolean
logFatal()
Are the fatal events logged?boolean
logInfo()
Are the info events logged?boolean
logObject()
Are the object events logged?boolean
logSession()
Are the session login/logout logged?boolean
logWarning()
Are the warning events logged?void
newData()
New empty GrantDatastatic java.lang.String
notGranted(Grant g)
Translated not granted messagejava.lang.String
prepareExpression(java.lang.String content)
Prepare an expression by processing token substitutions: (see prepareExpression for details on tokens)java.lang.String
prepareExpression(java.lang.String content, java.lang.String sep, boolean inlineValues, boolean front)
Prepare an expression by processing token substitutions:
- [APPLICATION] or [APPNAME] : application name
- [ENCODING] : application encoding
- [GRANT] : user grant
- [LOGIN] : user login
- [USERID] : user row ID
- [LANG] : user language
- [HASRESP:<group>] or [HASRESPONSIBILITY:<group>] : check if user has specified responsibility
- [TEXT:<code>] : value of a text
- [SYSPARAM:<name>] : value of a system parameter (without surrounding quotes because a system parameter can be numeric)java.lang.String
prepareSQL(java.lang.String sql)
Prepares a SQL statement applying following token substitutions:
- [login] : user login (surrounded by SQL quotes)
- [userid] : user row ID (surrounded by SQL quotes)
- [lang] : user language (surrounded by SQL quotes)
- [sysparam:<name>] : system parameter value (surrounded by SQL quotes)
- [text:<code>] : text value (surrounded by SQL quotes)void
recordUsage()
Record usage (usage count and last usage date)void
removeAccessCreate(java.lang.String obj)
Alias to delAccessCreatevoid
removeAccessDelete(java.lang.String obj)
Alias to delAccessDeletevoid
removeAccessObject(java.lang.String obj)
Alias to delAccessObjectvoid
removeAccessRead(java.lang.String obj)
Alias to delAccessObjectvoid
removeAccessUpdate(java.lang.String obj)
Alias to delAccessUpdatejava.io.Serializable
removeObjectParameter(ObjectCore obj, java.lang.String name)
Unsets an object parametervoid
removeObjectParameters(ObjectCore obj, java.lang.String prefix)
Unsets object parameters starting with prefixjava.io.Serializable
removeParameter(java.lang.String name)
Remove a session system parametervoid
removeResources()
Remove all resourcesvoid
removeResources(java.lang.String objectClass, java.lang.String objId, boolean clearCache)
Remove resourcesvoid
removeSharedScript(java.lang.String name)
Remove a shared codevoid
removeSharedScripts()
Remove all shared codesvoid
setAbout(boolean b)
Set whether about info is enabledvoid
setAjaxKey(java.lang.String ajaxkey)
Set the user Ajax keyvoid
setAPIInterface(boolean b)
Deprecated.void
setAuthToken(java.lang.String token)
Set the user authentication tokenvoid
setAuthTokenExpiry(long time)
Set the user authentication token expiry timevoid
setBeanDir(java.lang.String dir)
Deprecated.Use Platform.setSrcDirvoid
setBinDir(java.lang.String dir)
Deprecated.Use Platform.setBinDirvoid
setCacheDir(java.lang.String dir)
Deprecated.Use Platform.setCacheDirvoid
setCellPhoneNumber(java.lang.String num)
Set the user's cell phone number (alias tosetMobilePhoneNumber
)void
setClassesDir(java.lang.String dir)
Deprecated.Use Platform.setClassesDirvoid
setClientTabId(java.lang.String tabId)
Set Grant in a client UI tabvoid
setCompletion(boolean b)
Set whether the completion feature is enabledvoid
setContentDir(java.lang.String dir)
Deprecated.Use Platform.setContentDirvoid
setConvertWildcards(boolean convert)
Set wildcard as converted (from * and ? to SQL's % and _)void
setData(com.simplicite.util.engine.GrantData d)
Set the GrantData infosvoid
setDateFormat(java.lang.String df)
Set the user date formatvoid
setDateFormat(java.lang.String code, java.lang.String lang)
Set date formatvoid
setDisposition(Disposition d)
Set dispositionvoid
setDocDir(java.lang.String dir)
Deprecated.Use Platform.setDocDirvoid
setDocDirMax(long n)
Deprecated.Use Platform.setDocDirMaxvoid
setDocLocalDir(java.lang.String dir)
Deprecated.Use Platform.setDocLocalDirvoid
setEasyModeClearCache(boolean c)
Deprecated, for removal: This API element is subject to removal in a future version.void
setEmail(java.lang.String email)
Set the user's e-mail addressvoid
setExportDir(java.lang.String dir)
Deprecated.Use Platform.setExportDirvoid
setExternalDocsDir(java.lang.String dir)
Deprecated.Use Platform.setExternalDocsDirvoid
setFirstName(java.lang.String firstname)
Set the user's first namevoid
setFlagParameter(java.lang.String name, boolean value)
Sets a yes/no flag session system parametervoid
setForcedChangePassword(boolean f)
Set forced change passwordvoid
setGITInterface(boolean b)
Deprecated.void
setHashAlgorithm(java.lang.String p)
Deprecated, for removal: This API element is subject to removal in a future version.Use SystemParameters.setHashEncodingvoid
setHashEncoding(java.lang.String p)
Deprecated, for removal: This API element is subject to removal in a future version.Use SystemParameters.setHashEncodingvoid
setHome(View home)
Set the current home pagevoid
setHomePhoneNumber(java.lang.String num)
Set the user's home phone numbervoid
setHtmlEditor(boolean b)
Set whether the HTML editor is enabledvoid
setHybridApp(boolean inapp)
Hybrid application on mobile device (cordova)void
setImportDir(java.lang.String dir)
Deprecated.Use Platform.setImportDirvoid
setIndexDir(java.lang.String dir)
Deprecated.Use Platform.setIndexDirvoid
setInterfaces(com.simplicite.util.engine.GrantInterface g, com.simplicite.util.engine.ObjectInterface o, ProcessusInterface p)
Set the invocation interfaces (Local EJB, Remote EJB, WebService, Direct)void
setInterfaces(Globals.InterfaceType interfaceType)
Set the invocation interfaces (Local EJB, Remote EJB, WebService, Direct)void
setIOInterface(boolean b)
Deprecated.void
setJavadocDir(java.lang.String dir)
Deprecated.Use Platform.setJavadocDirvoid
setLang(java.lang.String lang)
Set the user's language to display the UIvoid
setLangPreference(java.lang.String lang)
Set the user's preferred languagevoid
setLanguages(java.util.List<java.lang.String> langs)
Set available languages for the user (null means all known languages)void
setLastName(java.lang.String lastname)
Set the user's last namevoid
setLibsDir(java.lang.String dir)
Deprecated.Use Platform.setLibsDirvoid
setLogDebug(boolean b)
Enable/disable the debug events loggingvoid
setLogDir(java.lang.String dir)
Deprecated.Use Platform.setLogDirvoid
setLogDocument(boolean b)
Enable/disable the document events loggingvoid
setLogError(boolean b)
Enable/disable the error events loggingvoid
setLogFatal(boolean b)
Enable/disable the fatal events loggingvoid
setLogin(java.lang.String login)
Set the user loginvoid
setLogInfo(boolean b)
Enable/disable the info events loggingvoid
setLogObject(boolean b)
Enable/disable the object events loggingvoid
setLogWarning(boolean b)
Enable/disable the warning events loggingvoid
setMavenDir(java.lang.String dir)
Deprecated.Use Platform.setMavenDirvoid
setMaxRows(int n)
Set the list page maximum size (for paginated searches)void
setMaxUploadSize(long s)
Set upload size limit (in Mb)void
setMenu(MenuItem menu)
Set the main menuvoid
setMFAChecked(boolean checked)
Set the MFA check status for uservoid
setMFAMethod(java.lang.String method)
Set the user's MFA methodvoid
setMFASettings(java.lang.String settings)
Set the user's MFA settingsvoid
setMinRows(int n)
Set the list page minimum size (for paginated searches)void
setMobilePhoneNumber(java.lang.String num)
Set the user's mobile phone numbervoid
setNumberFormat(java.lang.String nf)
Set the user number formatvoid
setNumberFormat(java.lang.String code, java.lang.String lang)
Set number formatvoid
setObjectParameter(ObjectCore obj, java.lang.String name, java.io.Serializable value)
Sets one object session parameter (useful, for instance, to store data thru different pages and contexts)void
setPanelCharMax(int n)
Set panels (tabs) max width in charvoid
setPanelFilter(boolean b)
Set display the panel filtervoid
setParameter(java.lang.String name, java.io.Serializable obj)
Sets one object session parameter (useful, for instance, to store data thru different pages and contexts)void
setParameter(java.lang.String name, java.lang.String value)
Sets a text session system parameter (useful, for instance, to store data thru different pages and contexts)void
setPassword(java.lang.String password)
Set the user passwordvoid
setPicture(DocumentDB doc)
Set the user's picture documentvoid
setProjectDir(java.lang.String dir)
Deprecated.Use Platform.setProjectDirvoid
setRailway(int p)
Set the railway size to display in the navigation barvoid
setRecycleBinDir(java.lang.String dir)
Deprecated.Use Platform.setRecycleBinDirvoid
setRespList(java.lang.String s)
Set all groups granted in the user session in a text format (separated with comma)void
setSessionId(java.lang.String id)
Store the user SessionId (web or technical)void
setShortcuts(java.util.List<Shortcut> shortcuts)
Set all shortcutsvoid
setShowNavigator(boolean p)
Set whether the user needs the navigation barvoid
setSourcesDir(java.lang.String dir)
Deprecated.Use Platform.setSourcesDirvoid
setSrcDir(java.lang.String dir)
Deprecated.Use Platform.setSrcDirvoid
setStatus(int status)
Set the user statusvoid
setSubPackage(java.lang.String sp)
Set subpackage of specific classesvoid
setTimeZone(java.util.TimeZone tz)
Set the user time zonevoid
setTimeZoneID(java.lang.String zoneID)
Set the user time zonevoid
setTmpDir(java.lang.String dir)
Deprecated.Use Platform.setTmpDirvoid
setTreeView(java.lang.String name, TreeView treeview)
Set tree viewvoid
setUserId(int id)
Set the user unique ID (row_id from m_user) from integervoid
setUserModuleId(java.lang.String id)
Set the user Module IDvoid
setUserUniqueId(java.lang.String id)
Set the user unique ID (row_id from m_user) from stringvoid
setWindowTitle(java.lang.String title)
Set the window titlevoid
setWorkPhoneNumber(java.lang.String num)
Set the user's work phone numberboolean
showNavigator()
The user needs the navigation bar ?java.lang.String
T(java.lang.String code)
Get translated text value for specified code (in current user's language)java.lang.String
T(java.lang.String code, boolean plural)
Get translated text value for specified code.java.lang.String
T(java.lang.String code, java.lang.String def)
Get translated text value for specified code (in current user's language) or defaultjava.lang.String
toFormattedBoolean(java.lang.String serviceBoolean)
Convert a service boolean to a formatted booleanjava.lang.String
toFormattedDate(java.lang.String serviceDate)
Convert a service date to a formatted datejava.lang.String
toFormattedDatetime(java.lang.String serviceDatetime)
Convert a service date time to a formatted date timejava.lang.String
toFormattedFloat(java.lang.String serviceFloat, int size, int precision)
Convert a service float to a formatted floatjava.lang.String
toFormattedFloat(java.math.BigDecimal serviceFloat, int size, int precision)
Convert a service float to a formatted floatjava.lang.String
toFormattedTime(java.lang.String serviceTime)
Convert a service time to a formatted timeorg.json.JSONObject
toJSONObject()
Generates a JSON object representation of grantorg.json.JSONObject
toJSONObject(boolean resps, boolean sysparams)
Generates a JSON object representation of grantjava.lang.String
toServiceDate(java.lang.String formattedDate)
Convert a formatted date to a service datejava.lang.String
toServiceDatetime(java.lang.String formattedDatetime)
Convert a formatted date time to a service date timejava.lang.String
toServiceFloat(java.lang.String formattedFloat)
Convert a formatted float to a service floatjava.lang.String
toServiceTime(java.lang.String formattedTime)
Convert a formatted time to a service timejava.lang.String
toString()
Generates a string representation of the grantjava.lang.String
toString(boolean resps, boolean sysparams)
Generates a string representation of the grant
-
-
-
Field Detail
-
FUNCTION_READ
public static final char FUNCTION_READ
Read function- See Also:
- Constant Field Values
-
FUNCTION_CREATE
public static final char FUNCTION_CREATE
Create function- See Also:
- Constant Field Values
-
FUNCTION_UPDATE
public static final char FUNCTION_UPDATE
Update function- See Also:
- Constant Field Values
-
FUNCTION_DELETE
public static final char FUNCTION_DELETE
Delete function- See Also:
- Constant Field Values
-
FUNCTION_ALL
public static final java.lang.String FUNCTION_ALL
Delete function
-
FUNCTION_ACTION
public static final char FUNCTION_ACTION
Action function- See Also:
- Constant Field Values
-
FUNCTION_VIEW
public static final char FUNCTION_VIEW
View function- See Also:
- Constant Field Values
-
STATUS_INACTIVE
public static final int STATUS_INACTIVE
Inactive status- See Also:
- Constant Field Values
-
STATUS_ACTIVE
public static final int STATUS_ACTIVE
Active status- See Also:
- Constant Field Values
-
STATUS_PENDING
public static final int STATUS_PENDING
Pending status- See Also:
- Constant Field Values
-
STATUS_WEBSERVICES
public static final int STATUS_WEBSERVICES
Webservices only status- See Also:
- Constant Field Values
-
USER_INACTIVE
public static final java.lang.String USER_INACTIVE
Inactive user status
-
USER_ACTIVE
public static final java.lang.String USER_ACTIVE
Active user status
-
USER_PENDING
public static final java.lang.String USER_PENDING
Pending user status
-
USER_WEBSERVICES
public static final java.lang.String USER_WEBSERVICES
Webservices only user statsus
-
SYSTEM_ADMIN_SESSION
public static final java.lang.String SYSTEM_ADMIN_SESSION
System admin pseudo-session ID- See Also:
- Constant Field Values
-
SYSTEM_PUBLIC_SESSION
public static final java.lang.String SYSTEM_PUBLIC_SESSION
Public pseudo-session ID- See Also:
- Constant Field Values
-
API_SESSION_PREFIX
public static final java.lang.String API_SESSION_PREFIX
API pseudo-session IDs prefix- See Also:
- Constant Field Values
-
IO_SESSION_PREFIX
public static final java.lang.String IO_SESSION_PREFIX
I/O pseudo-session IDs prefix- See Also:
- Constant Field Values
-
-
Method Detail
-
getData
public com.simplicite.util.engine.GrantData getData()
Get the GrantData infos
-
setData
public void setData(com.simplicite.util.engine.GrantData d)
Set the GrantData infos
-
newData
public void newData()
New empty GrantData
-
getLock
public java.lang.Object getLock()
Get the lock to be used in synchronized blocks
-
setInterfaces
public void setInterfaces(com.simplicite.util.engine.GrantInterface g, com.simplicite.util.engine.ObjectInterface o, ProcessusInterface p)
Set the invocation interfaces (Local EJB, Remote EJB, WebService, Direct)
-
setInterfaces
public void setInterfaces(Globals.InterfaceType interfaceType)
Set the invocation interfaces (Local EJB, Remote EJB, WebService, Direct)- Parameters:
interfaceType
- Interface type
-
getObjectInterface
public com.simplicite.util.engine.ObjectInterface getObjectInterface()
Get the invocation interface for objects (Local EJB, Remote EJB, WebService, Direct)
-
getGrantInterface
public com.simplicite.util.engine.GrantInterface getGrantInterface()
Get the invocation interface for grants (Local EJB, Remote EJB, WebService, Direct)
-
getProcessInterface
public ProcessusInterface getProcessInterface()
Get the invocation interface for processes (Local EJB, Remote EJB, WebService, Direct)
-
setSessionId
public void setSessionId(java.lang.String id)
Store the user SessionId (web or technical)
-
getSessionId
public java.lang.String getSessionId()
Get the user SessionId (web or technical)
-
setClientTabId
public void setClientTabId(java.lang.String tabId)
Set Grant in a client UI tab- Parameters:
tabId
- Browser tab Id
-
getClientTabId
public java.lang.String getClientTabId()
Client/browser tab Id- Returns:
- Optional client tab Id in case of UI usage
-
setHybridApp
public void setHybridApp(boolean inapp)
Hybrid application on mobile device (cordova)- Parameters:
inapp
- true when the application is started thru hybrid engine
-
isHybridApp
public boolean isHybridApp()
Hybrid application on mobile device (cordova)- Returns:
- true when the application is started thru hybrid engine
-
getScriptInterpreterEngineName
public java.lang.String getScriptInterpreterEngineName()
Get script interpreter engine name
-
getScriptInterpreter
public com.simplicite.util.engine.ScriptInterpreter getScriptInterpreter()
Get script interpreter for the user session
-
prepareExpression
public java.lang.String prepareExpression(java.lang.String content) throws ScriptException
Prepare an expression by processing token substitutions: (see prepareExpression for details on tokens)- Parameters:
content
- Script, template or expression including tokens to substitute- Throws:
ScriptException
-
prepareExpression
public java.lang.String prepareExpression(java.lang.String content, java.lang.String sep, boolean inlineValues, boolean front) throws ScriptException
Prepare an expression by processing token substitutions:
- [APPLICATION] or [APPNAME] : application name
- [ENCODING] : application encoding
- [GRANT] : user grant
- [LOGIN] : user login
- [USERID] : user row ID
- [LANG] : user language
- [HASRESP:<group>] or [HASRESPONSIBILITY:<group>] : check if user has specified responsibility
- [TEXT:<code>] : value of a text
- [SYSPARAM:<name>] : value of a system parameter (without surrounding quotes because a system parameter can be numeric)- Parameters:
content
- Script, template or expression including tokens to substitutesep
- separator for StringinlineValues
- Replace with explicit value or with API. Ex: [VALUE:input] will be replaced with explicit value of field, or replaced by obj.getInput(input).getValue()- Returns:
- Prepared expression
- Throws:
ScriptException
-
evalExpression
public java.lang.Object evalExpression(java.lang.String expr) throws ScriptException
Prepare and evaluate an expression (seeprepareExpression
for details on tokens)- Parameters:
expr
- Expression- Returns:
- Evaluation result
- Throws:
ScriptException
-
evalExpression
public java.lang.Object evalExpression(java.lang.String expr, java.util.Map<java.lang.String,java.lang.Object> in, java.util.Map<java.lang.String,java.lang.Object> out) throws ScriptException
Prepare and evaluate an expression (seeprepareExpression
for details on tokens)- Parameters:
expr
- Expressionin
- Input variables to set before script evaluationout
- Output variables to retrieve after script evaluation- Returns:
- Script evaluation result
- Throws:
ScriptException
-
evalURLExpression
public java.lang.String evalURLExpression(java.lang.String url) throws ScriptException
Prepare and evaluate an URL expression (seeprepareExpression
for details on tokens)- Parameters:
url
- URL- Returns:
- Evaluated URL
- Throws:
ScriptException
-
evalExpressionAsString
public java.lang.String evalExpressionAsString(java.lang.String expr) throws ScriptException
Prepare and evaluate an expression token (enclosed in[EXPR:]
) as a string (seeprepareExpression
for details on tokens).- Parameters:
expr
- Expression token- Returns:
- Evaluated expression token
- Throws:
ScriptException
-
prepareSQL
public java.lang.String prepareSQL(java.lang.String sql)
Prepares a SQL statement applying following token substitutions:
- [login] : user login (surrounded by SQL quotes)
- [userid] : user row ID (surrounded by SQL quotes)
- [lang] : user language (surrounded by SQL quotes)
- [sysparam:<name>] : system parameter value (surrounded by SQL quotes)
- [text:<code>] : text value (surrounded by SQL quotes)- Parameters:
sql
- SQL including tokens to substitute- Returns:
- Prepared SQL statement
-
getCacheKey
public java.lang.String getCacheKey(Grant g)
Get grant unique cache key- Specified by:
getCacheKey
in interfacecom.simplicite.util.engine.CacheInterface
- Parameters:
g
- Grant- Returns:
- Unique cache key
-
isJavaImplemented
public boolean isJavaImplemented()
Is implemented in Java- Specified by:
isJavaImplemented
in interfacecom.simplicite.util.engine.CacheInterface
- Returns:
- True if implemented in Java
-
getName
public java.lang.String getName()
Get name- Specified by:
getName
in interfacecom.simplicite.util.engine.CacheInterface
- Returns:
- Name forced to Grant
-
enableGC
public void enableGC(boolean enabled)
Not used : System full GC is managed after the expiration of user session- Specified by:
enableGC
in interfacecom.simplicite.util.engine.CacheInterface
- Parameters:
enabled
- false to disable internal GC
-
lastUsage
public long lastUsage(boolean update)
Not used : System full GC is managed after the expiration of user session- Specified by:
lastUsage
in interfacecom.simplicite.util.engine.CacheInterface
- Parameters:
update
- true to update the last usage date of object- Returns:
- last usage date in milliseconds
-
garbageCollection
public boolean garbageCollection()
Not used : System full GC is managed after the expiration of user session- Specified by:
garbageCollection
in interfacecom.simplicite.util.engine.CacheInterface
- Returns:
- True if something has been cleared
-
getMenu
public MenuItem getMenu()
Get the main menu- Returns:
- Root item
-
setMenu
public void setMenu(MenuItem menu)
Set the main menu- Parameters:
menu
- Root item
-
getMenuItems
public java.util.List<MenuItem> getMenuItems(java.lang.String domain)
Get items in a domain- Parameters:
domain
- Domain name- Returns:
- List of items or null
-
getHome
public View getHome()
Get the current home page- Returns:
- Current home page
-
setHome
public void setHome(View home)
Set the current home page- Parameters:
home
- Current home page
-
getScope
public java.lang.String getScope()
Get the current scope if exists- Returns:
- Current scope or null
-
getHomeName
public java.lang.String getHomeName()
Get the current home page name if exists- Returns:
- Current home page name or null
-
getHomePages
public java.util.List<java.lang.String> getHomePages()
Get all granted home pages- Returns:
- List of granted home pages
-
addHomePage
public void addHomePage(java.lang.String viewName)
Add home page view- Parameters:
viewName
- View name
-
getObjectViews
public java.util.Map<java.lang.String,java.util.List<View>> getObjectViews()
Get the views associated to objects- Returns:
- Map of views associated to objects
-
getSimpleView
public View getSimpleView(java.lang.String name)
Get a standalone view- Parameters:
name
- View name- Returns:
- View
-
getSimpleViews
public java.util.Map<java.lang.String,View> getSimpleViews()
Get all standalone views- Returns:
- Map of standalone views
-
getDomains
public java.util.List<java.lang.String> getDomains()
Get all granted domains- Returns:
- List of granted domains
-
getObjects
public java.util.List<java.lang.String> getObjects()
Get all granted objects- Returns:
- List of granted objects
-
getNew
@Deprecated(forRemoval=false, since="4.0") public final java.util.Map<java.lang.String,java.lang.String> getNew()
Deprecated.Use getCreatable
-
getCreatable
public java.util.Map<java.lang.String,java.lang.String> getCreatable()
Get granted objects for creation- Returns:
- Map of granted objects for creation
-
getUpdatable
public java.util.Map<java.lang.String,java.lang.String> getUpdatable()
Get granted objects for update- Returns:
- Map of granted objects for updates
-
getDel
@Deprecated(forRemoval=false, since="4.0") public final java.util.Map<java.lang.String,java.lang.String> getDel()
Deprecated.Use getDeletable
-
getDeletable
public java.util.Map<java.lang.String,java.lang.String> getDeletable()
Get granted objects for deletion- Returns:
- Map of granted objects for deletion
-
getObjectActions
public java.util.Map<java.lang.String,java.util.List<Action>> getObjectActions()
Get granted objects for external actions- Returns:
- List of granted objects
-
getLogin
public java.lang.String getLogin()
Get the user login- Returns:
- Login
-
setLogin
public void setLogin(java.lang.String login)
Set the user login- Parameters:
login
- Login
-
getPassword
public java.lang.String getPassword()
Get the user password- Returns:
- Password
-
setPassword
public void setPassword(java.lang.String password)
Set the user password- Parameters:
password
- Password
-
getAuthToken
public java.lang.String getAuthToken()
Get the user authentication token- Returns:
- Token
-
setAuthToken
public void setAuthToken(java.lang.String token)
Set the user authentication token- Parameters:
token
- Token
-
getAjaxKey
public java.lang.String getAjaxKey()
Set the user Ajax key- Returns:
- Ajax key
-
setAjaxKey
public void setAjaxKey(java.lang.String ajaxkey)
Set the user Ajax key- Parameters:
ajaxkey
- Ajax key
-
getAuthTokenExpiry
public long getAuthTokenExpiry()
Get the user authentication token expiry time- Returns:
- Token expiry time
-
setAuthTokenExpiry
public void setAuthTokenExpiry(long time)
Set the user authentication token expiry time- Parameters:
time
- Token expiry time
-
getRandomPassword
public static java.lang.String getRandomPassword(int length)
Get random password- Parameters:
length
- Length (cannot be less thanGlobals.DEFAULT_PASSWORD_LENGTH
)- Returns:
- A random password of specified length with at least a number, an uppercase and a lowercase letter
-
setUserUniqueId
public void setUserUniqueId(java.lang.String id)
Set the user unique ID (row_id from m_user) from string
-
setUserId
public void setUserId(int id)
Set the user unique ID (row_id from m_user) from integer
-
getUserUniqueId
public java.lang.String getUserUniqueId()
Get the user unique ID as string
-
getUserId
public int getUserId()
Get the user unique ID as integer
-
setLang
public void setLang(java.lang.String lang)
Set the user's language to display the UI
-
getLang
public java.lang.String getLang()
Get the user's language
-
setLangPreference
public void setLangPreference(java.lang.String lang)
Set the user's preferred language
-
getLangPreference
public java.lang.String getLangPreference()
Get the user's preferred language
-
setLanguages
public void setLanguages(java.util.List<java.lang.String> langs)
Set available languages for the user (null means all known languages)
-
getLanguages
public java.util.List<java.lang.String> getLanguages()
Get available languages for the user (default all known languages)
-
isRightToLeft
public boolean isRightToLeft()
Get the user language direction (not yet implemented)
-
setUserModuleId
public void setUserModuleId(java.lang.String id)
Set the user Module ID
-
getUserModuleId
public java.lang.String getUserModuleId()
Get the user Module ID
-
setMinRows
public void setMinRows(int n)
Set the list page minimum size (for paginated searches)- Parameters:
n
- List page minimum size
-
getMinRows
public int getMinRows()
Get the list page minimum size (for paginated searches)- Returns:
- List page minimum size
-
setMaxRows
public void setMaxRows(int n)
Set the list page maximum size (for paginated searches)- Parameters:
n
- List page maximum size
-
getMaxRows
public int getMaxRows()
Get the list maximum size (for paginated search)- Returns:
- List page maximum size
-
getResp
public java.util.Map<java.lang.String,GroupDB> getResp()
Get all groups granted in the user session
-
getRespList
public java.lang.String getRespList()
Get all groups granted in the user session in a text format (separated with comma)
-
setRespList
public void setRespList(java.lang.String s)
Set all groups granted in the user session in a text format (separated with comma)
-
setFirstName
public void setFirstName(java.lang.String firstname)
Set the user's first name- Parameters:
firstname
- User's first name
-
getFirstName
public java.lang.String getFirstName()
Get the user's first name- Returns:
- User's first name
-
setLastName
public void setLastName(java.lang.String lastname)
Set the user's last name- Parameters:
lastname
- User's last name
-
getLastName
public java.lang.String getLastName()
Get the user's last name- Returns:
- User's last name
-
getFullName
public java.lang.String getFullName()
Get the user's full name (or the login if unknown)- Returns:
- User's full name
-
setEmail
public void setEmail(java.lang.String email)
Set the user's e-mail address- Parameters:
email
- User's e-mail address
-
getEmail
public java.lang.String getEmail()
Get the user's email address- Returns:
- User's email address
-
setWorkPhoneNumber
public void setWorkPhoneNumber(java.lang.String num)
Set the user's work phone number- Parameters:
num
- User's work phone number
-
getWorkPhoneNumber
public java.lang.String getWorkPhoneNumber()
Get the user's work phone number- Returns:
- User's work phone number
-
setHomePhoneNumber
public void setHomePhoneNumber(java.lang.String num)
Set the user's home phone number- Parameters:
num
- User's home phone number
-
getHomePhoneNumber
public java.lang.String getHomePhoneNumber()
Get the user's home phone number- Returns:
- User's home phone number
-
setMobilePhoneNumber
public void setMobilePhoneNumber(java.lang.String num)
Set the user's mobile phone number- Parameters:
num
- User's mobile phone number
-
getMobilePhoneNumber
public java.lang.String getMobilePhoneNumber()
Get the user's mobile phone number- Returns:
- User's mobile phone number
-
getCellPhoneNumber
public java.lang.String getCellPhoneNumber()
Get the user's cell phone number (alias togetMobilePhoneNumber
)- Returns:
- User's cell phone number
-
setCellPhoneNumber
public void setCellPhoneNumber(java.lang.String num)
Set the user's cell phone number (alias tosetMobilePhoneNumber
)- Parameters:
num
- User's cell phone number
-
setPicture
public void setPicture(DocumentDB doc)
Set the user's picture document- Parameters:
doc
- User's picture document
-
getPicture
public DocumentDB getPicture()
Get the user picture document- Returns:
- User's picture document
-
setStatus
public void setStatus(int status)
Set the user status- Parameters:
status
- User's status
-
getStatus
public int getStatus()
Get the user's status- Returns:
- User's status
-
getText
public java.util.Map<java.lang.String,java.lang.String> getText()
Get all the translated text values (in current user's language)
-
T
public java.lang.String T(java.lang.String code)
Get translated text value for specified code (in current user's language)
-
T
public java.lang.String T(java.lang.String code, java.lang.String def)
Get translated text value for specified code (in current user's language) or default
-
T
public java.lang.String T(java.lang.String code, boolean plural)
Get translated text value for specified code. Value must match single|plural
-
getText
public final java.lang.String getText(java.lang.String code)
Same as T
-
addText
public void addText(java.lang.String code, java.lang.String value)
Add a translated text- Parameters:
code
- Codevalue
- text value
-
notGranted
public static java.lang.String notGranted(Grant g)
Translated not granted message- Parameters:
g
- Optional grant (defaults to system admin grant)- Returns:
- Translated message
-
setNumberFormat
public void setNumberFormat(java.lang.String nf)
Set the user number format- Parameters:
nf
- Number format (DC, SC, CD with D=dot C=comma S=space)
-
setNumberFormat
public void setNumberFormat(java.lang.String code, java.lang.String lang)
Set number format- Parameters:
code
- NUM_FORMAT code (DC, SC, CD with D=dot C=comma S=space)lang
- user language
-
getNumberFormat
public java.lang.String getNumberFormat()
User number format- Returns:
- DC (1.234.567,89), SC (1 234 567,89) or CD (1,234,567.89)
-
setDateFormat
public void setDateFormat(java.lang.String df)
Set the user date format- Parameters:
df
- Date format (ex DD/MM/YYYY)
-
setDateFormat
public void setDateFormat(java.lang.String code, java.lang.String lang)
Set date format- Parameters:
code
- DATE_FORMAT code (YMD, DMY, MDY, CHF)lang
- user language
-
getDateFormat
public java.lang.String getDateFormat()
User date format (ex MM/DD/YYYY)
-
setTimeZoneID
public void setTimeZoneID(java.lang.String zoneID)
Set the user time zone- Parameters:
zoneID
- zone ID short or long name (ex: GMT or Europe/Paris)
-
getTimeZoneID
public java.lang.String getTimeZoneID()
User time zone ID
-
setTimeZone
public void setTimeZone(java.util.TimeZone tz)
Set the user time zone
-
getTimeZone
public java.util.TimeZone getTimeZone()
Get the user time zone
-
toServiceDate
public java.lang.String toServiceDate(java.lang.String formattedDate)
Convert a formatted date to a service date
-
toFormattedDate
public java.lang.String toFormattedDate(java.lang.String serviceDate)
Convert a service date to a formatted date
-
toServiceTime
public java.lang.String toServiceTime(java.lang.String formattedTime)
Convert a formatted time to a service time
-
toFormattedTime
public java.lang.String toFormattedTime(java.lang.String serviceTime)
Convert a service time to a formatted time
-
toServiceDatetime
public java.lang.String toServiceDatetime(java.lang.String formattedDatetime)
Convert a formatted date time to a service date time
-
toFormattedDatetime
public java.lang.String toFormattedDatetime(java.lang.String serviceDatetime)
Convert a service date time to a formatted date time
-
toServiceFloat
public java.lang.String toServiceFloat(java.lang.String formattedFloat)
Convert a formatted float to a service float
-
toFormattedFloat
public java.lang.String toFormattedFloat(java.lang.String serviceFloat, int size, int precision)
Convert a service float to a formatted float
-
toFormattedFloat
public java.lang.String toFormattedFloat(java.math.BigDecimal serviceFloat, int size, int precision)
Convert a service float to a formatted float
-
toFormattedBoolean
public java.lang.String toFormattedBoolean(java.lang.String serviceBoolean)
Convert a service boolean to a formatted boolean
-
getParameters
public java.util.Map<java.lang.String,java.io.Serializable> getParameters()
Get all parameters- Returns:
- Parameters map
-
hasParameter
public boolean hasParameter(java.lang.String name)
Check if a text session parameter is set- Parameters:
name
- Parameter name- Returns:
- True is parameter is set
-
getParameter
public java.lang.String getParameter(java.lang.String name)
Gets a text session parameter- Parameters:
name
- Parameter name- Returns:
- Session parameter value
-
getParameter
public java.lang.String getParameter(java.lang.String name, java.lang.String def)
Gets a text session parameter- Parameters:
name
- Parameter namedef
- Default value- Returns:
- Session parameter value
-
getObjectParameter
public java.lang.Object getObjectParameter(java.lang.String name)
Gets one object session parameter- Parameters:
name
- Parameter name- Returns:
- Session parameter object
-
getObjectParameter
public java.lang.Object getObjectParameter(java.lang.String name, java.lang.Object def)
Gets one object session parameter- Parameters:
name
- Parameter namedef
- Default value- Returns:
- Session parameter object
-
getFlagParameter
public boolean getFlagParameter(java.lang.String name)
Gets a flag session system parameter as boolean (false if absent)- Parameters:
name
- Parameter name- Returns:
- boolean value
-
getFlagParameter
public boolean getFlagParameter(java.lang.String name, boolean def)
Gets a flag session system parameter as boolean- Parameters:
name
- Parameter namedef
- Default value- Returns:
- boolean value
-
getBooleanParameter
public boolean getBooleanParameter(java.lang.String name)
Gets an boolean session system parameter as boolean (false if absent)- Parameters:
name
- Parameter name- Returns:
- boolean value
-
getBooleanParameter
public boolean getBooleanParameter(java.lang.String name, boolean def)
Gets an boolean session system parameter as boolean- Parameters:
name
- Parameter name- Returns:
- boolean value
-
getIntParameter
public int getIntParameter(java.lang.String name)
Gets an integer session system parameter as boolean (0 if absent)- Parameters:
name
- Parameter name- Returns:
- integer value
-
getIntParameter
public int getIntParameter(java.lang.String name, int def)
Gets an integer session system parameter as boolean- Parameters:
name
- Parameter namedef
- Default value- Returns:
- integer value
-
getLongParameter
public long getLongParameter(java.lang.String name, long def)
Gets an long integer session system parameter as boolean- Parameters:
name
- Parameter namedef
- Default value- Returns:
- integer value
-
getLongParameter
public long getLongParameter(java.lang.String name)
Gets an long integre session system parameter as boolean (0 if absent)- Parameters:
name
- Parameter name- Returns:
- integer value
-
getJSONObjectParameter
public org.json.JSONObject getJSONObjectParameter(java.lang.String name)
Gets an JSON object string session system parameter as JSON object- Parameters:
name
- Parameter name- Returns:
- JSON object or null
-
getJSONObjectParameter
public org.json.JSONObject getJSONObjectParameter(java.lang.String name, java.lang.String def)
Gets an JSON object string session system parameter as JSON object- Parameters:
name
- Parameter namedef
- Default JSON string value- Returns:
- JSON object
-
getJSONObjectParameter
public org.json.JSONObject getJSONObjectParameter(java.lang.String name, org.json.JSONObject def)
Gets an JSON object string session system parameter as JSON object- Parameters:
name
- Parameter namedef
- Default JSONobject value- Returns:
- JSON object
-
getJSONArrayParameter
public org.json.JSONArray getJSONArrayParameter(java.lang.String name)
Gets an JSON array string session system parameter as JSON array- Parameters:
name
- Parameter name- Returns:
- JSON array or null
-
getJSONArrayParameter
public org.json.JSONArray getJSONArrayParameter(java.lang.String name, java.lang.String def)
Gets an JSON array string session system parameter as JSON array- Parameters:
name
- Parameter namedef
- Default JSON string value- Returns:
- JSON array
-
getJSONArrayParameter
public org.json.JSONArray getJSONArrayParameter(java.lang.String name, org.json.JSONArray def)
Gets an JSON array string session system parameter as JSON array- Parameters:
name
- Parameter namedef
- Default JSONArray value- Returns:
- JSON array
-
setParameter
public void setParameter(java.lang.String name, java.lang.String value)
Sets a text session system parameter (useful, for instance, to store data thru different pages and contexts)- Parameters:
name
- Parameter namevalue
- Value
-
setParameter
public void setParameter(java.lang.String name, java.io.Serializable obj)
Sets one object session parameter (useful, for instance, to store data thru different pages and contexts)- Parameters:
name
- Parameter nameobj
- Any object, if null the parameter name is removed
-
removeParameter
public java.io.Serializable removeParameter(java.lang.String name)
Remove a session system parameter- Parameters:
name
- Parameter name
-
setFlagParameter
public void setFlagParameter(java.lang.String name, boolean value)
Sets a yes/no flag session system parameter- Parameters:
name
- Parameter namevalue
- Value (boolean value translated into "yes" or "no")
-
getParameterId
public java.lang.String getParameterId(java.lang.String code)
-
setObjectParameter
public void setObjectParameter(ObjectCore obj, java.lang.String name, java.io.Serializable value)
Sets one object session parameter (useful, for instance, to store data thru different pages and contexts)- Parameters:
obj
- Objectname
- Parameter namevalue
- Any object, if null the parameter name is removed
-
removeObjectParameter
public java.io.Serializable removeObjectParameter(ObjectCore obj, java.lang.String name)
Unsets an object parameter- Parameters:
obj
- Objectname
- Parameter name- Returns:
- Serializable object if parameter exists
-
removeObjectParameters
public void removeObjectParameters(ObjectCore obj, java.lang.String prefix)
Unsets object parameters starting with prefix- Parameters:
obj
- Objectprefix
- Parameter prefix
-
getObjectParameter
public java.lang.Object getObjectParameter(ObjectCore obj, java.lang.String name)
Gets one object parameter- Parameters:
obj
- Objectname
- Parameter name- Returns:
- Object parameter
-
getObjectParameters
public java.util.Map<java.lang.String,java.io.Serializable> getObjectParameters(ObjectCore obj)
Gets all object parameters- Parameters:
obj
- Object- Returns:
- Map of parameters value
-
isLoaded
public boolean isLoaded()
Checks if grants are loaded- Returns:
- true if grants have been already loaded, false otherwise
-
checkPwd
public boolean checkPwd(java.lang.String password)
Check current user password- Parameters:
password
- Password- Returns:
- True if the given password is correct
-
isDesigner
public boolean isDesigner()
Is "designer" user?- Returns:
- True if user is the "e;designer" user
-
isPublic
public boolean isPublic()
Is "public" user?- Returns:
- True if user is the "public" user
-
isSystem
public boolean isSystem()
Is "system" user?- Returns:
- True if user is the "system" user
-
isSystemAdmin
public boolean isSystemAdmin()
Is "system" user (alias to isSystem)?- Returns:
- True if user is the "system" user
-
canUpdateSystem
public boolean canUpdateSystem()
Can update system modules' objects (ADMIN_SYSTEM = yes/no)- Returns:
- True if ADMIN_SYSTEM system parameter value is yes
-
hasResponsibility
public boolean hasResponsibility(java.lang.String group)
Check if the user has one responsibility- Parameters:
group
- Group name- Returns:
- True if the group is granted to the user
-
getActions
public java.util.List<Action> getActions(java.lang.String obj)
Get all specific actions of one object- Parameters:
obj
- Object name- Returns:
- List of Actions
-
getActions
public java.util.List<Action> getActions(java.lang.String obj, java.lang.String startsWith)
Get all actions of one object- Parameters:
obj
- Object namestartsWith
- Name starts with- Returns:
- List of Actions
-
getAction
public Action getAction(java.lang.String obj, java.lang.String name)
Get a specific action of one object- Parameters:
obj
- Object namename
- Action name- Returns:
- Action or null if not found
-
getPredefinedSearch
public java.util.Map<java.lang.String,java.util.List<PredefinedSearch>> getPredefinedSearch()
Get all predefined searches
-
getPredefinedSearch
public java.util.List<PredefinedSearch> getPredefinedSearch(java.lang.String object)
Get predefined searches of object- Parameters:
object
- Object name
-
getPredefinedSearch
public PredefinedSearch getPredefinedSearch(java.lang.String object, java.lang.String id)
Get predefined searches of object- Parameters:
object
- Object nameid
- Search row id
-
addPredefinedSearch
public void addPredefinedSearch(java.lang.String object, PredefinedSearch ps)
Add a predefined search to object- Parameters:
object
- Object nameps
- Predefined search
-
getScriptById
public SharedScript getScriptById(java.lang.String scrId)
Get a shared code for specified ID- Parameters:
scrId
- Shared code ID- Returns:
- Shared code
-
getSharedScript
public SharedScript getSharedScript(java.lang.String name)
Get a shared code for specified code- Parameters:
name
- Shared code name- Returns:
- Shared code
-
addSharedScript
public void addSharedScript(SharedScript scr)
Add a shared code- Parameters:
scr
- Shared code
-
removeSharedScript
public void removeSharedScript(java.lang.String name)
Remove a shared code- Parameters:
name
- Shared code name
-
removeSharedScripts
public void removeSharedScripts()
Remove all shared codes
-
getResourceById
public Resource getResourceById(java.lang.String resId)
Get a resource for specified resource ID- Parameters:
resId
- Resource ID- Returns:
- Resource or null if not exists
-
getResource
public Resource getResource(java.lang.String type, java.lang.String code)
Get a disposition resource for specified code and type- Parameters:
type
- Resource typecode
- Resource code- Returns:
- Resource or null if not exists
-
getResource
public Resource getResource(java.lang.String type, java.lang.String code, java.lang.String objectClass, java.lang.String objId)
Get a resource for specified code and type- Parameters:
type
- Resource type (default TYPE_IMAGE)code
- Resource codeobjectClass
- Optional target object class name (ObjectInternal, ObjectExternal, ... or null for Disposition)objId
- Optional object Id (null for Disposition)- Returns:
- Resource or null if not exists
-
getResource
public Resource getResource(java.lang.String code, java.lang.String type, java.lang.String objectName)
Get a resource for specified code, type or objectName- Parameters:
code
- Resource codetype
- Resource typeobjectName
- Object name (of disposition, internal or external object, or process)- Returns:
- Resource or null if not exists
-
getResource
public Resource getResource(java.lang.String code)
Get a resource for a specified code- Parameters:
code
- Resource code- Returns:
- Resource or null if not exists
-
getResources
public java.util.Map<java.lang.String,Resource> getResources()
Get all resources- Returns:
- Map of resources
-
getObjectResources
public java.util.List<Resource> getObjectResources(java.lang.String objectClass, java.lang.String objId)
Get object resources- Parameters:
objectClass
- Target object type name (ObjectInternal, ObjectExternal, ... or null for Disposition)objId
- Object Id (null for Disposition)- Returns:
- List of resources
-
getResourceCodes
public java.util.List<java.lang.String> getResourceCodes(java.lang.String type, java.lang.String objectClass, java.lang.String objId)
Get resource codes for specified type- Parameters:
type
- Resource typeobjectClass
- Target object type name (ObjectInternal, ObjectExternal, ... or null for Disposition)objId
- Object Id (null for Disposition)- Returns:
- List of resources
-
addResource
@Deprecated(forRemoval=false, since="5") public void addResource(Resource res, java.lang.String objectClass, java.lang.String objId)
Deprecated.Add a resource- Parameters:
res
- ResourceobjectClass
- Target object type name (ObjectInternal, ObjectExternal, ... or null for Disposition)objId
- Object Id (null for Disposition)
-
addResource
public void addResource(Resource res, java.lang.String objectClass, java.lang.String objId, java.lang.String objName)
Add a resource- Parameters:
res
- ResourceobjectClass
- Target object type name (ObjectInternal, ObjectExternal, ... or null for Disposition)objId
- Object Id (null for Disposition)objName
- Target object name
-
removeResources
public void removeResources(java.lang.String objectClass, java.lang.String objId, boolean clearCache)
Remove resources- Parameters:
objectClass
- Target object type name (ObjectInternal, ObjectExternal, ... or null for Disposition)objId
- Object Id (null for Disposition)
-
removeResources
public void removeResources()
Remove all resources
-
getTreeView
public TreeView getTreeView(java.lang.String name)
Get a tree view- Parameters:
name
- tree view name- Returns:
- Tree view or null if not found
-
getTreeViewsOfObject
public java.util.List<TreeView> getTreeViewsOfObject(java.lang.String name, boolean root)
Get treeviews with a given object in hierarchy- Parameters:
name
- Object nameroot
- true to get only the tree where object is the root- Returns:
- List of treeviews or null if not found
-
setTreeView
public void setTreeView(java.lang.String name, TreeView treeview)
Set tree view- Parameters:
name
- Object nametreeview
- Treeview
-
getTreeViews
public java.util.Map<java.lang.String,TreeView> getTreeViews()
Get all tree views- Returns:
- Map of tree views
-
clearTreeViews
public void clearTreeViews()
Clear tree views
-
getShortcuts
public java.util.List<Shortcut> getShortcuts()
Get all shortcuts- Returns:
- List of shortcuts
-
setShortcuts
public void setShortcuts(java.util.List<Shortcut> shortcuts)
Set all shortcuts- Parameters:
shortcuts
- List of shortcuts
-
getShortcut
public Shortcut getShortcut(java.lang.String name)
Get shortcut- Parameters:
name
- Shortcut name- Returns:
- Shortcut
-
accessShortcut
public boolean accessShortcut(java.lang.String name)
Check if the shortcut is granted to the user- Parameters:
name
- Shortcut name- Returns:
- True if the shortcut is granted to the user
-
getWebZones
@Deprecated(forRemoval=true, since="5") public java.util.List<WebZone> getWebZones()
Deprecated, for removal: This API element is subject to removal in a future version.Get all web zones- Returns:
- List of web zones
-
getWebZones
@Deprecated(forRemoval=true, since="5") public java.util.List<WebZone> getWebZones(java.lang.String zone)
Deprecated, for removal: This API element is subject to removal in a future version.Get web zones for zone- Parameters:
zone
- Zone- Returns:
- List of web zones
-
getWebZone
@Deprecated(forRemoval=true, since="5") public WebZone getWebZone(java.lang.String zone, java.lang.String name, java.lang.String lang)
Deprecated, for removal: This API element is subject to removal in a future version.Get web zone for zone, name and language- Parameters:
zone
- Zonename
- Namelang
- Language- Returns:
- Web zone
-
getWebZone
@Deprecated(forRemoval=true, since="5") public WebZone getWebZone(java.lang.String zone, int order, java.lang.String lang)
Deprecated, for removal: This API element is subject to removal in a future version.Get web zone for zone, order and language- Parameters:
zone
- Zoneorder
- Orderlang
- Language- Returns:
- Web zone
-
accessWebZone
@Deprecated(forRemoval=true, since="5") public boolean accessWebZone(java.lang.String zone, int order, java.lang.String lang)
Deprecated, for removal: This API element is subject to removal in a future version.Check if the web zone is granted to the user- Parameters:
zone
- Zoneorder
- Orderlang
- Language- Returns:
- True if the web zone is granted to the user
-
accessDomain
public boolean accessDomain(java.lang.String domain)
Check if the domain is granted to the user- Parameters:
domain
- Domain name- Returns:
- True if the domain is granted to the user
-
accessObject
public boolean accessObject(java.lang.String obj)
Check if the object is granted to the user- Parameters:
obj
- Object name- Returns:
- True if the object is granted to the user
-
accessIndexedObjects
public java.util.List<java.lang.String> accessIndexedObjects()
List of accessible objects with fulltext index
-
accessIndexedObject
public boolean accessIndexedObject(java.lang.String obj)
Check if the object is granted to the user and indexable- Parameters:
obj
- Object name- Returns:
- True if the object is granted to the user
-
addAccessObject
public void addAccessObject(java.lang.String obj)
Grant the right to read/open the object- Parameters:
obj
- Object name
-
addAccessRead
public void addAccessRead(java.lang.String obj)
Alias to addAccessObject
-
delAccessObject
public void delAccessObject(java.lang.String obj)
Revoke the right to read/open the object- Parameters:
obj
- Object name
-
removeAccessObject
public void removeAccessObject(java.lang.String obj)
Alias to delAccessObject
-
delAccessRead
public void delAccessRead(java.lang.String obj)
Alias to delAccessObject
-
removeAccessRead
public void removeAccessRead(java.lang.String obj)
Alias to delAccessObject
-
getProcess
public java.util.Map<java.lang.String,java.lang.String> getProcess()
Get the granted processes
-
accessProcess
public boolean accessProcess(java.lang.String process)
Check if the process is granted to the user- Parameters:
process
- Process name
-
addAccessProcess
public void addAccessProcess(java.lang.String process)
Grant the right to read/open the process- Parameters:
process
- Process name
-
delAccessProcess
public void delAccessProcess(java.lang.String process)
Revoke the right to read/open the process- Parameters:
process
- Process name
-
accessAction
public boolean accessAction(java.lang.String obj, java.lang.String action)
Check if the action is granted to the user for a given object- Parameters:
obj
- Object nameaction
- Action name
-
enableAction
public void enableAction(java.lang.String obj, java.lang.String action)
Enable one action on a given object- Parameters:
obj
- Object nameaction
- Action name
-
disableAction
public void disableAction(java.lang.String obj, java.lang.String action)
Disable one action on a given object- Parameters:
obj
- Object nameaction
- Action name
-
accessCreate
public boolean accessCreate(java.lang.String obj)
Check if the creation is granted to the user- Parameters:
obj
- Object name
-
addAccessCreate
public void addAccessCreate(java.lang.String obj)
Grant the object creation to the user- Parameters:
obj
- Object name
-
delAccessCreate
public void delAccessCreate(java.lang.String obj)
Revoke the object creation to the user- Parameters:
obj
- Object name
-
removeAccessCreate
public void removeAccessCreate(java.lang.String obj)
Alias to delAccessCreate
-
accessUpdate
public boolean accessUpdate(java.lang.String obj)
Check if update is granted to the user- Parameters:
obj
- Object name
-
addAccessUpdate
public void addAccessUpdate(java.lang.String obj)
Grant the object update to the user- Parameters:
obj
- Object name
-
delAccessUpdate
public void delAccessUpdate(java.lang.String obj)
Revoke the object update to the user- Parameters:
obj
- Object name
-
removeAccessUpdate
public void removeAccessUpdate(java.lang.String obj)
Alias to delAccessUpdate
-
accessDelete
public boolean accessDelete(java.lang.String obj)
Check if deletion is granted to the user- Parameters:
obj
- Object name
-
delAccessDelete
public void delAccessDelete(java.lang.String obj)
Revoke the object deletion to the user- Parameters:
obj
- Object name
-
removeAccessDelete
public void removeAccessDelete(java.lang.String obj)
Alias to delAccessDelete
-
addAccessDelete
public void addAccessDelete(java.lang.String obj)
Grant the object deletion to the user- Parameters:
obj
- Object name
-
changeAccess
public boolean[] changeAccess(java.lang.String obj, boolean create, boolean read, boolean update, boolean delete)
Change the Create/Read/Update/Delete access to object- Parameters:
obj
- Object namecreate
- Allows creation ?read
- Allows search/select ?update
- Allows update ?delete
- Allows deletion ?- Returns:
- previous CRUD
-
changeAccess
public boolean[] changeAccess(java.lang.String obj, boolean[] crud)
Change the Create/Read/Update/Delete access to object- Parameters:
obj
- Object namecrud
- Allows Create/Read/Update/Delete ?- Returns:
- previous CRUD
-
getVisibilities
public java.util.Map<java.lang.String,java.util.List<ObjectVisibility>> getVisibilities()
Get object all visibilities- Returns:
- Hash of all indexed visibilities per objects and types
-
getVisibility
public java.util.List<ObjectVisibility> getVisibility(java.lang.String object, char type)
Get the object's standard access visibilities- Parameters:
object
- Object nametype
- Visibility type TYPE_READ, TYPE_UPDATE, TYPE_DELETE- Returns:
- List of visibilities or null
-
getVisibility
public java.util.List<ObjectVisibility> getVisibility(java.lang.String object, java.lang.String action)
Get object ACTION visibilities- Parameters:
object
- Object nameaction
- External action name- Returns:
- List of visibilities or null
-
logSession
public boolean logSession()
Are the session login/logout logged?
-
logActivity
public boolean logActivity()
Are the user's activities (redo log) logged?
-
logDebug
public boolean logDebug()
Are the debug events logged ?
-
setLogDebug
public void setLogDebug(boolean b)
Enable/disable the debug events logging- Parameters:
b
- Enable?
-
logInfo
public boolean logInfo()
Are the info events logged?
-
setLogInfo
public void setLogInfo(boolean b)
Enable/disable the info events logging- Parameters:
b
- Enable?
-
logWarning
public boolean logWarning()
Are the warning events logged?
-
setLogWarning
public void setLogWarning(boolean b)
Enable/disable the warning events logging- Parameters:
b
- Enable?
-
logError
public boolean logError()
Are the error events logged?
-
setLogError
public void setLogError(boolean b)
Enable/disable the error events logging- Parameters:
b
- Enable?
-
logFatal
public boolean logFatal()
Are the fatal events logged?
-
setLogFatal
public void setLogFatal(boolean b)
Enable/disable the fatal events logging- Parameters:
b
- Enable?
-
logObject
public boolean logObject()
Are the object events logged?
-
setLogObject
public void setLogObject(boolean b)
Enable/disable the object events logging- Parameters:
b
- Enable?
-
logDocument
public boolean logDocument()
Are the document events logged?
-
setLogDocument
public void setLogDocument(boolean b)
Enable/disable the document events logging- Parameters:
b
- Enable?
-
getRailway
public int getRailway()
Get the railway size to display in the navigation bar
-
setRailway
public void setRailway(int p)
Set the railway size to display in the navigation bar
-
showNavigator
public boolean showNavigator()
The user needs the navigation bar ?
-
setShowNavigator
public void setShowNavigator(boolean p)
Set whether the user needs the navigation bar
-
getProjectDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getProjectDir()
Deprecated.Use Platform.getProjectDir
-
setProjectDir
@Deprecated(forRemoval=false, since="5") public void setProjectDir(java.lang.String dir)
Deprecated.Use Platform.setProjectDir
-
getDocDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getDocDir()
Deprecated.Use Platform.getDocDir
-
setDocDir
@Deprecated(forRemoval=false, since="5") public void setDocDir(java.lang.String dir)
Deprecated.Use Platform.setDocDir
-
getDocLocalDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getDocLocalDir()
Deprecated.Use Platform.getDocLocalDir
-
setDocLocalDir
@Deprecated(forRemoval=false, since="5") public void setDocLocalDir(java.lang.String dir)
Deprecated.Use Platform.setDocLocalDir
-
getDocDirMax
@Deprecated(forRemoval=false, since="5") public long getDocDirMax()
Deprecated.Use Platform.getDocDirMax
-
setDocDirMax
@Deprecated(forRemoval=false, since="5") public void setDocDirMax(long n)
Deprecated.Use Platform.setDocDirMax
-
getTmpDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getTmpDir()
Deprecated.Use Platform.getTmpDir
-
setTmpDir
@Deprecated(forRemoval=false, since="5") public void setTmpDir(java.lang.String dir)
Deprecated.Use Platform.setTmpDir
-
getContentDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getContentDir()
Deprecated.Use Platform.getContentDir
-
setContentDir
@Deprecated(forRemoval=false, since="5") public void setContentDir(java.lang.String dir)
Deprecated.Use Platform.setContentDir
-
getExternalDocsDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getExternalDocsDir()
Deprecated.Use Platform.getExternalDocsDir
-
setExternalDocsDir
@Deprecated(forRemoval=false, since="5") public void setExternalDocsDir(java.lang.String dir)
Deprecated.Use Platform.setExternalDocsDir
-
getLogDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getLogDir()
Deprecated.Use Platform.getLogDir
-
setLogDir
@Deprecated(forRemoval=false, since="5") public void setLogDir(java.lang.String dir)
Deprecated.Use Platform.setLogDir
-
getRecycleBinDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getRecycleBinDir()
Deprecated.Use Platform.getRecycleBinDir
-
setRecycleBinDir
@Deprecated(forRemoval=false, since="5") public void setRecycleBinDir(java.lang.String dir)
Deprecated.Use Platform.setRecycleBinDir
-
getCacheDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getCacheDir()
Deprecated.Use Platform.getCacheDir
-
setCacheDir
@Deprecated(forRemoval=false, since="5") public void setCacheDir(java.lang.String dir)
Deprecated.Use Platform.setCacheDir
-
getImportDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getImportDir()
Deprecated.Use Platform.getImportDir
-
setImportDir
@Deprecated(forRemoval=false, since="5") public void setImportDir(java.lang.String dir)
Deprecated.Use Platform.setImportDir
-
getExportDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getExportDir()
Deprecated.Use Platform.getExportDir
-
setExportDir
@Deprecated(forRemoval=false, since="5") public void setExportDir(java.lang.String dir)
Deprecated.Use Platform.setExportDir
-
getIndexDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getIndexDir()
Deprecated.Use Platform.getIndexDir
-
setIndexDir
@Deprecated(forRemoval=false, since="5") public void setIndexDir(java.lang.String dir)
Deprecated.Use Platform.setIndexDir
-
getBeanDir
@Deprecated(forRemoval=false, since="4.0") public final java.lang.String getBeanDir()
Deprecated.Use Platform.getSrcDir
-
setBeanDir
@Deprecated(forRemoval=false, since="4.0") public final void setBeanDir(java.lang.String dir)
Deprecated.Use Platform.setSrcDir
-
getSrcDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getSrcDir()
Deprecated.Use Platform.getSrcDir
-
setSrcDir
@Deprecated(forRemoval=false, since="5") public void setSrcDir(java.lang.String dir)
Deprecated.Use Platform.setSrcDir
-
getBinDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getBinDir()
Deprecated.Use Platform.getBinDir
-
setBinDir
@Deprecated(forRemoval=false, since="5") public void setBinDir(java.lang.String dir)
Deprecated.Use Platform.setBinDir
-
getMavenDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getMavenDir()
Deprecated.Use Platform.getMavenDir
-
setMavenDir
@Deprecated(forRemoval=false, since="5") public void setMavenDir(java.lang.String dir)
Deprecated.Use Platform.setMavenDir
-
getClassesDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getClassesDir()
Deprecated.Use Platform.getClassesDir
-
setClassesDir
@Deprecated(forRemoval=false, since="5") public void setClassesDir(java.lang.String dir)
Deprecated.Use Platform.setClassesDir
-
getJavadocDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getJavadocDir()
Deprecated.Use Platform.getJavadocDir
-
setJavadocDir
@Deprecated(forRemoval=false, since="5") public void setJavadocDir(java.lang.String dir)
Deprecated.Use Platform.setJavadocDir
-
getSourcesDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getSourcesDir()
Deprecated.Use Platform.getSourcesDir
-
setSourcesDir
@Deprecated(forRemoval=false, since="5") public void setSourcesDir(java.lang.String dir)
Deprecated.Use Platform.setSourcesDir
-
getLibsDir
@Deprecated(forRemoval=false, since="5") public java.lang.String getLibsDir()
Deprecated.Use Platform.getLibsDir
-
setLibsDir
@Deprecated(forRemoval=false, since="5") public void setLibsDir(java.lang.String dir)
Deprecated.Use Platform.setLibsDir
-
getSubPackage
public java.lang.String getSubPackage()
Get subpackage of specific classes
-
setSubPackage
public void setSubPackage(java.lang.String sp)
Set subpackage of specific classes
-
isAboutEnable
public boolean isAboutEnable()
Is about info enabled ? Forced for admin profiles- Returns:
- True if about info is enabled
-
setAbout
public void setAbout(boolean b)
Set whether about info is enabled- Parameters:
b
- Enabled?
-
getWindowTitle
public java.lang.String getWindowTitle()
Get the window title- Returns:
- Window title
-
setWindowTitle
public void setWindowTitle(java.lang.String title)
Set the window title- Parameters:
title
- Window title
-
isPanelFilterEnable
public boolean isPanelFilterEnable()
Is display panel filter?
-
setPanelFilter
public void setPanelFilter(boolean b)
Set display the panel filter
-
getPanelCharMax
public int getPanelCharMax()
Get panels (tabs) max width in char
-
setPanelCharMax
public void setPanelCharMax(int n)
Set panels (tabs) max width in char
-
isHtmlEditorEnable
public boolean isHtmlEditorEnable()
Is the HTML editor enabled ?
-
setHtmlEditor
public void setHtmlEditor(boolean b)
Set whether the HTML editor is enabled
-
getMenuStyle
public java.lang.String getMenuStyle()
Get menu style
-
getDBPatchLevel
public java.lang.String getDBPatchLevel()
Get database patch level
-
getHashAlgorithm
@Deprecated(forRemoval=true, since="4.0") public java.lang.String getHashAlgorithm()
Deprecated, for removal: This API element is subject to removal in a future version.Use SystemParameters.getHashEncoding
-
setHashAlgorithm
@Deprecated(forRemoval=true, since="4.0") public void setHashAlgorithm(java.lang.String p)
Deprecated, for removal: This API element is subject to removal in a future version.Use SystemParameters.setHashEncoding
-
getHashEncoding
@Deprecated(forRemoval=true, since="4.0") public java.lang.String getHashEncoding()
Deprecated, for removal: This API element is subject to removal in a future version.Use SystemParameters.getHashEncoding
-
setHashEncoding
@Deprecated(forRemoval=true, since="4.0") public void setHashEncoding(java.lang.String p)
Deprecated, for removal: This API element is subject to removal in a future version.Use SystemParameters.setHashEncoding
-
getLogEvent
public AppLogEvent getLogEvent(java.lang.String code)
Get the log event for a given code
-
getLogEvents
public java.util.Map<java.lang.String,AppLogEvent> getLogEvents()
Get all log events
-
isConvertWildcards
public boolean isConvertWildcards()
Are wildcard converted (from * and ? to SQL's % and _)?- Returns:
- True if the wildcards are converted
-
setConvertWildcards
public void setConvertWildcards(boolean convert)
Set wildcard as converted (from * and ? to SQL's % and _)- Parameters:
convert
- Convert wildcards?
-
addObjectCalculated
public void addObjectCalculated(java.lang.String object, java.lang.String field, java.lang.String target, java.lang.String refId)
Not null when the field is linked to calculated field in DB. key = the object used in external expression value = Hash of fields used in external expression containing a List of (linked objects to refresh + the ref field to make the join)- Parameters:
object
- Object namefield
- Object field link to external expressiontarget
- Object to refreshrefId
- Reference field
-
getObjectCalculated
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<java.lang.String>>> getObjectCalculated()
Get ref object calculated fields- Returns:
- Ref object calculated fields map
-
getMaxUploadSize
public long getMaxUploadSize()
Get the upload limit size (in Mb)
-
setMaxUploadSize
public void setMaxUploadSize(long s)
Set upload size limit (in Mb)
-
isCompletionEnable
public boolean isCompletionEnable()
Is the completion feature enabled?
-
setCompletion
public void setCompletion(boolean b)
Set whether the completion feature is enabled
-
isIOInterfaceEnable
@Deprecated(forRemoval=false, since="5") public boolean isIOInterfaceEnable()
Deprecated.
-
setIOInterface
@Deprecated(forRemoval=false, since="5") public void setIOInterface(boolean b)
Deprecated.
-
isGITInterfaceEnable
@Deprecated(forRemoval=false, since="5") public boolean isGITInterfaceEnable()
Deprecated.
-
setGITInterface
@Deprecated(forRemoval=false, since="5") public void setGITInterface(boolean b)
Deprecated.
-
isAPIInterfaceEnable
@Deprecated(forRemoval=false, since="5") public boolean isAPIInterfaceEnable()
Deprecated.
-
setAPIInterface
@Deprecated(forRemoval=false, since="5") public void setAPIInterface(boolean b)
Deprecated.
-
getVersion
public java.lang.String getVersion()
Get the application version- Returns:
- Application version
-
getPoweredBy
public java.lang.String getPoweredBy()
Get the powered by text- Returns:
- Powered by text
-
getAuthMethod
public int getAuthMethod()
Get the authentication method- Returns:
- One of AuthTool.AUTH_METHOD_* constant
-
isDefaultAuthMethod
public boolean isDefaultAuthMethod()
Is the authentication method default?
-
isInternalOAuth2AuthMethod
public boolean isInternalOAuth2AuthMethod()
Is the authentication method OAuth2?
-
isOAuth2AuthMethod
public boolean isOAuth2AuthMethod()
Is the authentication method OAuth2?
-
isSAMLAuthMethod
public boolean isSAMLAuthMethod()
Is the authentication method SAML?
-
isCROWDAuthMethod
public boolean isCROWDAuthMethod()
Is the authentication method CROWD?
-
isLDAPAuthMethod
public boolean isLDAPAuthMethod()
Is the authentication method LDAP?
-
isCustomAuthMethod
public boolean isCustomAuthMethod()
Is the authentication method custom?
-
getAuthProvider
public java.lang.String getAuthProvider()
Get the authentication provider name- Returns:
- Auth provider name (e.g. one of AuthTool.AUTH_PROVIDER_*) or null if default authentication method
-
setMFAMethod
public void setMFAMethod(java.lang.String method)
Set the user's MFA method- Parameters:
method
- User's MFA method
-
getMFAMethod
public java.lang.String getMFAMethod()
Get the user's MFA method (or null if the authentication provider is not the internal provider)- Returns:
- User's MFA method or null
-
setMFASettings
public void setMFASettings(java.lang.String settings)
Set the user's MFA settings- Parameters:
settings
- User's MFA settings
-
getMFASettings
public java.lang.String getMFASettings()
Get the user's MFA settings- Returns:
- User's MFA settings
-
getMFASettingsJSONObject
public org.json.JSONObject getMFASettingsJSONObject()
Get the user's MFA settings as JSON object- Returns:
- User's MFA settings as JSON object (empty JSON object if empty or unparseable settings)
-
isMFAChecked
public boolean isMFAChecked()
Is the MFA checked for user?- Returns:
- True if MAF is checked
-
setMFAChecked
public void setMFAChecked(boolean checked)
Set the MFA check status for user- Parameters:
checked
- Is the MFA checked for user?
-
isForcedChangePassword
public boolean isForcedChangePassword()
Is forced change password ?- Returns:
- true if change password is forced
-
setForcedChangePassword
public void setForcedChangePassword(boolean f)
Set forced change password- Parameters:
f
- Force change password?
-
limitLicenseRights
public void limitLicenseRights()
Allow access but with restricted rights to update the LicenseKey only
-
getDispositionName
public java.lang.String getDispositionName()
Get the disposition name (from current disposition definition or, if not yet loaded from the configured system parameter).- Returns:
- Disposition name
-
getDisposition
public Disposition getDisposition()
Get disposition- Returns:
- Disposition
-
setDisposition
public void setDisposition(Disposition d)
Set disposition- Parameters:
d
- Disposition
-
getTheme
public java.lang.String getTheme()
Get the theme name- Returns:
- Theme name
-
hasRegistration
public boolean hasRegistration()
Has registration?- Returns:
- true if a register group exists
-
getRegistrationGroups
public java.util.List<GroupDB> getRegistrationGroups()
Get the registration groups- Returns:
- List of registration groups
-
isEasyModeClearCache
@Deprecated(forRemoval=true, since="5") public boolean isEasyModeClearCache()
Deprecated, for removal: This API element is subject to removal in a future version.Check the partial clear cache flag (formerly known as "easy mode")- Returns:
- true to use partial clear cache
-
setEasyModeClearCache
@Deprecated(forRemoval=true, since="5") public void setEasyModeClearCache(boolean c)
Deprecated, for removal: This API element is subject to removal in a future version.Set the partial clear cache flag (formerly known as "easy mode")- Parameters:
c
- Partial clear cache?
-
getLocale
public java.util.Locale getLocale()
Get locale for grant- Returns:
- Locale
-
recordUsage
public void recordUsage()
Record usage (usage count and last usage date)
-
toJSONObject
public org.json.JSONObject toJSONObject()
Generates a JSON object representation of grant- Returns:
- grant as JSON object
-
toJSONObject
public org.json.JSONObject toJSONObject(boolean resps, boolean sysparams)
Generates a JSON object representation of grant- Parameters:
resps
- Add responsibilitiessysparams
- Add system parameters- Returns:
- grant as JSON object
-
toString
public java.lang.String toString()
Generates a string representation of the grant- Overrides:
toString
in classjava.lang.Object
- Returns:
- grant as string
-
toString
public java.lang.String toString(boolean resps, boolean sysparams)
Generates a string representation of the grant- Parameters:
resps
- Add responsibilitiessysparams
- Add system parameters- Returns:
- grant as string
-
-