Class EditorProfile

java.lang.Object
fr.paris.lutece.portal.business.editor.EditorProfile
All Implemented Interfaces:
Serializable

public class EditorProfile extends Object implements 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 Details

    • EMPTY_CONFIG

      public static final String 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

      public String getName()
      Returns:
      the name
    • setName

      public void setName(String strName)
      Parameters:
      strName - the name
    • getDescription

      public String getDescription()
      Returns:
      the description
    • setDescription

      public void setDescription(String strDescription)
      Parameters:
      strDescription - the description
    • getEditorName

      public String getEditorName()
      Returns:
      the name of the editor (core_text_editor) the profile belongs to. It is set at the creation and never changed.
    • setEditorName

      public void setEditorName(String strEditorName)
      Parameters:
      strEditorName - the name of the editor
    • getConfig

      public String 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

      public void setConfig(String strConfig)
      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

      public List<String> getPlugins()
      Returns:
      the names of the plugins whose templates use the profile (core for the templates of the core)
    • setPlugins

      public void setPlugins(List<String> listPlugins)
      Parameters:
      listPlugins - the names of the plugins
    • getRoles

      public List<String> getRoles()
      Returns:
      the keys of the roles, one of which the user must hold, empty for any user
    • setRoles

      public void setRoles(List<String> listRoles)
      Parameters:
      listRoles - the keys of the roles
    • getWorkgroups

      public List<String> getWorkgroups()
      Returns:
      the keys of the workgroups, one of which the user must belong to, empty for any user
    • setWorkgroups

      public void setWorkgroups(List<String> listWorkgroups)
      Parameters:
      listWorkgroups - the keys of the workgroups