mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing build failures caused by changed introduced to Operation Management APIs
This commit is contained in:
parent
b9a9fb3169
commit
9ec80bfe18
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* 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.extensions.push.notification.provider.mqtt;
|
||||||
|
|
||||||
|
public class InvalidConfigurationException {
|
||||||
|
}
|
||||||
@ -186,7 +186,11 @@ public interface Operation {
|
|||||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "Activity details provided successfully.."),
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "Activity details provided successfully.."),
|
||||||
@ApiResponse(code = 500, message = "Error occurred while fetching the activity for the supplied id.")})
|
@ApiResponse(code = 500, message = "Error occurred while fetching the activity for the supplied id.")})
|
||||||
@Permission(scope = "operation-view", permissions = {"/permission/admin/device-mgt/admin/devices/view"})
|
@Permission(scope = "operation-view", permissions = {"/permission/admin/device-mgt/admin/devices/view"})
|
||||||
Response getActivity(@ApiParam(name = "id", value = "Provide activity id {id} as ACTIVITY_(number)",
|
Response getActivity(
|
||||||
|
@ApiParam(name = "type", value = "Provide device {type} upon which the activity was performed",
|
||||||
|
required = true) @PathParam("type") String type,
|
||||||
|
@ApiParam(name = "id", value = "Provide activity id {id} as ACTIVITY_(number)",
|
||||||
required = true) @PathParam("id") String id)
|
required = true) @PathParam("id") String id)
|
||||||
throws MDMAPIException;
|
throws MDMAPIException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -235,13 +235,13 @@ public class OperationImpl implements org.wso2.carbon.device.mgt.jaxrs.api.Opera
|
|||||||
@Override
|
@Override
|
||||||
@GET
|
@GET
|
||||||
@Path("activity/{id}")
|
@Path("activity/{id}")
|
||||||
public Response getActivity(@PathParam("id") String id)
|
public Response getActivity(@PathParam("type") String type, @PathParam("id") String id)
|
||||||
throws MDMAPIException {
|
throws MDMAPIException {
|
||||||
org.wso2.carbon.device.mgt.common.operation.mgt.Operation operation;
|
org.wso2.carbon.device.mgt.common.operation.mgt.Operation operation;
|
||||||
DeviceManagementProviderService dmService;
|
DeviceManagementProviderService dmService;
|
||||||
try {
|
try {
|
||||||
dmService = DeviceMgtAPIUtils.getDeviceManagementService();
|
dmService = DeviceMgtAPIUtils.getDeviceManagementService();
|
||||||
operation = dmService.getOperationByActivityId(id);
|
operation = dmService.getOperationByActivityId(type, id);
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
String msg = "Error occurred while fetching the activity for the supplied id.";
|
String msg = "Error occurred while fetching the activity for the supplied id.";
|
||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
@ -249,4 +249,5 @@ public class OperationImpl implements org.wso2.carbon.device.mgt.jaxrs.api.Opera
|
|||||||
}
|
}
|
||||||
return Response.status(Response.Status.OK).entity(operation).build();
|
return Response.status(Response.Status.OK).entity(operation).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user