From a23e5785371993e941bc4107cf718df23c993eda Mon Sep 17 00:00:00 2001 From: dilanua Date: Sun, 8 May 2016 17:43:05 +0530 Subject: [PATCH] Adding inter-mediate development code bits for dashboard analytics feature --- .../dao/bean/DetailedDeviceEntry.java | 64 +++++++++++++++++++ .../dao/bean/DeviceCountByGroupEntry.java | 53 +++++++++++++++ .../impl/GadgetDataServiceDAOConstants.java | 38 +++++++++++ 3 files changed, 155 insertions(+) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/bean/DetailedDeviceEntry.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/bean/DeviceCountByGroupEntry.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/GadgetDataServiceDAOConstants.java diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/bean/DetailedDeviceEntry.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/bean/DetailedDeviceEntry.java new file mode 100644 index 00000000000..c8885b68339 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/bean/DetailedDeviceEntry.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * you may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.analytics.dashboard.dao.bean; + +public class DetailedDeviceEntry { + + private int deviceId; + private String platform; + private String ownershipType; + private String connectivityStatus; + + @SuppressWarnings("unused") + public int getDeviceId() { + return deviceId; + } + + public void setDeviceId(int deviceId) { + this.deviceId = deviceId; + } + + @SuppressWarnings("unused") + public String getPlatform() { + return platform; + } + + public void setPlatform(String platform) { + this.platform = platform; + } + + @SuppressWarnings("unused") + public String getOwnershipType() { + return ownershipType; + } + + public void setOwnershipType(String ownershipType) { + this.ownershipType = ownershipType; + } + + @SuppressWarnings("unused") + public String getConnectivityStatus() { + return connectivityStatus; + } + + public void setConnectivityStatus(String connectivityStatus) { + this.connectivityStatus = connectivityStatus; + } + +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/bean/DeviceCountByGroupEntry.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/bean/DeviceCountByGroupEntry.java new file mode 100644 index 00000000000..e7dc9909f6c --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/bean/DeviceCountByGroupEntry.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * you may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.analytics.dashboard.dao.bean; + +public class DeviceCountByGroupEntry { + + private String group; + private String displayNameForGroup; + private int deviceCount; + + @SuppressWarnings("unused") + public String getGroup() { + return group; + } + + public void setGroup(String group) { + this.group = group; + } + + @SuppressWarnings("unused") + public String getDisplayNameForGroup() { + return displayNameForGroup; + } + + public void setDisplayNameForGroup(String displayNameForGroup) { + this.displayNameForGroup = displayNameForGroup; + } + + @SuppressWarnings("unused") + public int getDeviceCount() { + return deviceCount; + } + + public void setDeviceCount(int deviceCount) { + this.deviceCount = deviceCount; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/GadgetDataServiceDAOConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/GadgetDataServiceDAOConstants.java new file mode 100644 index 00000000000..9caad2f3a83 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/GadgetDataServiceDAOConstants.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * you may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.analytics.dashboard.dao.impl; + +public final class GadgetDataServiceDAOConstants { + + public static class PotentialVulnerability { + + // These constants do not hold actual database values + // These are just logical values defined and used @ Gadget Data Service DAO Implementation layer + public static final String NON_COMPLIANT = "NON_COMPLIANT"; + public static final String UNMONITORED = "UNMONITORED"; + + private PotentialVulnerability() { + throw new AssertionError(); + } + + } + + private GadgetDataServiceDAOConstants() { throw new AssertionError(); } + +}