adding swagger annotations for Android APIs

revert-dabc3590
inosh-perera 9 years ago
parent 34d4da7e66
commit afc7be590e

@ -18,13 +18,20 @@
package org.wso2.carbon.mdm.services.android.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* This class represents the information of encrypt operation.
*/
@ApiModel(value = "DeviceEncryption",
description = "Details related device encryption.")
public class DeviceEncryption extends AndroidOperation implements Serializable {
@ApiModelProperty(name = "encrypted", value = "Whether to enable encryption or not.", required = true)
private boolean encrypted;
public boolean isEncrypted() {

@ -18,11 +18,16 @@
package org.wso2.carbon.mdm.services.android.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import java.io.Serializable;
@ApiModel(value = "Disenrollment",
description = "Details related to disenrolling a device.")
public class Disenrollment extends AndroidOperation implements Serializable {
@ApiModelProperty(name = "enabled", value = "Whether to enable disenrollment or not.", required = true)
private boolean enabled;
public boolean isEnabled() {

@ -18,13 +18,19 @@
package org.wso2.carbon.mdm.services.android.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* This class represents the information of changing lock code operation.
*/
@ApiModel(value = "LockCode",
description = "Details related to lock code sent on device.")
public class LockCode extends AndroidOperation implements Serializable {
@ApiModelProperty(name = "lockCode", value = "The lock code to be sent to the device.", required = true)
private String lockCode;
public String getLockCode() {

@ -18,13 +18,19 @@
package org.wso2.carbon.mdm.services.android.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* This class represents the information of sending notification operation.
*/
@ApiModel(value = "Notification",
description = "Details related to notifications passed to device.")
public class Notification extends AndroidOperation implements Serializable {
@ApiModelProperty(name = "message", value = "The message to be sent to the device.", required = true)
private String message;
public String getMessage() {

@ -17,6 +17,8 @@
*/
package org.wso2.carbon.mdm.services.android.bean.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.mdm.services.android.bean.BlacklistApplications;
import java.util.List;
@ -24,9 +26,13 @@ import java.util.List;
/**
* This class is used to wrap the BlacklistApplications bean with devices.
*/
@ApiModel(value = "BlacklistApplicationsBeanWrapper",
description = "Mapping between blacklist application and the device ids.")
public class BlacklistApplicationsBeanWrapper {
@ApiModelProperty(name = "operation", value = "Blacklist applications information", required = true)
private BlacklistApplications operation;
@ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
private List<String> deviceIDs;
public BlacklistApplications getOperation() {

@ -17,6 +17,8 @@
*/
package org.wso2.carbon.mdm.services.android.bean.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.mdm.services.android.bean.Camera;
import java.util.List;
@ -24,9 +26,14 @@ import java.util.List;
/**
* This class is used to wrap the Camera bean with devices.
*/
@ApiModel(value = "CameraBeanWrapper",
description = "Mapping between camera operation and device list to be applied.")
public class CameraBeanWrapper {
@ApiModelProperty(name = "operation", value = "Information of camera operation", required = true)
private Camera operation;
@ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
private List<String> deviceIDs;
public Camera getOperation() {

@ -17,13 +17,18 @@
*/
package org.wso2.carbon.mdm.services.android.bean.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.mdm.services.android.bean.Disenrollment;
import java.util.List;
@ApiModel(value = "DisenrollmentBeanWrapper", description = "Disenrollment details are mapped to devices list.")
public class DisenrollmentBeanWrapper {
@ApiModelProperty(name = "operation", value = "Disenrollment operation.", required = true)
private Disenrollment operation;
@ApiModelProperty(name = "deviceIDs", value = "Device id list of the operation to be executed.", required = true)
private List<String> deviceIDs;
public Disenrollment getOperation() {

@ -17,6 +17,8 @@
*/
package org.wso2.carbon.mdm.services.android.bean.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.mdm.services.android.bean.DeviceEncryption;
import java.util.List;
@ -24,9 +26,13 @@ import java.util.List;
/**
* This class is used to wrap the Encrypt bean with devices.
*/
@ApiModel(value = "EncryptionBeanWrapper",
description = "Mapping between encryption operation and device list to be applied.")
public class EncryptionBeanWrapper {
@ApiModelProperty(name = "operation", value = "The information of encrypt operation", required = true)
private DeviceEncryption operation;
@ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
private List<String> deviceIDs;
public DeviceEncryption getOperation() {

@ -17,6 +17,8 @@
*/
package org.wso2.carbon.mdm.services.android.bean.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.mdm.services.android.bean.LockCode;
import java.util.List;
@ -24,9 +26,14 @@ import java.util.List;
/**
* This class is used to wrap the LockCode bean with devices.
*/
@ApiModel(value = "LockCodeBeanWrapper",
description = "Mapping between lock operation and device list to be applied.")
public class LockCodeBeanWrapper {
@ApiModelProperty(name = "operation", value = "The information of device lock operation", required = true)
private LockCode operation;
@ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
private List<String> deviceIDs;
public LockCode getOperation() {

@ -17,6 +17,8 @@
*/
package org.wso2.carbon.mdm.services.android.bean.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.mdm.services.android.bean.Notification;
import java.util.List;
@ -24,9 +26,14 @@ import java.util.List;
/**
* This class is used to wrap the Notification bean with devices.
*/
@ApiModel(value = "NotificationBeanWrapper",
description = "Mapping between notification operation and device list to be applied.")
public class NotificationBeanWrapper {
@ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
private List<String> deviceIDs;
@ApiModelProperty(name = "operation", value = "The information of notification operation", required = true)
private Notification operation;
public List<String> getDeviceIDs() {

@ -17,6 +17,8 @@
*/
package org.wso2.carbon.mdm.services.android.bean.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.mdm.services.android.bean.PasscodePolicy;
import java.util.List;
@ -24,9 +26,14 @@ import java.util.List;
/**
* This class is used to wrap the PasswordPolicy bean with devices.
*/
@ApiModel(value = "PasswordPolicyBeanWrapper",
description = "Mapping between passcode policy and device list to be applied.")
public class PasswordPolicyBeanWrapper {
@ApiModelProperty(name = "operation", value = "The information of setting up password policy", required = true)
private PasscodePolicy operation;
@ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
private List<String> deviceIDs;
public PasscodePolicy getOperation() {

@ -17,6 +17,8 @@
*/
package org.wso2.carbon.mdm.services.android.bean.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.mdm.services.android.bean.WebClip;
import java.util.List;
@ -24,9 +26,14 @@ import java.util.List;
/**
* This class is used to wrap the WebClip bean with devices.
*/
@ApiModel(value = "WebClipBeanWrapper",
description = "Mapping between web clip operation and device list to be applied.")
public class WebClipBeanWrapper {
@ApiModelProperty(name = "operation", value = "the information of setting up webclip", required = true)
private WebClip operation;
@ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
private List<String> deviceIDs;
public WebClip getOperation() {

@ -17,6 +17,8 @@
*/
package org.wso2.carbon.mdm.services.android.bean.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.mdm.services.android.bean.Wifi;
import java.util.List;
@ -24,9 +26,13 @@ import java.util.List;
/**
* This class is used to wrap the Wifi bean with devices.
*/
@ApiModel(value = "WifiBeanWrapper",
description = "Mapping between wifi operation and device list to be applied.")
public class WifiBeanWrapper {
@ApiModelProperty(name = "operation", value = "Information of configuring wifi operation", required = true)
private Wifi operation;
@ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
private List<String> deviceIDs;
public Wifi getOperation() {

@ -17,6 +17,8 @@
*/
package org.wso2.carbon.mdm.services.android.bean.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.mdm.services.android.bean.WipeData;
import java.util.List;
@ -24,9 +26,13 @@ import java.util.List;
/**
* This class is used to wrap the WipeData bean with devices.
*/
@ApiModel(value = "WipeDataBeanWrapper",
description = "Mapping between wipe operation and device list to be applied.")
public class WipeDataBeanWrapper {
@ApiModelProperty(name = "operation", value = "The information of wipedata operation", required = true)
private WipeData operation;
@ApiModelProperty(name = "deviceIDs", value = "List of device Ids", required = true)
private List<String> deviceIDs;
public WipeData getOperation() {

@ -77,5 +77,6 @@ public interface ConfigurationMgtService {
@ApiResponse(code = 500, message = "Error occurred while modifying configuration settings of " +
"Android platform")
})
Message updateConfiguration(TenantConfiguration configuration) throws AndroidAgentException;
Message updateConfiguration(@ApiParam(name = "configuration", value = "AndroidPlatformConfiguration")
TenantConfiguration configuration) throws AndroidAgentException;
}

@ -34,7 +34,7 @@ import java.util.List;
* All end points supports JSON, XMl with content negotiation.
*/
@Api(value = "DeviceManagementService")
@Api(value = "DeviceManagementService", description = "Android Device Management REST-API implementation.")
@WebService
@Produces({"application/json", "application/xml"})
@Consumes({"application/json", "application/xml"})

@ -30,7 +30,8 @@ import javax.ws.rs.core.MediaType;
* Android Device Enrollment REST-API implementation.
* All end points supports JSON, XMl with content negotiation.
*/
@Api(value = "EnrollmentService")
@Api(value = "EnrollmentService", description = "Android Device Enrollment REST-API implementation.")
@WebService
@Produces({"application/json", "application/xml"})
@Consumes({"application/json", "application/xml"})

@ -31,7 +31,7 @@ import java.util.List;
* Android Device Operation REST-API implementation.
*/
@Api("OperationMgtService")
@Api(value = "OperationMgtService", description = "Android Device Operation REST-API implementation.")
public interface OperationMgtService {
String ACCEPT = "Accept";

@ -28,7 +28,7 @@ import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import java.util.List;
@Api("PolicyMgtService")
@Api(value = "PolicyMgtService", description = "Policy management related REST-API implementation.")
@WebService
@Produces({"application/json", "application/xml"})
@Consumes({"application/json", "application/xml"})

Loading…
Cancel
Save