Class EditorProfileDAO

java.lang.Object
fr.paris.lutece.portal.business.editor.EditorProfileDAO
All Implemented Interfaces:
IEditorProfileDAO

@ApplicationScoped public final class EditorProfileDAO extends Object implements IEditorProfileDAO
Data access of the editor profiles. The targets of a profile (plugins, roles, workgroups) are rows of core_editor_profile_target.
  • Constructor Details

    • EditorProfileDAO

      public EditorProfileDAO()
  • Method Details

    • insert

      public void insert(EditorProfile profile)
      Inserts a profile with its targets, and sets its generated identifier
      Specified by:
      insert in interface IEditorProfileDAO
      Parameters:
      profile - the profile
    • store

      public void store(EditorProfile profile)
      Updates a profile and replaces its targets. Its editor is not changed.
      Specified by:
      store in interface IEditorProfileDAO
      Parameters:
      profile - the profile
    • delete

      public void delete(int nIdProfile)
      Deletes a profile and its targets
      Specified by:
      delete in interface IEditorProfileDAO
      Parameters:
      nIdProfile - the identifier of the profile
    • load

      public EditorProfile load(int nIdProfile)
      Loads a profile with its targets
      Specified by:
      load in interface IEditorProfileDAO
      Parameters:
      nIdProfile - the identifier of the profile
      Returns:
      the profile, null if it does not exist
    • selectAll

      public List<EditorProfile> selectAll()
      Loads the profiles with their targets, by editor, then by priority with the default profile of each editor last
      Specified by:
      selectAll in interface IEditorProfileDAO
      Returns:
      the profiles
    • storePriority

      public void storePriority(int nIdProfile, int nPriority)
      Updates the priority of a profile
      Specified by:
      storePriority in interface IEditorProfileDAO
      Parameters:
      nIdProfile - the identifier of the profile
      nPriority - the priority
    • selectMaxPriority

      public int selectMaxPriority(String strEditorName)
      Specified by:
      selectMaxPriority in interface IEditorProfileDAO
      Parameters:
      strEditorName - the name of an editor
      Returns:
      the highest priority of the profiles of the editor, 0 when there are none