Class EditorProfile
java.lang.Object
fr.paris.lutece.portal.business.editor.EditorProfile
- All Implemented Interfaces:
Serializable
A profile of a back office rich text editor: the configuration of the editor in the templates of some plugins, optionally only for the users holding
some roles or belonging to some workgroups. The profiles of an editor apply while it is the editor of the back office; its default profile applies when
no other of its profiles matches.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe configuration of a profile that changes nothing -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetId()getName()intgetRoles()booleanvoidvoidsetDefault(boolean bDefault) voidsetDescription(String strDescription) voidsetEditorName(String strEditorName) voidsetId(int nId) voidvoidsetPlugins(List<String> listPlugins) voidsetPriority(int nPriority) voidvoidsetWorkgroups(List<String> listWorkgroups)
-
Field Details
-
EMPTY_CONFIG
The configuration of a profile that changes nothing- See Also:
-
-
Constructor Details
-
EditorProfile
public EditorProfile()
-
-
Method Details
-
getId
public int getId()- Returns:
- the identifier
-
setId
public void setId(int nId) - Parameters:
nId- the identifier
-
getName
- Returns:
- the name
-
setName
- Parameters:
strName- the name
-
getDescription
- Returns:
- the description
-
setDescription
- Parameters:
strDescription- the description
-
getEditorName
- Returns:
- the name of the editor (core_text_editor) the profile belongs to. It is set at the creation and never changed.
-
setEditorName
- Parameters:
strEditorName- the name of the editor
-
getConfig
- Returns:
- the configuration of the editor: a JSON object whose options replace the ones of the editor template and of the calling template
-
setConfig
- Parameters:
strConfig- the configuration, a JSON object
-
getPriority
public int getPriority()- Returns:
- the priority among the profiles of the editor: the matching profile of lowest priority applies
-
setPriority
public void setPriority(int nPriority) - Parameters:
nPriority- the priority
-
isDefault
public boolean isDefault()- Returns:
- true for the default profile of the editor, which can be modified but not removed, and has no target
-
setDefault
public void setDefault(boolean bDefault) - Parameters:
bDefault- true for the default profile
-
getPlugins
- Returns:
- the names of the plugins whose templates use the profile (core for the templates of the core)
-
setPlugins
- Parameters:
listPlugins- the names of the plugins
-
getRoles
- Returns:
- the keys of the roles, one of which the user must hold, empty for any user
-
setRoles
- Parameters:
listRoles- the keys of the roles
-
getWorkgroups
- Returns:
- the keys of the workgroups, one of which the user must belong to, empty for any user
-
setWorkgroups
- Parameters:
listWorkgroups- the keys of the workgroups
-