|
|
|
@ -32,6 +32,7 @@ import java.util.Map;
|
|
|
|
|
* This interface represents the key operations associated with persisting group related information.
|
|
|
|
|
*/
|
|
|
|
|
public interface GroupDAO {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Add new Device Group.
|
|
|
|
|
*
|
|
|
|
@ -42,7 +43,6 @@ public interface GroupDAO {
|
|
|
|
|
*/
|
|
|
|
|
int addGroup(DeviceGroup deviceGroup, int tenantId) throws GroupManagementDAOException;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Add properties for device group.
|
|
|
|
|
* Note that groupId parameter is considered seperately due to the groupId parameter passed with
|
|
|
|
@ -55,8 +55,6 @@ public interface GroupDAO {
|
|
|
|
|
*/
|
|
|
|
|
int addGroupWithRoles(DeviceGroupRoleWrapper groups, int tenantId) throws GroupManagementDAOException;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Add properties for device group.
|
|
|
|
|
* Note that groupId parameter is considered seperately due to the groupId parameter passed with
|
|
|
|
@ -67,7 +65,6 @@ public interface GroupDAO {
|
|
|
|
|
* @return sql execution result.
|
|
|
|
|
* @throws GroupManagementDAOException
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
boolean addGroupProperties(DeviceGroup deviceGroup, int groupId, int tenantId) throws GroupManagementDAOException;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -80,7 +77,6 @@ public interface GroupDAO {
|
|
|
|
|
* @return sql execution result.
|
|
|
|
|
* @throws GroupManagementDAOException
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
boolean addGroupPropertiesWithRoles(DeviceGroupRoleWrapper groups, int groupId, int tenantId) throws GroupManagementDAOException;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -201,6 +197,7 @@ public interface GroupDAO {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the groups of device with device id provided
|
|
|
|
|
*
|
|
|
|
|
* @param deviceId
|
|
|
|
|
* @return groups which has the device.
|
|
|
|
|
* @throws GroupManagementDAOException
|
|
|
|
@ -427,16 +424,15 @@ public interface GroupDAO {
|
|
|
|
|
* @throws GroupManagementDAOException
|
|
|
|
|
*/
|
|
|
|
|
int getOwnGroupsCount(String username, int tenantId, String parentPath) throws GroupManagementDAOException;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get device Ids of devices which are assigned to groups.
|
|
|
|
|
components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/GroupDAO.java * Get device Ids of devices which are assigned to groups.
|
|
|
|
|
*
|
|
|
|
|
* @param paginationRequest Request object with offset and limit.
|
|
|
|
|
* @param groupNames default group names that should be omitted when checking the device
|
|
|
|
|
* whether they have been assigned to groups
|
|
|
|
|
* @return details of devices that are unassigned to groups.
|
|
|
|
|
* @throws GroupManagementDAOException Might occur while retrieving information of group
|
|
|
|
|
* unassigned devices
|
|
|
|
|
* @return details of devices that are unassigned to groups.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
List<Device> getGroupUnassignedDevices(PaginationRequest paginationRequest,
|
|
|
|
|