From 9f5fb3fb912bde56f2447cb9563b7e948580b529 Mon Sep 17 00:00:00 2001 From: harshanL Date: Mon, 15 Dec 2014 09:47:54 +0530 Subject: [PATCH] Added MobileDeviceDAO classes --- .../android/AndroidDeviceManagerService.java | 2 +- .../mgt/mobile/impl/dao/MobileDeviceDAO.java | 13 ++- .../MobileDeviceManagementDAOException.java | 72 +++++++++++++++- .../mobile/impl/dao/MobileDeviceModelDAO.java | 13 ++- .../impl/dao/MobileDeviceVendorDAO.java | 30 ++++++- .../mobile/impl/dao/MobileOSVersionDAO.java | 29 ++++++- .../mobile/impl/dao/impl/MobileDeviceDAO.java | 7 -- .../impl/dao/impl/MobileDeviceDAOImpl.java | 45 +++++++++- .../impl/dao/impl/MobileDeviceModelImpl.java | 47 +++++++++- .../dao/impl/MobileDeviceVendorDAOImpl.java | 47 +++++++++- .../impl/dao/impl/MobileOSVersionDAOImpl.java | 43 +++++++++- .../util/MobileDeviceManagementDAOUtil.java | 18 +++- .../mgt/mobile/impl/dto/MobileDevice.java | 86 ++++++++++++++++++- .../mobile/impl/dto/MobileDeviceModel.java | 41 ++++++++- .../mgt/mobile/impl/dto/MobileOSVersion.java | 41 ++++++++- 15 files changed, 505 insertions(+), 29 deletions(-) delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceDAO.java diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java index 648fd2c92b9..3246b21f219 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java @@ -25,7 +25,7 @@ import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService; import java.util.List; /** - * This represents the Android implementation of DeviceManagerService. * + * This represents the Android implementation of DeviceManagerService. */ public class AndroidDeviceManagerService implements DeviceManagerService { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceDAO.java index 0f38ffc527e..1d4ab3ab803 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceDAO.java @@ -16,8 +16,19 @@ package org.wso2.carbon.device.mgt.mobile.impl.dao; +import org.wso2.carbon.device.mgt.mobile.impl.dto.MobileDevice; + /** - * This class represents the key operations associated with persisting device related information. + * This class represents the key operations associated with persisting mobile-device related information. */ public interface MobileDeviceDAO { + + MobileDevice getDevice(String deviceId) throws MobileDeviceManagementDAOException; + + void addDevice(MobileDevice mobileDevice) throws MobileDeviceManagementDAOException; + + void updateDevice(MobileDevice mobileDevice) throws MobileDeviceManagementDAOException; + + void deleteDevice(String deviceId) throws MobileDeviceManagementDAOException; + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceManagementDAOException.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceManagementDAOException.java index 61e6bce2ee7..8047d932a24 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceManagementDAOException.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceManagementDAOException.java @@ -1,7 +1,75 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dao; /** - * Created by harshan on 12/12/14. + * Custom exception class for mobile device specific data access related exceptions. */ -public class MobileDeviceManagementDAOException { +public class MobileDeviceManagementDAOException extends Exception { + + private String message; + private static final long serialVersionUID = 2021891706072918865L; + + /** + * Constructs a new exception with the specified detail message and nested exception. + * + * @param message error message + * @param nestedException exception + */ + public MobileDeviceManagementDAOException(String message, Exception nestedException) { + super(message, nestedException); + setErrorMessage(message); + } + + /** + * Constructs a new exception with the specified detail message and cause. + * + * @param message the detail message. + * @param cause the cause of this exception. + */ + public MobileDeviceManagementDAOException(String message, Throwable cause) { + super(message, cause); + setErrorMessage(message); + } + + /** + * Constructs a new exception with the specified detail message + * + * @param message the detail message. + */ + public MobileDeviceManagementDAOException(String message) { + super(message); + setErrorMessage(message); + } + + /** + * Constructs a new exception with the specified and cause. + * + * @param cause the cause of this exception. + */ + public MobileDeviceManagementDAOException(Throwable cause) { + super(cause); + } + + public String getMessage() { + return message; + } + + public void setErrorMessage(String errorMessage) { + this.message = errorMessage; + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceModelDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceModelDAO.java index 0a3ec19bb6f..768f297231c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceModelDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceModelDAO.java @@ -16,8 +16,19 @@ package org.wso2.carbon.device.mgt.mobile.impl.dao; +import org.wso2.carbon.device.mgt.mobile.impl.dto.MobileDeviceModel; + /** - * Created by harshan on 12/12/14. + * This class represents the key operations associated with persisting mobile-device model related + * information. */ public interface MobileDeviceModelDAO { + + MobileDeviceModel getDeviceModel(String modelId) throws MobileDeviceManagementDAOException; + + void addDeviceModel(MobileDeviceModel deviceModel) throws MobileDeviceManagementDAOException; + + void updateDeviceModel(MobileDeviceModel deviceModel) throws MobileDeviceManagementDAOException; + + void deleteDeviceModel(String modelId) throws MobileDeviceManagementDAOException; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceVendorDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceVendorDAO.java index 2f6e07633eb..4a4d24bf7e8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceVendorDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileDeviceVendorDAO.java @@ -1,7 +1,35 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dao; +import org.wso2.carbon.device.mgt.mobile.impl.dto.MobileDeviceVendor; + /** - * Created by harshan on 12/12/14. + * This class represents the key operations associated with persisting mobile-device vendor + * related information. */ public interface MobileDeviceVendorDAO { + + MobileDeviceVendor getDeviceModel(String vendorId) throws MobileDeviceManagementDAOException; + + void addDeviceVendor(MobileDeviceVendor deviceVendor) throws MobileDeviceManagementDAOException; + + void updateDeviceVendor(MobileDeviceVendor deviceVendor) + throws MobileDeviceManagementDAOException; + + void deleteDeviceVendor(String vendorId) throws MobileDeviceManagementDAOException; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileOSVersionDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileOSVersionDAO.java index 6131e15b325..dcffc528b6d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileOSVersionDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/MobileOSVersionDAO.java @@ -1,7 +1,34 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dao; +import org.wso2.carbon.device.mgt.mobile.impl.dto.MobileOSVersion; + /** - * Created by harshan on 12/12/14. + * This class represents the key operations associated with persisting mobile-device OS version + * related information. */ public interface MobileOSVersionDAO { + + MobileOSVersion getMobileOSVersion(String versionId) throws MobileDeviceManagementDAOException; + + void addMobileOSVersion(MobileOSVersion osVersion) throws MobileDeviceManagementDAOException; + + void updateMobileOSVersion(MobileOSVersion osVersion) throws MobileDeviceManagementDAOException; + + void deleteMobileOSVersion(String versionId) throws MobileDeviceManagementDAOException; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceDAO.java deleted file mode 100644 index 6210aa23ef3..00000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceDAO.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.wso2.carbon.device.mgt.mobile.impl.dao.impl; - -/** - * Created by harshan on 12/12/14. - */ -public interface MobileDeviceDAO { -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceDAOImpl.java index 8ffaaee04b8..cdd18e69c14 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceDAOImpl.java @@ -1,7 +1,48 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dao.impl; +import org.wso2.carbon.device.mgt.mobile.impl.dao.MobileDeviceDAO; +import org.wso2.carbon.device.mgt.mobile.impl.dao.MobileDeviceManagementDAOException; +import org.wso2.carbon.device.mgt.mobile.impl.dto.MobileDevice; + /** - * Created by harshan on 12/12/14. + * Implementation of MobileDeviceDAO. */ -public class MobileDeviceDAOImpl { +public class MobileDeviceDAOImpl implements MobileDeviceDAO { + @Override + public MobileDevice getDevice(String deviceId) throws MobileDeviceManagementDAOException { + return null; + } + + @Override + public void addDevice(MobileDevice mobileDevice) + throws MobileDeviceManagementDAOException { + + } + + @Override + public void updateDevice(MobileDevice mobileDevice) + throws MobileDeviceManagementDAOException { + + } + + @Override + public void deleteDevice(String deviceId) throws MobileDeviceManagementDAOException { + + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceModelImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceModelImpl.java index 9b26c68cca6..67179794cd1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceModelImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceModelImpl.java @@ -1,7 +1,50 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dao.impl; +import org.wso2.carbon.device.mgt.mobile.impl.dao.MobileDeviceManagementDAOException; +import org.wso2.carbon.device.mgt.mobile.impl.dao.MobileDeviceModelDAO; +import org.wso2.carbon.device.mgt.mobile.impl.dto.MobileDeviceModel; + /** - * Created by harshan on 12/12/14. + * Implementation of MobileDeviceModel. */ -public class MobileDeviceModelImpl { +public class MobileDeviceModelImpl implements MobileDeviceModelDAO { + @Override + public MobileDeviceModel getDeviceModel(String modelId) + throws MobileDeviceManagementDAOException { + return null; + } + + @Override + public void addDeviceModel(MobileDeviceModel deviceModel) + throws MobileDeviceManagementDAOException { + + } + + @Override + public void updateDeviceModel(MobileDeviceModel deviceModel) + throws MobileDeviceManagementDAOException { + + } + + @Override + public void deleteDeviceModel(String modelId) + throws MobileDeviceManagementDAOException { + + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceVendorDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceVendorDAOImpl.java index 3c9c8d81fd5..0f4659d97bb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceVendorDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileDeviceVendorDAOImpl.java @@ -1,7 +1,50 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dao.impl; +import org.wso2.carbon.device.mgt.mobile.impl.dao.MobileDeviceManagementDAOException; +import org.wso2.carbon.device.mgt.mobile.impl.dao.MobileDeviceVendorDAO; +import org.wso2.carbon.device.mgt.mobile.impl.dto.MobileDeviceVendor; + /** - * Created by harshan on 12/12/14. + * Implementation of MobileDeviceVendorDAO. */ -public class MobileDeviceVendorDAOImpl { +public class MobileDeviceVendorDAOImpl implements MobileDeviceVendorDAO { + @Override + public MobileDeviceVendor getDeviceModel(String vendorId) + throws MobileDeviceManagementDAOException { + return null; + } + + @Override + public void addDeviceVendor(MobileDeviceVendor deviceVendor) + throws MobileDeviceManagementDAOException { + + } + + @Override + public void updateDeviceVendor(MobileDeviceVendor deviceVendor) + throws MobileDeviceManagementDAOException { + + } + + @Override + public void deleteDeviceVendor(String vendorId) + throws MobileDeviceManagementDAOException { + + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileOSVersionDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileOSVersionDAOImpl.java index 9a07c71f998..6bfaccad0c3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileOSVersionDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/impl/MobileOSVersionDAOImpl.java @@ -1,7 +1,46 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dao.impl; +import org.wso2.carbon.device.mgt.mobile.impl.dao.MobileDeviceManagementDAOException; +import org.wso2.carbon.device.mgt.mobile.impl.dao.MobileOSVersionDAO; +import org.wso2.carbon.device.mgt.mobile.impl.dto.MobileOSVersion; + /** - * Created by harshan on 12/12/14. + * Implementation of MobileOSVersionDAO. */ -public class MobileOSVersionDAOImpl { +public class MobileOSVersionDAOImpl implements MobileOSVersionDAO { + @Override public MobileOSVersion getMobileOSVersion(String versionId) + throws MobileDeviceManagementDAOException { + return null; + } + + @Override public void addMobileOSVersion(MobileOSVersion osVersion) + throws MobileDeviceManagementDAOException { + + } + + @Override public void updateMobileOSVersion(MobileOSVersion osVersion) + throws MobileDeviceManagementDAOException { + + } + + @Override public void deleteMobileOSVersion(String versionId) + throws MobileDeviceManagementDAOException { + + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/util/MobileDeviceManagementDAOUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/util/MobileDeviceManagementDAOUtil.java index 15bd2d6624a..453a3918d02 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/util/MobileDeviceManagementDAOUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dao/util/MobileDeviceManagementDAOUtil.java @@ -1,7 +1,23 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dao.util; /** - * Created by harshan on 12/12/14. + * Utility method required by MobileDeviceManagement DAO classes. */ public class MobileDeviceManagementDAOUtil { } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileDevice.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileDevice.java index eca99805e8b..f7b1d14b1f6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileDevice.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileDevice.java @@ -1,7 +1,89 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dto; +import java.io.Serializable; + /** - * Created by harshan on 12/12/14. + * DTO of MobileDevice. */ -public class MobileDevice { +public class MobileDevice implements Serializable { + + private String mobileDeviceId; + private String regId; + private String imei; + private String imsi; + private int osVersionId; + private int modelId; + private int vendorId; + + public String getMobileDeviceId() { + return mobileDeviceId; + } + + public void setMobileDeviceId(String mobileDeviceId) { + this.mobileDeviceId = mobileDeviceId; + } + + public String getRegId() { + return regId; + } + + public void setRegId(String regId) { + this.regId = regId; + } + + public String getImei() { + return imei; + } + + public void setImei(String imei) { + this.imei = imei; + } + + public String getImsi() { + return imsi; + } + + public void setImsi(String imsi) { + this.imsi = imsi; + } + + public int getOsVersionId() { + return osVersionId; + } + + public void setOsVersionId(int osVersionId) { + this.osVersionId = osVersionId; + } + + public int getModelId() { + return modelId; + } + + public void setModelId(int modelId) { + this.modelId = modelId; + } + + public int getVendorId() { + return vendorId; + } + + public void setVendorId(int vendorId) { + this.vendorId = vendorId; + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileDeviceModel.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileDeviceModel.java index 2d295257ed7..b5d5e5ebbb8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileDeviceModel.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileDeviceModel.java @@ -1,7 +1,44 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dto; +import java.io.Serializable; + /** - * Created by harshan on 12/12/14. + * DTO of MobileDeviceModel. */ -public class MobileDeviceModel { +public class MobileDeviceModel implements Serializable { + + private int modelId; + private String model; + + public int getModelId() { + return modelId; + } + + public void setModelId(int modelId) { + this.modelId = modelId; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileOSVersion.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileOSVersion.java index c579947198e..32a56b6fcc6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileOSVersion.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/dto/MobileOSVersion.java @@ -1,7 +1,44 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed 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.mobile.impl.dto; +import java.io.Serializable; + /** - * Created by harshan on 12/12/14. + * DTO of MobileOSVersion. */ -public class MobileOSVersion { +public class MobileOSVersion implements Serializable { + + private int osVersionId; + private String osVersion; + + public int getOsVersionId() { + return osVersionId; + } + + public void setOsVersionId(int osVersionId) { + this.osVersionId = osVersionId; + } + + public String getOsVersion() { + return osVersion; + } + + public void setOsVersion(String osVersion) { + this.osVersion = osVersion; + } }