Class GrantCore

  • All Implemented Interfaces:
    CacheInterface, java.io.Serializable
    Direct Known Subclasses:
    Grant

    public abstract class GrantCore
    extends java.lang.Object
    implements java.io.Serializable, CacheInterface
    Core user rights
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      GrantCore()  
    • Method Summary

      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 object
      boolean accessCreate​(java.lang.String obj)
      Check if the creation is granted to the user
      boolean accessDelete​(java.lang.String obj)
      Check if deletion is granted to the user
      boolean accessDomain​(java.lang.String domain)
      Check if the domain is granted to the user
      java.util.List<java.lang.String> accessIndexedObjects()
      List of accessible objects with fulltext index
      boolean accessNew​(java.lang.String obj)
      Deprecated. 
      boolean accessObject​(java.lang.String obj)
      Check if the object is granted to the user
      boolean accessProcess​(java.lang.String process)
      Check if the process is granted to the user
      boolean accessShortcut​(java.lang.String name)  
      boolean accessUpdate​(java.lang.String obj)
      Check if update is granted to the user
      boolean accessWebZone​(java.lang.String zone, int order, java.lang.String lang)  
      void addAccessCreate​(java.lang.String obj)
      Grant the object creation to the user
      void addAccessDelete​(java.lang.String obj)
      Grant the object deletion to the user
      void addAccessNew​(java.lang.String obj)
      Deprecated. 
      void addAccessObject​(java.lang.String obj)
      Grant the right to read/open the object
      void addAccessProcess​(java.lang.String process)
      Grant the right to read/open the process
      void addAccessRead​(java.lang.String obj)
      Alias to addAccessObject
      void addAccessUpdate​(java.lang.String obj)
      Grant the object update to the user
      void addHomePage​(java.lang.String viewName)  
      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.
      void addPredefinedSearch​(java.lang.String object, PredefinedSearch ps)
      Add a predefined searche to object
      void addResource​(Resource res, java.lang.String objectClass, java.lang.String objId)
      Add a resource
      void addSharedScript​(SharedScript scr)
      Add a server script
      void addText​(java.lang.String code, java.lang.String value)
      Add a translated text
      boolean[] changeAccess​(java.lang.String obj, boolean[] crud)
      Change the Create/Read/Update/Delete access to object
      boolean[] changeAccess​(java.lang.String obj, boolean create, boolean read, boolean update, boolean delete)
      Change the Create/Read/Update/Delete access to object
      boolean checkPwd​(java.lang.String password)
      Check current user password
      void clearTreeViews()  
      void delAccessCreate​(java.lang.String obj)
      Revoke the object creation to the user
      void delAccessDelete​(java.lang.String obj)
      Revoke the object deletion to the user
      void delAccessNew​(java.lang.String obj)
      Deprecated. 
      void delAccessObject​(java.lang.String obj)
      Revoke the right to read/open the object
      void delAccessProcess​(java.lang.String process)
      Revoke the right to read/open the process
      void delAccessRead​(java.lang.String obj)
      Alias to delAccessObject
      void delAccessUpdate​(java.lang.String obj)
      Revoke the object update to the user
      void disableAction​(java.lang.String obj, java.lang.String action)
      Disable one action on a given object
      void enableAction​(java.lang.String obj, java.lang.String action)
      Enable one action on a given object
      void enableGC​(boolean enabled)
      Not used : System full GC is managed after the expiration of user session
      java.lang.Object evalExpression​(java.lang.String expr)
      Prepare and evaluate an expression (see prepareExpression 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 (see prepareExpression for details on tokens)
      java.lang.String evalExpressionAsString​(java.lang.String expr)
      Prepare and evaluate an expression as a String (see prepareExpression for details on tokens)
      java.lang.String evalURLExpression​(java.lang.String url)
      Prepare and evaluate an URL expression (see prepareExpression for details on tokens)
      boolean garbageCollection()
      Not used : System full GC is managed after the expiration of user session
      Action getAction​(java.lang.String obj, java.lang.String name)
      Get a specific action of one object
      java.util.List<Action> getActions​(java.lang.String obj)
      Get all specific actions of one object
      java.util.List<Action> getActions​(java.lang.String obj, java.lang.String startsWith)
      Get all actions of one object
      int getAuthMethod()
      Get the authentication method
      java.lang.String getAuthProvider()
      Get the authentication provider name
      java.lang.String getAuthToken()
      Get the user authentication token
      long getAuthTokenExpiry()
      Get the user authentication token expiry time
      java.lang.String getBeanDir()
      Deprecated.
      Use getSrcDir
      java.lang.String getBinDir()
      Get binary directory
      boolean 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 boolean
      java.lang.String getCacheDir()
      Get document cache directory
      java.lang.String getCacheKey​(Grant g)
      Get grant unique cache key
      java.lang.String getClassesDir()
      Get base directory for classes
      java.lang.String getContentDir()
      Get base directory for content files
      java.util.Map<java.lang.String,​java.lang.String> getCreatable()
      Granted objects for creation
      GrantData getData()
      Get the GrantData infos
      java.lang.String getDateFormat()
      Setup the user Date format
      java.lang.String getDBPatchLevel()
      Get database patch level
      java.lang.String getDefaultPassword()
      Deprecated.
      This method should not be used anymore
      java.util.Map<java.lang.String,​java.lang.String> getDel()
      Deprecated. 
      java.util.Map<java.lang.String,​java.lang.String> getDeletable()
      Granted objects for deletion
      java.lang.String getDisposition()
      Get the disposition name (from current disposition definition or, if not yet loaded from the DISPOSITION system parameter)
      Disposition getDispositionDefinition()
      Get disposition definition
      java.lang.String getDocDir()
      Get document principal directory (dbdoc, BLOB...)
      long getDocDirMax()
      Get directory max size
      java.lang.String getDocLocalDir()
      Get document local directory
      java.util.Map<java.lang.String,​java.lang.String> getDomain()
      Granted domains
      java.util.List<MenuItem> getDomains()
      List of accessible Domains
      java.lang.String getEmail()
      Get the user email
      java.lang.String getExportDir()
      Get base directory for exported files
      java.lang.String getExternalDocsDir()
      Get base directory for external documents files
      java.lang.String getFirstName()
      Get the user first name
      boolean 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 boolean
      java.lang.String getFullName()
      Get the user full name
      GrantInterface getGrantInterface()
      Get the invocation interface for grants (Local EJB, Remote EJB, WebService, Direct)
      java.lang.String getHashAlgorithm()
      Get password hash algorithm
      java.lang.String getHashEncoding()
      Get password hash encoding
      java.lang.String getHashPassword()
      Deprecated. 
      View getHome()
      Get the current home page
      java.util.List<java.lang.String> getHomePages()
      List of granted home pages
      java.lang.String getImportDir()
      Get base directory for imported files
      java.lang.String getIndexDir()
      Get base directory for indexes
      int 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 boolean
      java.lang.String getJavadocDir()
      Get base directory for javadocs
      org.json.JSONArray getJSONArrayParameter​(java.lang.String name)
      Gets an JSON array string session system parameter as JSON array
      org.json.JSONArray getJSONArrayParameter​(java.lang.String name, java.lang.String def)
      Gets an JSON array string session system parameter as JSON array
      org.json.JSONArray getJSONArrayParameter​(java.lang.String name, org.json.JSONArray def)
      Gets an JSON array string session system parameter as JSON array
      org.json.JSONObject getJSONObjectParameter​(java.lang.String name)
      Gets an JSON object string session system parameter as JSON object
      org.json.JSONObject getJSONObjectParameter​(java.lang.String name, java.lang.String def)
      Gets an JSON object string session system parameter as JSON object
      org.json.JSONObject getJSONObjectParameter​(java.lang.String name, org.json.JSONObject def)
      Gets an JSON object string session system parameter as JSON object
      java.lang.String getLang()
      Get the user language
      java.lang.String getLastName()
      Get the user last name
      java.lang.String getLibsDir()
      Get base directory for libs
      java.util.Locale getLocale()
      Locale for grant
      java.util.Map<java.lang.String,​java.lang.String> getLocations()
      Get the path to the java classes implementing objects
      java.lang.String getLogDir()
      Get base directory for log
      AppLogEvent getLogEvent​(java.lang.String code)
      Get the log event for a given code
      java.util.concurrent.ConcurrentMap<java.lang.String,​AppLogEvent> getLogEvents()
      Get all log events
      java.lang.String getLogin()
      Get the user login
      long 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 boolean
      java.util.List<java.util.List<MenuItem>> getMap()
      Main menu
      java.util.List<MenuItem> getMapDomain​(java.lang.String domain)
      Menu items of a Domain
      java.lang.String getMavenDir()
      Get maven repository directory
      int getMaxRows()
      Get the list maximum size (for SQL search)
      long getMaxUploadSize()
      Upload limit size (in Mb)
      java.lang.String getMenuStyle()
      Get menu style
      int getMinRows()
      Get the list minimum size (for SQL search)
      java.lang.String getMobilePhoneNumber()
      Get the user mobile phone number
      java.lang.String getName()
      Related object name
      java.util.Map<java.lang.String,​java.lang.String> getNew()
      Deprecated. 
      java.util.Map<java.lang.String,​java.util.List<Action>> getObjectActions()
      Granted objects for external actions
      java.util.Map<java.lang.String,​java.util.HashMap<java.lang.String,​java.util.List<java.lang.String>>> getObjectCalculated()  
      ObjectInterface getObjectInterface()
      Get the invocation interface for objects (Local EJB, Remote EJB, WebService, Direct)
      java.lang.Object getObjectParameter​(java.lang.String name)
      Gets one object session parameter
      java.util.List<Resource> getObjectResources​(java.lang.String objectClass, java.lang.String objId)
      Get object resources
      java.util.List<java.lang.String> getObjects()
      Granted objects
      java.util.Map<java.lang.String,​java.util.List<View>> getObjectViews()
      Get the views associated with objects
      int getPanelCharMax()
      Get panels (tabs) max width in char
      java.lang.String getParameter​(java.lang.String name)
      Gets a text session parameter
      java.lang.String getParameter​(java.lang.String name, java.lang.String def)
      Gets a text session parameter
      java.lang.String getParameterId​(java.lang.String code)  
      java.util.HashMap<java.lang.String,​java.io.Serializable> getParameters()
      Get all parameters as map
      java.lang.String getPassword()
      Get the user password
      DocumentDB getPicture()
      Get the user picture document
      java.lang.String getPoweredBy()
      Get the powered by system parameter
      java.util.Map<java.lang.String,​java.util.List<PredefinedSearch>> getPredefinedSearch()
      Get all predefined searches
      java.util.List<PredefinedSearch> getPredefinedSearch​(java.lang.String object)
      Get predefined searches of object
      java.util.Map<java.lang.String,​java.lang.String> getProcess()
      Get the granted processes
      ProcessusInterface getProcessInterface()
      Get the invocation interface for processes (Local EJB, Remote EJB, WebService, Direct)
      java.lang.String getProjectDir()
      Get project directory
      int getRailway()
      Get the railway size to display in the navigation bar
      static java.lang.String getRandomPassword​(int length)
      Get random password
      java.lang.String getRecycleBinDir()
      Get document recycle bin directory
      java.util.List<GroupDB> getRegistrationGroups()
      Get the register groups
      Resource getResource​(java.lang.String type, java.lang.String code)
      Get a disposition resource for specified code and type
      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
      Resource getResourceById​(java.lang.String resId)
      Get a resource for specified resource ID
      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
      java.util.Map<java.lang.String,​Resource> getResources()
      Get all resources
      java.util.Map<java.lang.String,​GroupDB> getResp()
      Get all groups granted in the user session
      java.lang.String getRespList()
      Get all groups granted in the user session in a text format (separated with comma)
      SharedScript getScriptById​(java.lang.String scrId)
      Get a script for specified script ID
      ScriptInterpreter getScriptInterpreter()
      Get script interpreter for the user session
      java.lang.String getScriptInterpreterEngineName()
      Get script interpreter engine name
      java.lang.String getSessionId()
      Get the user SessionId
      SharedScript getSharedScript​(java.lang.String name)
      Get a script for specified code
      Shortcut getShortcut​(java.lang.String name)  
      java.util.List<Shortcut> getShortcuts()
      Get all user shortcuts
      View getSimpleView​(java.lang.String name)
      Standalone view
      java.util.Map<java.lang.String,​View> getSimpleViews()
      All standalone views
      java.lang.String getSrcDir()
      Get source directory
      int getStatus()
      Get the user status
      java.lang.String getSubPackage()
      Get subpackage of specific classes
      java.util.HashMap<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 T
      java.lang.String getTheme()
      Get the theme name from system parameters (default, dark, light)
      java.lang.String getTmpDir()
      Get base directory for temporary work
      TreeView getTreeView​(java.lang.String name)
      Get a tree view
      java.util.Map<java.lang.String,​TreeView> getTreeViews()  
      java.util.List<TreeView> getTreeViewsOfObject​(java.lang.String name, boolean root)
      Get treeviews with a given object in hierarchy
      java.util.Map<java.lang.String,​java.lang.String> getUpdatable()
      Granted objects for update
      int getUserId()
      Get the user unique ID as integer
      java.lang.String getUserModuleId()
      Get the user Module ID
      java.lang.String getUserUniqueId()
      Get the user unique ID as string
      java.lang.String getVersion()
      Get the version system parameter
      java.util.Map<java.lang.String,​java.util.List<ObjectVisibility>> getVisibilities()
      Get object all visibilities
      java.util.List<ObjectVisibility> getVisibility​(java.lang.String object, char type)
      Get the object's standard access visibilities
      java.util.List<ObjectVisibility> getVisibility​(java.lang.String object, java.lang.String action)
      Get object ACTION visibilities
      WebZone getWebZone​(java.lang.String zone, int order, java.lang.String lang)  
      WebZone getWebZone​(java.lang.String zone, java.lang.String name, java.lang.String lang)  
      java.util.List<WebZone> getWebZones()
      Get all user web zones
      java.util.List<WebZone> getWebZones​(java.lang.String zone)  
      java.lang.String getWindowTitle()
      Get the window title
      boolean hasParameter​(java.lang.String name)
      Check if a text session parameter is set
      boolean hasRegistration()  
      boolean hasResponsability​(java.lang.String grp)
      Deprecated. 
      boolean hasResponsibility​(java.lang.String group)
      Check if the user has one responsibility
      boolean isAboutEnable()
      Is about info enabled ? Forced for admin profiles
      boolean isAPIInterfaceEnable()
      Is the API interface enabled?
      boolean isCompletionEnable()
      Is the completion feature enabled?
      boolean isConvertWildcards()
      Type of search wildcards (% and _ if SQL type, * and ? otherwise
      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()
      Checks the EASYMODE_CLEARCACHE flag
      boolean isForcedChangePassword()
      Is forced change password ?
      boolean isGITInterfaceEnable()
      Is the Git interface enabled?
      boolean isHtmlEditorEnable()
      Is the HTML editor enabled ?
      boolean isInternalOAuth2AuthMethod()
      Is the authentication method OAuth2?
      boolean isIOInterfaceEnable()
      Is the I/O interface enabled?
      boolean isJavaImplemented()
      Hooks implemented in Java ?
      boolean isLDAPAuthMethod()
      Is the authentication method LDAP?
      boolean isLoaded()
      Checks if grants are loaded
      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 session
      void limitLicenseRights()
      Allow access but with restricted rights to update the LicenseKey only
      boolean logDebug()
      Log the debug events ? SYSTEM:LOG_DEBUG=yes
      boolean logDocument()
      Log the document events ? SYSTEM:LOG_DOCUMENT=yes
      boolean logError()
      Log the error events ? SYSTEM:LOG_ERROR=yes
      boolean logFatal()
      Log the fatal events ? SYSTEM:LOG_FATAL=yes
      boolean logInfo()
      Log the info events ? SYSTEM:LOG_INFO=yes
      boolean logObject()
      Log the object events ? SYSTEM:LOG_OBJECT=yes
      boolean logSession()
      Log the session login/logout ? SYSTEM:LOG_SESSION=yes
      boolean logWarning()
      Log the warn events ? SYSTEM:LOG_WARN=yes
      void newData()
      New empty GrantData
      java.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 removeAccessCreate​(java.lang.String obj)
      Alias to delAccessCreate
      void removeAccessDelete​(java.lang.String obj)
      Alias to delAccessDelete
      void removeAccessObject​(java.lang.String obj)
      Alias to delAccessObject
      void removeAccessRead​(java.lang.String obj)
      Alias to delAccessObject
      void removeAccessUpdate​(java.lang.String obj)
      Alias to delAccessUpdate
      java.io.Serializable removeParameter​(java.lang.String name)
      Remove a session system parameter
      void removeResources()
      Remove all resources
      void removeResources​(java.lang.String objectClass, java.lang.String objId, boolean clearCache)
      Remove resources
      void removeSharedScript​(java.lang.String code)
      Remove a script
      void removeSharedScripts()
      Remove all scripts
      void setAbout​(boolean b)
      Set whether about info is enable
      void setAPIInterface​(boolean b)
      Set whether the API interface is enabled
      void setAuthToken​(java.lang.String t)
      Set the user authentication token
      void setAuthTokenExpiry​(long t)
      Set the user authentication token
      void setBeanDir​(java.lang.String dir)
      Deprecated.
      Use setSrcDir
      void setBinDir​(java.lang.String dir)
      Set binary directory
      void setCacheDir​(java.lang.String dir)
      Set document cache directory
      void setClassesDir​(java.lang.String dir)
      Set base directory for classes
      void setCompletion​(boolean b)
      Set whether the completion feature is enabled
      void setContentDir​(java.lang.String dir)
      Set base directory for content files
      void setConvertWildcards​(boolean b)  
      void setData​(GrantData d)
      Set the GrantData infos
      void setDateFormat​(java.lang.String df)
      Set the user Date format
      void setDispositionDefinition​(Disposition d)
      Set disposition definition
      void setDocDir​(java.lang.String dir)
      Set document principal directory (dbdoc, BLOB...)
      void setDocDirMax​(long n)
      Set directory max size
      void setDocLocalDir​(java.lang.String dir)
      Set document local directory
      void setEasyModeClearCache​(boolean easyModeClearCache)  
      void setEmail​(java.lang.String email)
      Set the user email
      void setExportDir​(java.lang.String dir)
      Set base directory for exported files
      void setExternalDocsDir​(java.lang.String dir)
      Set base directory for external documents files
      void setFirstName​(java.lang.String firstname)
      Set the user first name
      void setFlagParameter​(java.lang.String name, boolean value)
      Sets a yes/no flag session system parameter
      void setForcedChangePassword​(boolean f)
      Set forced change password
      void setGITInterface​(boolean b)
      Set whether the Git interface is enabled
      void setHashAlgorithm​(java.lang.String p)
      Set password hash algorithm
      void setHashEncoding​(java.lang.String p)
      Set password hash encoding
      void setHashPassword​(java.lang.String p)
      Deprecated. 
      void setHome​(View h)
      Set the current home page
      void setHtmlEditor​(boolean b)
      Set whether the HTML editor is enabled
      void setImportDir​(java.lang.String dir)
      Set base directory for imported files
      void setIndexDir​(java.lang.String dir)
      Set base directory for indexes
      void setInterfaces​(Globals.InterfaceType interfaceType)
      Set the invocation interfaces (Local EJB, Remote EJB, WebService, Direct)
      void setInterfaces​(GrantInterface g, ObjectInterface o, ProcessusInterface p)
      Set the invocation interfaces (Local EJB, Remote EJB, WebService, Direct)
      void setIOInterface​(boolean b)
      Set whether the I/O interface is enabled
      void setJavadocDir​(java.lang.String dir)
      Set base directory for javadocs
      void setLang​(java.lang.String lang)
      Set the user language to display the GUI
      void setLastName​(java.lang.String lastname)
      Set the user last name
      void setLibsDir​(java.lang.String dir)
      Set base directory for libs
      void setLogDebug​(boolean b)  
      void setLogDir​(java.lang.String dir)
      Set base directory for log
      void setLogDocument​(boolean b)  
      void setLogError​(boolean b)  
      void setLogFatal​(boolean b)  
      void setLogin​(java.lang.String l)
      Set the user login
      void setLogInfo​(boolean b)  
      void setLogObject​(boolean b)  
      void setLogSession​(boolean b)  
      void setLogWarning​(boolean b)  
      void setMavenDir​(java.lang.String dir)
      Set maven repository directory
      void setMaxRows​(int p)
      Set the list maximum size (for SQL search)
      void setMaxUploadSize​(long s)
      Set upload size limit (in Mb)
      void setMinRows​(int p)
      Set the list minimum size (for SQL search)
      void setMobilePhoneNumber​(java.lang.String num)
      Set the user mobile phone number
      void setPanelCharMax​(int n)
      Set panels (tabs) max width in char
      void setPanelFilter​(boolean b)
      Set display the panel filter
      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)
      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 p)
      Set the user password
      void setPicture​(DocumentDB i)
      Set the user picture document
      void setProjectDir​(java.lang.String dir)
      Set project directory
      void setRailway​(int p)
      Set the railway size to display in the navigation bar
      void setRecycleBinDir​(java.lang.String dir)
      Set document recycle bin directory
      void setRespList​(java.lang.String s)  
      void setSessionId​(java.lang.String id)
      Store the user SessionId
      void setShortcuts​(java.util.List<Shortcut> v)  
      void setShowNavigator​(boolean p)
      Set whether the user needs the navigation bar
      void setSrcDir​(java.lang.String dir)
      Set source directory
      void setStatus​(int status)
      Set the user status
      void setSubPackage​(java.lang.String sp)
      Set subpackage of specific classes
      void setTmpDir​(java.lang.String dir)
      Set base directory for temporary work
      void setTreeView​(java.lang.String name, TreeView treeview)  
      void setUserId​(int id)
      Set the user unique ID (row_id from m_user) from integer
      void setUserId​(java.lang.String id)
      Deprecated.
      Use setUserUniqueId instead
      void setUserModuleId​(java.lang.String id)
      Set the user Module ID
      void setUserUniqueId​(java.lang.String id)
      Set the user unique ID (row_id from m_user) from string
      void setWebZones​(java.util.List<WebZone> v)  
      void setWindowTitle​(java.lang.String p)
      Set the window titel
      boolean 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 default
      java.lang.String toFormattedBoolean​(java.lang.String serviceBoolean)
      Convert a service boolean to a formatted boolean
      java.lang.String toFormattedDate​(java.lang.String serviceDate)
      Convert a service date to a formatted date
      java.lang.String toFormattedDatetime​(java.lang.String serviceDatetime)
      Convert a service date time to a formatted date time
      java.lang.String toFormattedFloat​(java.lang.String serviceFloat, int size, int precision)
      Convert a service float to a formatted float
      java.lang.String toFormattedFloat​(java.math.BigDecimal serviceFloat, int size, int precision)
      Convert a service float to a formatted float
      java.lang.String toFormattedTime​(java.lang.String serviceTime)
      Convert a service time to a formatted time
      org.json.JSONObject toJSONObject()
      Generates a JSON object representation of grant
      org.json.JSONObject toJSONObject​(boolean resps, boolean sysparams)
      Generates a JSON object representation of grant
      java.lang.String toServiceDate​(java.lang.String formattedDate)
      Convert a formatted date to a service date
      java.lang.String toServiceDatetime​(java.lang.String formattedDatetime)
      Convert a formatted date time to a service date time
      java.lang.String toServiceFloat​(java.lang.String formattedFloat)
      Convert a formatted float to a service float
      java.lang.String toServiceTime​(java.lang.String formattedTime)
      Convert a formatted time to a service time
      java.lang.String toString()
      Generates a string representation of the grant
      java.lang.String toString​(boolean resps, boolean sysparams)
      Generates a string representation of the grant
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • 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_ACTION

        public static final char FUNCTION_ACTION
        Action function
        See Also:
        Constant Field Values
      • STATUS_INACTIVE

        public static final int STATUS_INACTIVE
        Inactive status
        See Also:
        Constant Field Values
      • STATUS_WEBSERVICES

        public static final int STATUS_WEBSERVICES
        Webservices only status
        See Also:
        Constant Field Values
      • 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
      • IO_SESSION_PREFIX

        public static final java.lang.String IO_SESSION_PREFIX
        I/O pseudo-session IDs prefix
        See Also:
        Constant Field Values
    • Constructor Detail

      • GrantCore

        public GrantCore()
    • Method Detail

      • getData

        public GrantData getData()
        Get the GrantData infos
      • setData

        public void setData​(GrantData d)
        Set the GrantData infos
      • newData

        public void newData()
        New empty GrantData
      • setInterfaces

        public void setInterfaces​(Globals.InterfaceType interfaceType)
        Set the invocation interfaces (Local EJB, Remote EJB, WebService, Direct)
        Parameters:
        interfaceType - Interface type
      • getObjectInterface

        public ObjectInterface getObjectInterface()
        Get the invocation interface for objects (Local EJB, Remote EJB, WebService, Direct)
      • getGrantInterface

        public 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
      • getSessionId

        public java.lang.String getSessionId()
        Get the user SessionId
      • getScriptInterpreterEngineName

        public java.lang.String getScriptInterpreterEngineName()
        Get script interpreter engine name
      • getScriptInterpreter

        public 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 substitute
        sep - separator for String
        inlineValues - 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 (see prepareExpression 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 (see prepareExpression for details on tokens)
        Parameters:
        expr - Expression
        in - Input variables to set before script evaluation
        out - 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 (see prepareExpression for details on tokens)
        Parameters:
        url - URL
        Throws:
        ScriptException
      • evalExpressionAsString

        public java.lang.String evalExpressionAsString​(java.lang.String expr)
                                                throws ScriptException
        Prepare and evaluate an expression as a String (see prepareExpression for details on tokens)
        Parameters:
        expr - URL
        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 interface CacheInterface
        Parameters:
        g - Grant
        Returns:
        Cache key of object instance
      • enableGC

        public void enableGC​(boolean enabled)
        Not used : System full GC is managed after the expiration of user session
        Specified by:
        enableGC in interface 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 interface 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 interface CacheInterface
        Returns:
        true if something has been cleared
      • getMap

        public java.util.List<java.util.List<MenuItem>> getMap()
        Main menu
      • getMapDomain

        public java.util.List<MenuItem> getMapDomain​(java.lang.String domain)
        Menu items of a Domain
      • getDomains

        public java.util.List<MenuItem> getDomains()
        List of accessible Domains
      • getHome

        public View getHome()
        Get the current home page
      • setHome

        public void setHome​(View h)
        Set the current home page
      • getHomePages

        public java.util.List<java.lang.String> getHomePages()
        List of granted home pages
      • addHomePage

        public void addHomePage​(java.lang.String viewName)
      • getObjectViews

        public java.util.Map<java.lang.String,​java.util.List<View>> getObjectViews()
        Get the views associated with objects
      • getSimpleView

        public View getSimpleView​(java.lang.String name)
        Standalone view
      • getSimpleViews

        public java.util.Map<java.lang.String,​View> getSimpleViews()
        All standalone views
      • getDomain

        public java.util.Map<java.lang.String,​java.lang.String> getDomain()
        Granted domains
      • getObjects

        public java.util.List<java.lang.String> getObjects()
        Granted objects
      • getLocations

        public java.util.Map<java.lang.String,​java.lang.String> getLocations()
        Get the path to the java classes implementing objects
      • getNew

        @Deprecated
        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()
        Granted objects for creation
      • getUpdatable

        public java.util.Map<java.lang.String,​java.lang.String> getUpdatable()
        Granted objects for update
      • getDel

        @Deprecated
        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()
        Granted objects for deletion
      • getObjectActions

        public java.util.Map<java.lang.String,​java.util.List<Action>> getObjectActions()
        Granted objects for external actions
      • getLogin

        public java.lang.String getLogin()
        Get the user login
      • setLogin

        public void setLogin​(java.lang.String l)
        Set the user login
      • getPassword

        public java.lang.String getPassword()
        Get the user password
      • setPassword

        public void setPassword​(java.lang.String p)
        Set the user password
      • getAuthToken

        public java.lang.String getAuthToken()
        Get the user authentication token
      • setAuthToken

        public void setAuthToken​(java.lang.String t)
        Set the user authentication token
      • getAuthTokenExpiry

        public long getAuthTokenExpiry()
        Get the user authentication token expiry time
      • setAuthTokenExpiry

        public void setAuthTokenExpiry​(long t)
        Set the user authentication token
      • getDefaultPassword

        @Deprecated
        public java.lang.String getDefaultPassword()
        Deprecated.
        This method should not be used anymore
      • getRandomPassword

        public static java.lang.String getRandomPassword​(int length)
        Get random password
      • setUserId

        @Deprecated
        public void setUserId​(java.lang.String id)
        Deprecated.
        Use setUserUniqueId instead
      • 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 language to display the GUI
      • getLang

        public java.lang.String getLang()
        Get the user language
      • 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 p)
        Set the list minimum size (for SQL search)
      • getMinRows

        public int getMinRows()
        Get the list minimum size (for SQL search)
      • setMaxRows

        public void setMaxRows​(int p)
        Set the list maximum size (for SQL search)
      • getMaxRows

        public int getMaxRows()
        Get the list maximum size (for SQL search)
      • 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)
      • setFirstName

        public void setFirstName​(java.lang.String firstname)
        Set the user first name
      • getFirstName

        public java.lang.String getFirstName()
        Get the user first name
      • setLastName

        public void setLastName​(java.lang.String lastname)
        Set the user last name
      • getLastName

        public java.lang.String getLastName()
        Get the user last name
      • getFullName

        public java.lang.String getFullName()
        Get the user full name
      • setEmail

        public void setEmail​(java.lang.String email)
        Set the user email
      • getEmail

        public java.lang.String getEmail()
        Get the user email
      • setMobilePhoneNumber

        public void setMobilePhoneNumber​(java.lang.String num)
        Set the user mobile phone number
      • getMobilePhoneNumber

        public java.lang.String getMobilePhoneNumber()
        Get the user mobile phone number
      • setPicture

        public void setPicture​(DocumentDB i)
        Set the user picture document
      • getPicture

        public DocumentDB getPicture()
        Get the user picture document
      • setStatus

        public void setStatus​(int status)
        Set the user status
      • getStatus

        public int getStatus()
        Get the user status
      • getText

        public java.util.HashMap<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 - Code
        value - text value
      • setDateFormat

        public void setDateFormat​(java.lang.String df)
        Set the user Date format
      • getDateFormat

        public java.lang.String getDateFormat()
        Setup the user Date format
      • 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.HashMap<java.lang.String,​java.io.Serializable> getParameters()
        Get all parameters as map
      • hasParameter

        public boolean hasParameter​(java.lang.String name)
        Check if a text session parameter is set
        Parameters:
        name - Parameter name
      • 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 name
        def - 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
      • 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 name
        def - 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 name
        def - 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 name
        def - 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
      • 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 name
        def - 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 name
        def - 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
      • 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 name
        def - 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 name
        def - 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 name
        value - 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 name
        obj - 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 name
        value - Value (boolean value translated into "yes" or "no")
      • getParameterId

        public java.lang.String getParameterId​(java.lang.String code)
      • 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?
      • isPublic

        public boolean isPublic()
        Is public user?
      • isSystem

        public boolean isSystem()
        Is system user?
      • isSystemAdmin

        public boolean isSystemAdmin()
        Is system user (alias to isSystem)?
      • hasResponsability

        @Deprecated
        public final boolean hasResponsability​(java.lang.String grp)
        Deprecated.
        Use hasResponsibility
      • 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 name
        startsWith - 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 name
        name - 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
      • addPredefinedSearch

        public void addPredefinedSearch​(java.lang.String object,
                                        PredefinedSearch ps)
        Add a predefined searche to object
        Parameters:
        object - Object name
        ps - Predefined search
      • getScriptById

        public SharedScript getScriptById​(java.lang.String scrId)
        Get a script for specified script ID
        Parameters:
        scrId - Resource ID
      • getSharedScript

        public SharedScript getSharedScript​(java.lang.String name)
        Get a script for specified code
        Parameters:
        name - Script name
      • addSharedScript

        public void addSharedScript​(SharedScript scr)
        Add a server script
        Parameters:
        scr - Script
      • removeSharedScript

        public void removeSharedScript​(java.lang.String code)
        Remove a script
      • removeSharedScripts

        public void removeSharedScripts()
        Remove all scripts
      • getResourceById

        public Resource getResourceById​(java.lang.String resId)
        Get a resource for specified resource ID
        Parameters:
        resId - Resource ID
      • getResource

        public Resource getResource​(java.lang.String type,
                                    java.lang.String code)
        Get a disposition resource for specified code and type
        Parameters:
        type - Resource type
        code - 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
        code - Resource code
        objectClass - Target object class name (ObjectInternal, ObjectExternal, ... or null for Disposition)
        objId - Object Id (null for Disposition)
        Returns:
        resource or null if not exists
      • getResources

        public java.util.Map<java.lang.String,​Resource> getResources()
        Get all 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)
      • 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 type
        objectClass - 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)
        Add a resource
        Parameters:
        res - Resource
        objectClass - Target object type name (ObjectInternal, ObjectExternal, ... or null for Disposition)
        objId - Object Id (null for Disposition)
      • 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 name
        root - 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)
      • getTreeViews

        public java.util.Map<java.lang.String,​TreeView> getTreeViews()
      • clearTreeViews

        public void clearTreeViews()
      • getShortcuts

        public java.util.List<Shortcut> getShortcuts()
        Get all user shortcuts
        Returns:
        List of shortcuts
      • setShortcuts

        public void setShortcuts​(java.util.List<Shortcut> v)
      • getShortcut

        public Shortcut getShortcut​(java.lang.String name)
      • accessShortcut

        public boolean accessShortcut​(java.lang.String name)
      • getWebZones

        public java.util.List<WebZone> getWebZones()
        Get all user web zones
        Returns:
        List of web zones
      • setWebZones

        public void setWebZones​(java.util.List<WebZone> v)
      • getWebZones

        public java.util.List<WebZone> getWebZones​(java.lang.String zone)
      • getWebZone

        public WebZone getWebZone​(java.lang.String zone,
                                  java.lang.String name,
                                  java.lang.String lang)
      • getWebZone

        public WebZone getWebZone​(java.lang.String zone,
                                  int order,
                                  java.lang.String lang)
      • accessWebZone

        public boolean accessWebZone​(java.lang.String zone,
                                     int order,
                                     java.lang.String lang)
      • accessDomain

        public boolean accessDomain​(java.lang.String domain)
        Check 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
      • accessIndexedObjects

        public java.util.List<java.lang.String> accessIndexedObjects()
        List of accessible objects with fulltext index
      • 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 name
        action - Action name
      • enableAction

        public void enableAction​(java.lang.String obj,
                                 java.lang.String action)
        Enable one action on a given object
        Parameters:
        obj - Object name
        action - Action name
      • disableAction

        public void disableAction​(java.lang.String obj,
                                  java.lang.String action)
        Disable one action on a given object
        Parameters:
        obj - Object name
        action - Action name
      • accessNew

        @Deprecated
        public final boolean accessNew​(java.lang.String obj)
        Deprecated.
        Use accessCreate
      • accessCreate

        public boolean accessCreate​(java.lang.String obj)
        Check if the creation is granted to the user
        Parameters:
        obj - Object name
      • addAccessNew

        @Deprecated
        public final void addAccessNew​(java.lang.String obj)
        Deprecated.
        Use addAccessCreate
      • addAccessCreate

        public void addAccessCreate​(java.lang.String obj)
        Grant the object creation to the user
        Parameters:
        obj - Object name
      • delAccessNew

        @Deprecated
        public final void delAccessNew​(java.lang.String obj)
        Deprecated.
        Use delAccessCreate
      • 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 name
        create - 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 name
        crud - 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 name
        type - 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 name
        action - External action name
        Returns:
        List of visibilities or null
      • logSession

        public boolean logSession()
        Log the session login/logout ? SYSTEM:LOG_SESSION=yes
      • setLogSession

        public void setLogSession​(boolean b)
      • logDebug

        public boolean logDebug()
        Log the debug events ? SYSTEM:LOG_DEBUG=yes
      • setLogDebug

        public void setLogDebug​(boolean b)
      • logInfo

        public boolean logInfo()
        Log the info events ? SYSTEM:LOG_INFO=yes
      • setLogInfo

        public void setLogInfo​(boolean b)
      • logWarning

        public boolean logWarning()
        Log the warn events ? SYSTEM:LOG_WARN=yes
      • setLogWarning

        public void setLogWarning​(boolean b)
      • logError

        public boolean logError()
        Log the error events ? SYSTEM:LOG_ERROR=yes
      • setLogError

        public void setLogError​(boolean b)
      • logFatal

        public boolean logFatal()
        Log the fatal events ? SYSTEM:LOG_FATAL=yes
      • setLogFatal

        public void setLogFatal​(boolean b)
      • logObject

        public boolean logObject()
        Log the object events ? SYSTEM:LOG_OBJECT=yes
      • setLogObject

        public void setLogObject​(boolean b)
      • logDocument

        public boolean logDocument()
        Log the document events ? SYSTEM:LOG_DOCUMENT=yes
      • setLogDocument

        public void setLogDocument​(boolean b)
      • 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

        public java.lang.String getProjectDir()
        Get project directory
      • setProjectDir

        public void setProjectDir​(java.lang.String dir)
        Set project directory
      • getDocDir

        public java.lang.String getDocDir()
        Get document principal directory (dbdoc, BLOB...)
      • setDocDir

        public void setDocDir​(java.lang.String dir)
        Set document principal directory (dbdoc, BLOB...)
      • getDocLocalDir

        public java.lang.String getDocLocalDir()
        Get document local directory
      • setDocLocalDir

        public void setDocLocalDir​(java.lang.String dir)
        Set document local directory
      • getDocDirMax

        public long getDocDirMax()
        Get directory max size
      • setDocDirMax

        public void setDocDirMax​(long n)
        Set directory max size
      • getTmpDir

        public java.lang.String getTmpDir()
        Get base directory for temporary work
      • setTmpDir

        public void setTmpDir​(java.lang.String dir)
        Set base directory for temporary work
      • getContentDir

        public java.lang.String getContentDir()
        Get base directory for content files
      • setContentDir

        public void setContentDir​(java.lang.String dir)
        Set base directory for content files
      • getExternalDocsDir

        public java.lang.String getExternalDocsDir()
        Get base directory for external documents files
      • setExternalDocsDir

        public void setExternalDocsDir​(java.lang.String dir)
        Set base directory for external documents files
      • getLogDir

        public java.lang.String getLogDir()
        Get base directory for log
      • setLogDir

        public void setLogDir​(java.lang.String dir)
        Set base directory for log
      • getRecycleBinDir

        public java.lang.String getRecycleBinDir()
        Get document recycle bin directory
      • setRecycleBinDir

        public void setRecycleBinDir​(java.lang.String dir)
        Set document recycle bin directory
      • getCacheDir

        public java.lang.String getCacheDir()
        Get document cache directory
      • setCacheDir

        public void setCacheDir​(java.lang.String dir)
        Set document cache directory
      • getImportDir

        public java.lang.String getImportDir()
        Get base directory for imported files
      • setImportDir

        public void setImportDir​(java.lang.String dir)
        Set base directory for imported files
      • getExportDir

        public java.lang.String getExportDir()
        Get base directory for exported files
      • setExportDir

        public void setExportDir​(java.lang.String dir)
        Set base directory for exported files
      • getIndexDir

        public java.lang.String getIndexDir()
        Get base directory for indexes
      • setIndexDir

        public void setIndexDir​(java.lang.String dir)
        Set base directory for indexes
      • getBeanDir

        @Deprecated
        public final java.lang.String getBeanDir()
        Deprecated.
        Use getSrcDir
      • setBeanDir

        @Deprecated
        public final void setBeanDir​(java.lang.String dir)
        Deprecated.
        Use setSrcDir
      • getSrcDir

        public java.lang.String getSrcDir()
        Get source directory
      • setSrcDir

        public void setSrcDir​(java.lang.String dir)
        Set source directory
      • getBinDir

        public java.lang.String getBinDir()
        Get binary directory
      • setBinDir

        public void setBinDir​(java.lang.String dir)
        Set binary directory
      • getMavenDir

        public java.lang.String getMavenDir()
        Get maven repository directory
      • setMavenDir

        public void setMavenDir​(java.lang.String dir)
        Set maven repository directory
      • getClassesDir

        public java.lang.String getClassesDir()
        Get base directory for classes
      • setClassesDir

        public void setClassesDir​(java.lang.String dir)
        Set base directory for classes
      • getJavadocDir

        public java.lang.String getJavadocDir()
        Get base directory for javadocs
      • setJavadocDir

        public void setJavadocDir​(java.lang.String dir)
        Set base directory for javadocs
      • getLibsDir

        public java.lang.String getLibsDir()
        Get base directory for libs
      • setLibsDir

        public void setLibsDir​(java.lang.String dir)
        Set base directory for libs
      • 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
      • setAbout

        public void setAbout​(boolean b)
        Set whether about info is enable
      • getWindowTitle

        public java.lang.String getWindowTitle()
        Get the window title
      • setWindowTitle

        public void setWindowTitle​(java.lang.String p)
        Set the window titel
      • 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

        public java.lang.String getHashAlgorithm()
        Get password hash algorithm
      • setHashAlgorithm

        public void setHashAlgorithm​(java.lang.String p)
        Set password hash algorithm
      • getHashPassword

        @Deprecated
        public java.lang.String getHashPassword()
        Deprecated.
      • setHashPassword

        @Deprecated
        public void setHashPassword​(java.lang.String p)
        Deprecated.
      • getHashEncoding

        public java.lang.String getHashEncoding()
        Get password hash encoding
      • setHashEncoding

        public void setHashEncoding​(java.lang.String p)
        Set password hash encoding
      • getLogEvent

        public AppLogEvent getLogEvent​(java.lang.String code)
        Get the log event for a given code
      • getLogEvents

        public java.util.concurrent.ConcurrentMap<java.lang.String,​AppLogEvent> getLogEvents()
        Get all log events
      • isConvertWildcards

        public boolean isConvertWildcards()
        Type of search wildcards (% and _ if SQL type, * and ? otherwise
      • setConvertWildcards

        public void setConvertWildcards​(boolean b)
      • 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 name
        field - Object field link to external expression
        target - Object to refresh
        refId - Reference field
      • getObjectCalculated

        public java.util.Map<java.lang.String,​java.util.HashMap<java.lang.String,​java.util.List<java.lang.String>>> getObjectCalculated()
      • getMaxUploadSize

        public long getMaxUploadSize()
        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

        public boolean isIOInterfaceEnable()
        Is the I/O interface enabled?
      • setIOInterface

        public void setIOInterface​(boolean b)
        Set whether the I/O interface is enabled
      • isGITInterfaceEnable

        public boolean isGITInterfaceEnable()
        Is the Git interface enabled?
      • setGITInterface

        public void setGITInterface​(boolean b)
        Set whether the Git interface is enabled
      • isAPIInterfaceEnable

        public boolean isAPIInterfaceEnable()
        Is the API interface enabled?
      • setAPIInterface

        public void setAPIInterface​(boolean b)
        Set whether the API interface is enabled
      • getVersion

        public java.lang.String getVersion()
        Get the version system parameter
      • getPoweredBy

        public java.lang.String getPoweredBy()
        Get the powered by system parameter
      • getAuthMethod

        public int getAuthMethod()
        Get the authentication method
        Returns:
        One of Globals.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 Globals.AUTH_PROVIDER_*) or null if default authentication method
      • isForcedChangePassword

        public boolean isForcedChangePassword()
        Is forced change password ?
      • setForcedChangePassword

        public void setForcedChangePassword​(boolean f)
        Set forced change password
        Parameters:
        f - Force?
      • limitLicenseRights

        public void limitLicenseRights()
        Allow access but with restricted rights to update the LicenseKey only
      • getDisposition

        public java.lang.String getDisposition()
        Get the disposition name (from current disposition definition or, if not yet loaded from the DISPOSITION system parameter)
      • getDispositionDefinition

        public Disposition getDispositionDefinition()
        Get disposition definition
      • setDispositionDefinition

        public void setDispositionDefinition​(Disposition d)
        Set disposition definition
      • getTheme

        public java.lang.String getTheme()
        Get the theme name from system parameters (default, dark, light)
      • hasRegistration

        public boolean hasRegistration()
        Returns:
        true if a register group exists
      • getRegistrationGroups

        public java.util.List<GroupDB> getRegistrationGroups()
        Get the register groups
      • isEasyModeClearCache

        public boolean isEasyModeClearCache()
        Checks the EASYMODE_CLEARCACHE flag
        Returns:
        true to use the partial clear cache
      • setEasyModeClearCache

        public void setEasyModeClearCache​(boolean easyModeClearCache)
      • getLocale

        public java.util.Locale getLocale()
        Locale for grant
        Returns:
        Locale
      • 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 responsibilities
        sysparams - Add system parameters
        Returns:
        grant as JSON object
      • toString

        public java.lang.String toString()
        Generates a string representation of the grant
        Overrides:
        toString in class java.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 responsibilities
        sysparams - Add system parameters
        Returns:
        grant as string