From d86a5ccc4ab2496fce25b4bfe67c971a6bdf1470 Mon Sep 17 00:00:00 2001 From: Milan Perera Date: Fri, 8 May 2015 18:15:12 +0530 Subject: [PATCH 1/7] Fixed a bug in update Operation --- .../mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java index efd42803b2..f59fe6452d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java @@ -127,6 +127,7 @@ public class ProfileOperationDAOImpl extends OperationDAOImpl { PreparedStatement stmt = null; ByteArrayOutputStream bao = null; ObjectOutputStream oos = null; + super.updateOperation(operation); try { Connection connection = OperationManagementDAOFactory.getConnection(); From 9cf2d33c59b024ef373c5a52d6537222f3037b33 Mon Sep 17 00:00:00 2001 From: manoj Date: Tue, 12 May 2015 21:00:16 +0530 Subject: [PATCH 2/7] Correct copy right text --- .../mgt/core/dto/operation/mgt/Operation.java | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/Operation.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/Operation.java index 08a26c38f6..3320ed17f2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/Operation.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/Operation.java @@ -1,24 +1,21 @@ /* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * * Copyright (c) 2015, 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. - * * + * 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.core.dto.operation.mgt; import javax.xml.bind.annotation.XmlElement; From 6c452433de94537ac4280b2b9dc1ba364c66df1e Mon Sep 17 00:00:00 2001 From: manoj Date: Tue, 12 May 2015 21:02:26 +0530 Subject: [PATCH 3/7] Correct copy right text --- .../dto/operation/mgt/CommandOperation.java | 30 +++++++++---------- .../dto/operation/mgt/ConfigOperation.java | 30 +++++++++---------- .../dto/operation/mgt/ProfileOperation.java | 30 +++++++++---------- 3 files changed, 42 insertions(+), 48 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/CommandOperation.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/CommandOperation.java index 5bef9e6226..28c43cd6bd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/CommandOperation.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/CommandOperation.java @@ -1,21 +1,19 @@ /* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * * Copyright (c) 2015, 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. - * * + * 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.core.dto.operation.mgt; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/ConfigOperation.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/ConfigOperation.java index 8e99dda978..bb2843c9b8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/ConfigOperation.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/ConfigOperation.java @@ -1,21 +1,19 @@ /* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * * Copyright (c) 2015, 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. - * * + * 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.core.dto.operation.mgt; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/ProfileOperation.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/ProfileOperation.java index 45ca2612e0..61bb18d698 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/ProfileOperation.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/ProfileOperation.java @@ -1,21 +1,19 @@ /* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * - * * Copyright (c) 2015, 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. - * * + * 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.core.dto.operation.mgt; From 696ab3554c9791c7e8b2e248628ba7dee9148ac1 Mon Sep 17 00:00:00 2001 From: manoj Date: Wed, 13 May 2015 11:30:26 +0530 Subject: [PATCH 4/7] Refractor Application bean --- .../mgt/common/app/mgt/Application.java | 87 ------------------- .../common/app/mgt/ApplicationWrapper.java | 64 -------------- 2 files changed, 151 deletions(-) delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/Application.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationWrapper.java diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/Application.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/Application.java deleted file mode 100644 index c6b27063ca..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/Application.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * - * Copyright (c) 2015, 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.common.app.mgt; - -import org.wso2.carbon.device.mgt.common.DeviceIdentifier; -import org.wso2.carbon.device.mgt.common.Platform; - -import java.util.List; - -public class Application { - - private String applicationName; - private String appId; - private String locationUrl; - private String imageUrl; - private String version; - private String appType; - - public String getAppType() { - return appType; - } - - public void setAppType(String appType) { - this.appType = appType; - } - - public String getApplicationName() { - return applicationName; - } - - public void setApplicationName(String applicationName) { - this.applicationName = applicationName; - } - - - public String getAppId() { - return appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } - - - public String getLocationUrl() { - return locationUrl; - } - - public void setLocationUrl(String locationUrl) { - this.locationUrl = locationUrl; - } - - - public String getImageUrl() { - return imageUrl; - } - - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - -} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationWrapper.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationWrapper.java deleted file mode 100644 index 1a4304522d..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/ApplicationWrapper.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * - * Copyright (c) 2015, 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.common.app.mgt; - -import org.wso2.carbon.device.mgt.common.DeviceIdentifier; - -import java.util.List; - -public class ApplicationWrapper { - - private List userNameList; - private List roleNameList; - private List deviceIdentifiers; - private Application application; - - public List getUserNameList() { - return userNameList; - } - - public void setUserNameList(List userNameList) { - this.userNameList = userNameList; - } - - public List getRoleNameList() { - return roleNameList; - } - - public void setRoleNameList(List roleNameList) { - this.roleNameList = roleNameList; - } - - public List getDeviceIdentifiers() { - return deviceIdentifiers; - } - - public void setDeviceIdentifiers(List deviceIdentifiers) { - this.deviceIdentifiers = deviceIdentifiers; - } - - public Application getApplication() { - return application; - } - - public void setApplication(Application application) { - this.application = application; - } -} From 3df761bba6bbf463601386fe2cc01f0c9ae9b4d4 Mon Sep 17 00:00:00 2001 From: manoj Date: Wed, 13 May 2015 11:30:40 +0530 Subject: [PATCH 5/7] Refractor Application bean --- .../carbon/device/mgt/common/app/mgt/AppManagerConnector.java | 1 + .../device/mgt/core/app/mgt/AppManagementServiceImpl.java | 2 +- .../device/mgt/core/app/mgt/RemoteAppManagerConnector.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/AppManagerConnector.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/AppManagerConnector.java index 4223fae097..7a0b0ead5a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/AppManagerConnector.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/app/mgt/AppManagerConnector.java @@ -17,6 +17,7 @@ */ package org.wso2.carbon.device.mgt.common.app.mgt; +import org.wso2.carbon.device.mgt.common.Application; import org.wso2.carbon.device.mgt.common.Credential; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/AppManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/AppManagementServiceImpl.java index 2823f6f521..ca774b901b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/AppManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/AppManagementServiceImpl.java @@ -17,7 +17,7 @@ */ package org.wso2.carbon.device.mgt.core.app.mgt; -import org.wso2.carbon.device.mgt.common.app.mgt.Application; +import org.wso2.carbon.device.mgt.common.Application; import org.wso2.carbon.device.mgt.common.Credential; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnector; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/RemoteAppManagerConnector.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/RemoteAppManagerConnector.java index b6c0f978a7..87c3cc0a13 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/RemoteAppManagerConnector.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/app/mgt/RemoteAppManagerConnector.java @@ -23,7 +23,7 @@ import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.ConfigurationContextFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.device.mgt.common.app.mgt.Application; +import org.wso2.carbon.device.mgt.common.Application; import org.wso2.carbon.device.mgt.common.Credential; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnector; From 58a7964b348a378325dd6c091a17956fdd39c97d Mon Sep 17 00:00:00 2001 From: manoj Date: Wed, 13 May 2015 11:31:03 +0530 Subject: [PATCH 6/7] Refractor Application bean --- .../carbon/device/mgt/common/Application.java | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Application.java diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Application.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Application.java new file mode 100644 index 0000000000..c4d4a91019 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Application.java @@ -0,0 +1,87 @@ +/* + * + * Copyright (c) 2015, 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.common; + +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; +import org.wso2.carbon.device.mgt.common.Platform; + +import java.util.List; + +public class Application { + + private String applicationName; + private String appId; + private String locationUrl; + private String imageUrl; + private String version; + private String appType; + + public String getAppType() { + return appType; + } + + public void setAppType(String appType) { + this.appType = appType; + } + + public String getApplicationName() { + return applicationName; + } + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + + public String getLocationUrl() { + return locationUrl; + } + + public void setLocationUrl(String locationUrl) { + this.locationUrl = locationUrl; + } + + + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + +} From 3f7827184781082fd30674913af66901029ab911 Mon Sep 17 00:00:00 2001 From: manoj Date: Wed, 13 May 2015 11:39:11 +0530 Subject: [PATCH 7/7] Refractor application bean --- .../java/org/wso2/carbon/device/mgt/core/TestDeviceManager.java | 1 - 1 file changed, 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManager.java index 4e89656757..f0d64f389a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManager.java @@ -19,7 +19,6 @@ package org.wso2.carbon.device.mgt.core; import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnectorException; -import org.wso2.carbon.device.mgt.common.app.mgt.Application; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.spi.DeviceMgtService;