From 22eba43aa9fa81d858063c5f9af51b2cd8796d43 Mon Sep 17 00:00:00 2001 From: Ace Date: Thu, 15 Oct 2020 21:05:33 +0530 Subject: [PATCH] including missing files --- .../common/device/details/LocationBean.java | 89 +++++++++++++++++++ .../device/details/LocationEventBean.java | 69 ++++++++++++++ .../common/operation/mgt/ActivityHolder.java | 42 +++++++++ .../common/operation/mgt/ActivityMapper.java | 42 +++++++++ 4 files changed, 242 insertions(+) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/device/details/LocationBean.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/device/details/LocationEventBean.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityHolder.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityMapper.java diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/device/details/LocationBean.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/device/details/LocationBean.java new file mode 100644 index 0000000000..261d387e03 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/device/details/LocationBean.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2020, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. 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.common.device.details; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +@ApiModel( + value = "LocationBean", + description = "This class carries all information related IOS Device location." +) +public class LocationBean { + + @ApiModelProperty( + name = "latitude", + value = "Latitude of the IOS device Location.", + required = true + ) + private float latitude; + @ApiModelProperty( + name = "longitude", + value = "Longitude of the IOS device Location.", + required = true + ) + private float longitude; + @ApiModelProperty( + name = "operationId", + value = "Specific Id of the Location operation.", + required = true + ) + private String operationId; + + @ApiModelProperty( + name = "locationEvents", + value = "If this is a device initiated location publishing." + ) + private List locations; + + public List getLocationEvents() { + return locations; + } + + public void setLocationEvents(List locationEvents) { + this.locations = locationEvents; + } + + public String getOperationId() { + return operationId; + } + + public void setOperationId(String operationId) { + this.operationId = operationId; + } + + + public float getLatitude() { + return latitude; + } + + public void setLatitude(float latitude) { + this.latitude = latitude; + } + + public float getLongitude() { + return longitude; + } + + public void setLongitude(float longitude) { + this.longitude = longitude; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/device/details/LocationEventBean.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/device/details/LocationEventBean.java new file mode 100644 index 0000000000..6e1ef6c976 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/device/details/LocationEventBean.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2020, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. + * + * Entgra (pvt) Ltd. 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.common.device.details; + +import io.swagger.annotations.ApiModelProperty; + +public class LocationEventBean { + + @ApiModelProperty( + name = "latitude", + value = "Latitude of the IOS device Location.", + required = true + ) + private String latitude; + + @ApiModelProperty( + name = "longitude", + value = "Longitude of the IOS device Location.", + required = true + ) + private String longitude; + + @ApiModelProperty( + name = "timestamp", + value = "Device Location time.", + required = true + ) + private String timestamp; + + public String getLatitude() { + return latitude; + } + + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + public String getLongitude() { + return longitude; + } + + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + public String getTimestamp() { + return timestamp; + } + + public void setTimestamp(String timestamp) { + this.timestamp = timestamp; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityHolder.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityHolder.java new file mode 100644 index 0000000000..6ab26276b0 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityHolder.java @@ -0,0 +1,42 @@ +/* Copyright (c) 2020, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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.common.operation.mgt; + +import java.util.List; + +public class ActivityHolder { + + private List activityList; + private List largeResponseIDs; + + public List getActivityList() { + return activityList; + } + + public void setActivityList(List activityList) { + this.activityList = activityList; + } + + public List getLargeResponseIDs() { + return largeResponseIDs; + } + + public void setLargeResponseIDs(List largeResponseIDs) { + this.largeResponseIDs = largeResponseIDs; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityMapper.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityMapper.java new file mode 100644 index 0000000000..544611453e --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/ActivityMapper.java @@ -0,0 +1,42 @@ +/* Copyright (c) 2020, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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.common.operation.mgt; + +import java.util.Map; + +public class ActivityMapper { + + private Activity activity; + private Map activityStatusMap; + + public Activity getActivity() { + return activity; + } + + public void setActivity(Activity activity) { + this.activity = activity; + } + + public Map getActivityStatusMap() { + return activityStatusMap; + } + + public void setActivityStatusMap(Map activityStatusMap) { + this.activityStatusMap = activityStatusMap; + } +}