Package org.ametys.core.group
Class GroupDirectoryDAO
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.group.GroupDirectoryDAO
-
- All Implemented Interfaces:
LogEnabled,Disposable,Initializable,Component,Serviceable
public class GroupDirectoryDAO extends AbstractLogEnabled implements Component, Initializable, Serviceable, Disposable
DAO for accessingGroupDirectory
-
-
Constructor Summary
Constructors Constructor Description GroupDirectoryDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>add(String id, String label, String modelId, Map<String,String> params)Adds a new group directoryvoiddispose()Map<String,Object>edit(String id, String label, String modelId, Map<String,String> params)Edits the given group directoryMap<String,Object>getEditionConfiguration()Gets the configuration for creating/editing a group directory.List<GroupDirectory>getGroupDirectories()Gets all the group directories of this applicationList<Object>getGroupDirectories2Json()Gets all the group directories to JSON formatSet<String>getGroupDirectoriesIds()Gets the list of the ids of all the group directories of the applicationGroupDirectorygetGroupDirectory(String id)Gets a group directory by its id.Map<String,Object>getGroupDirectory2Json(GroupDirectory groupDirectory)gets a group directory to JSON formatMap<String,Object>getGroupDirectoryParameterValues(String id)Gets the values of the parameters of the given group directoryvoidinitialize()Map<String,Object>remove(String id)Removes the given group directoryvoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
GroupDirectoryDAO
public GroupDirectoryDAO()
-
-
Method Detail
-
initialize
public void initialize()
- Specified by:
initializein interfaceInitializable
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getGroupDirectories2Json
public List<Object> getGroupDirectories2Json()
Gets all the group directories to JSON format- Returns:
- A list of object representing the
GroupDirectories
-
getGroupDirectory2Json
public Map<String,Object> getGroupDirectory2Json(GroupDirectory groupDirectory)
gets a group directory to JSON format- Parameters:
groupDirectory- The group directory to get- Returns:
- An object representing a
GroupDirectory
-
getGroupDirectories
public List<GroupDirectory> getGroupDirectories()
Gets all the group directories of this application- Returns:
- A list of
GroupDirectories
-
getGroupDirectory
public GroupDirectory getGroupDirectory(String id)
Gets a group directory by its id.- Parameters:
id- The id of the group directory- Returns:
- The
GroupDirectory, or null if not found
-
getGroupDirectoriesIds
public Set<String> getGroupDirectoriesIds()
Gets the list of the ids of all the group directories of the application- Returns:
- The list of the ids of all the group directories
-
getEditionConfiguration
public Map<String,Object> getEditionConfiguration() throws Exception
Gets the configuration for creating/editing a group directory.- Returns:
- A map containing information about what is needed to create/edit a group directory
- Throws:
Exception- If an error occurs.
-
getGroupDirectoryParameterValues
public Map<String,Object> getGroupDirectoryParameterValues(String id)
Gets the values of the parameters of the given group directory- Parameters:
id- The id of the group directory- Returns:
- The values of the parameters
-
add
public Map<String,Object> add(String id, String label, String modelId, Map<String,String> params)
Adds a new group directory- Parameters:
id- The unique id of the group directorylabel- The label of the group directorymodelId- The id of the group directory modelparams- The parameters of the group directory- Returns:
- A map containing the id of the created group directory, or the kind of error that occured
-
edit
public Map<String,Object> edit(String id, String label, String modelId, Map<String,String> params)
Edits the given group directory- Parameters:
id- The id of the group directory to editlabel- The label of the group directorymodelId- The id of the group directory modelparams- The parameters of the group directory- Returns:
- A map containing the id of the edited group directory, or the kind of error that occured
-
remove
public Map<String,Object> remove(String id)
Removes the given group directory- Parameters:
id- The id of the group directory to remove- Returns:
- A map containing the id of the removed group directory
-
dispose
public void dispose()
- Specified by:
disposein interfaceDisposable
-
-