Class EditorProfileDAO
java.lang.Object
fr.paris.lutece.portal.business.editor.EditorProfileDAO
- All Implemented Interfaces:
IEditorProfileDAO
Data access of the editor profiles. The targets of a profile (plugins, roles, workgroups) are rows of core_editor_profile_target.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nIdProfile) Deletes a profile and its targetsvoidinsert(EditorProfile profile) Inserts a profile with its targets, and sets its generated identifierload(int nIdProfile) Loads a profile with its targetsLoads the profiles with their targets, by editor, then by priority with the default profile of each editor lastintselectMaxPriority(String strEditorName) voidstore(EditorProfile profile) Updates a profile and replaces its targets.voidstorePriority(int nIdProfile, int nPriority) Updates the priority of a profile
-
Constructor Details
-
EditorProfileDAO
public EditorProfileDAO()
-
-
Method Details
-
insert
Inserts a profile with its targets, and sets its generated identifier- Specified by:
insertin interfaceIEditorProfileDAO- Parameters:
profile- the profile
-
store
Updates a profile and replaces its targets. Its editor is not changed.- Specified by:
storein interfaceIEditorProfileDAO- Parameters:
profile- the profile
-
delete
public void delete(int nIdProfile) Deletes a profile and its targets- Specified by:
deletein interfaceIEditorProfileDAO- Parameters:
nIdProfile- the identifier of the profile
-
load
Loads a profile with its targets- Specified by:
loadin interfaceIEditorProfileDAO- Parameters:
nIdProfile- the identifier of the profile- Returns:
- the profile, null if it does not exist
-
selectAll
Loads the profiles with their targets, by editor, then by priority with the default profile of each editor last- Specified by:
selectAllin interfaceIEditorProfileDAO- Returns:
- the profiles
-
storePriority
public void storePriority(int nIdProfile, int nPriority) Updates the priority of a profile- Specified by:
storePriorityin interfaceIEditorProfileDAO- Parameters:
nIdProfile- the identifier of the profilenPriority- the priority
-
selectMaxPriority
- Specified by:
selectMaxPriorityin interfaceIEditorProfileDAO- Parameters:
strEditorName- the name of an editor- Returns:
- the highest priority of the profiles of the editor, 0 when there are none
-