From b2f89320f7ae84654ea1394e3455af70b375f837 Mon Sep 17 00:00:00 2001 From: manoj Date: Tue, 13 Jan 2015 10:59:10 +0530 Subject: [PATCH] Android JAX RS Refactor --- .../device/mgt/core/LicenseManager.java | 30 ++ .../cdm/api/android/util/AndroidAPIUtils.java | 27 +- .../api/android/util/AndroidConstants.java | 21 +- .../java/cdm/api/android/util/Message.java | 25 +- .../src/repository/conf/registry.xml | 304 ++++++++++++++++++ 5 files changed, 370 insertions(+), 37 deletions(-) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/LicenseManager.java create mode 100644 product/modules/distribution/src/repository/conf/registry.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/LicenseManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/LicenseManager.java new file mode 100644 index 0000000000..0275a1bc20 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/LicenseManager.java @@ -0,0 +1,30 @@ +/* + * + * * Copyright (c) 2014, 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.core; + +import org.wso2.carbon.device.mgt.core.dto.DeviceType; + +public class LicenseManager { + +/* public void addLicense(DeviceType deviceType,String langCode, String + );*/ + +} diff --git a/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/AndroidAPIUtils.java b/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/AndroidAPIUtils.java index e0e418b8a2..c771704100 100644 --- a/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/AndroidAPIUtils.java +++ b/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/AndroidAPIUtils.java @@ -1,20 +1,19 @@ /* * Copyright (c) 2014, 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 + * 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 + * 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. -*/ + * 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 cdm.api.android.util; import org.apache.commons.logging.Log; @@ -32,7 +31,6 @@ public class AndroidAPIUtils { private static Log log = LogFactory.getLog(AndroidAPIUtils.class); public static DeviceIdentifier convertToDeviceIdentifierObject(String deviceId) { - DeviceIdentifier identifier = new DeviceIdentifier(); identifier.setId(deviceId); identifier.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID); @@ -42,7 +40,8 @@ public class AndroidAPIUtils { public static DeviceManagementService getDeviceManagementService() throws DeviceManagementServiceException{ - // until complete login this is use to load super tenant context + //TODO: complete login change super tenent context + DeviceManagementService dmService; PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); diff --git a/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/AndroidConstants.java b/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/AndroidConstants.java index f3880536c2..0dcb9e59de 100644 --- a/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/AndroidConstants.java +++ b/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/AndroidConstants.java @@ -1,20 +1,19 @@ /* * Copyright (c) 2014, 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. + * 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 + * 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. -*/ + * 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 cdm.api.android.util; /** diff --git a/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/Message.java b/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/Message.java index 5361ff0d4c..f5e34cf7ec 100644 --- a/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/Message.java +++ b/product/modules/agents/android/jax-rs/src/main/java/cdm/api/android/util/Message.java @@ -1,20 +1,21 @@ /* * Copyright (c) 2014, 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 + * 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 + * 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. -*/ + * 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 cdm.api.android.util; import javax.xml.bind.annotation.XmlElement; diff --git a/product/modules/distribution/src/repository/conf/registry.xml b/product/modules/distribution/src/repository/conf/registry.xml new file mode 100644 index 0000000000..70ab4ea5a1 --- /dev/null +++ b/product/modules/distribution/src/repository/conf/registry.xml @@ -0,0 +1,304 @@ + + + + + + + + wso2registry + false + true + / + + + + + jdbc/WSO2CarbonDB + + + + + + + + + + .* + + + + + + + + + + + application/vnd.wso2-service+xml + + + + + + + + + /_system/governance/event/topics/registry/notifications/.* + + + + + + + + + + + /trunk/policies/ + + + application/policy+xml + + + + + + + + true + + /trunk/schemas/ + + + application/x-xsd+xml + + + + + + + + + + + + + .* + + + + + + + .* + + + + + + + workflow-config + + + + + + + + + + + + + + + + + + + + 60 + 2 + + 50 + + 10 + + /_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + /trunk/services/ + + + + + false + + + + + + + + + + + + + + + + + + + + + + + +