|
|
@ -59,7 +59,6 @@ import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
|
|
|
|
import org.wso2.carbon.device.mgt.common.GroupPaginationRequest;
|
|
|
|
import org.wso2.carbon.device.mgt.common.GroupPaginationRequest;
|
|
|
|
import org.wso2.carbon.device.mgt.common.PaginationRequest;
|
|
|
|
import org.wso2.carbon.device.mgt.common.PaginationRequest;
|
|
|
|
import org.wso2.carbon.device.mgt.common.PaginationResult;
|
|
|
|
import org.wso2.carbon.device.mgt.common.PaginationResult;
|
|
|
|
import org.wso2.carbon.device.mgt.common.SortColumn;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
|
|
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
|
|
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.EnrollmentConfiguration;
|
|
|
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.EnrollmentConfiguration;
|
|
|
@ -1285,23 +1284,4 @@ public final class DeviceManagerUtil {
|
|
|
|
+ deviceGroup.getGroupId();
|
|
|
|
+ deviceGroup.getGroupId();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Convert SortColumns field parameter and splitting string into columnName and sortType
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param sortColumns which is separated by a colon(:) and first will be the columnNane and the second will be type ASC or DESC
|
|
|
|
|
|
|
|
* @return sortColumnList as a list of sortColumn
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static List<SortColumn> convertToSortColumn(List<String> sortColumns) {
|
|
|
|
|
|
|
|
List<SortColumn> sortColumnList = new ArrayList<>();
|
|
|
|
|
|
|
|
for (String sortBy: sortColumns) {
|
|
|
|
|
|
|
|
SortColumn sortColumn = new SortColumn();
|
|
|
|
|
|
|
|
String[] sorting = sortBy.split(":");
|
|
|
|
|
|
|
|
sortColumn.setName(sorting[0]);
|
|
|
|
|
|
|
|
sortColumn.setType(sorting.length >= 2 && (sorting[1].equalsIgnoreCase("desc"))
|
|
|
|
|
|
|
|
? SortColumn.types.DESC : SortColumn.types.ASC);
|
|
|
|
|
|
|
|
sortColumnList.add(sortColumn);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return sortColumnList;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|