|
|
@ -1,12 +1,12 @@
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
|
|
|
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
|
|
|
* <p/>
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (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 not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
* <p/>
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
* <p/>
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
@ -26,23 +26,31 @@ import java.util.List;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public interface DeviceManagerService {
|
|
|
|
public interface DeviceManagerService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Method to retrieve the provider type that implements DeviceManagerService interface
|
|
|
|
|
|
|
|
* @return Returns provider type
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
String getProviderType();
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Method to enrolling a particular device of type mobile, IoT, etc within CDM.
|
|
|
|
* Method to enrolling a particular device of type mobile, IoT, etc within CDM.
|
|
|
|
* @param device Metadata corresponding to the device being enrolled
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param device Metadata corresponding to the device being enrolled
|
|
|
|
* @throws DeviceManagementException If some unusual behaviour is observed while enrolling a device
|
|
|
|
* @throws DeviceManagementException If some unusual behaviour is observed while enrolling a device
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void enrolDevice(Device device) throws DeviceManagementException;
|
|
|
|
void enrollDevice(Device device) throws DeviceManagementException;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Method to modify the metadata corresponding to device enrollment
|
|
|
|
* Method to modify the metadata corresponding to device enrollment
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param device Modified device enrollment related metadata
|
|
|
|
* @param device Modified device enrollment related metadata
|
|
|
|
* @throws DeviceManagementException If some unusual behaviour is observed while modify the enrollment of a
|
|
|
|
* @throws DeviceManagementException If some unusual behaviour is observed while modify the enrollment of a
|
|
|
|
* device
|
|
|
|
* device
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void modifyEnrolment(Device device) throws DeviceManagementException;
|
|
|
|
void modifyEnrollment(Device device) throws DeviceManagementException;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Method to disenroll a particular device from CDM.
|
|
|
|
* Method to disenroll a particular device from CDM.
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param type Device Type
|
|
|
|
* @param type Device Type
|
|
|
|
* @param deviceId Device Identifier
|
|
|
|
* @param deviceId Device Identifier
|
|
|
|
* @throws DeviceManagementException
|
|
|
|
* @throws DeviceManagementException
|
|
|
@ -51,6 +59,7 @@ public interface DeviceManagerService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Method to retrieve the status of the registration process of a particular device.
|
|
|
|
* Method to retrieve the status of the registration process of a particular device.
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param type Device Type
|
|
|
|
* @param type Device Type
|
|
|
|
* @param deviceId Device Identifier
|
|
|
|
* @param deviceId Device Identifier
|
|
|
|
* @return Status of enrollment
|
|
|
|
* @return Status of enrollment
|
|
|
@ -60,6 +69,7 @@ public interface DeviceManagerService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Method to retrieve the status of a particular device.
|
|
|
|
* Method to retrieve the status of a particular device.
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param type Device Type
|
|
|
|
* @param type Device Type
|
|
|
|
* @param deviceId Device Identifier
|
|
|
|
* @param deviceId Device Identifier
|
|
|
|
* @return Returns if the device is active
|
|
|
|
* @return Returns if the device is active
|
|
|
@ -70,6 +80,7 @@ public interface DeviceManagerService {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Method to set the status indicating whether a particular device registered within CDM is enabled at a given
|
|
|
|
* Method to set the status indicating whether a particular device registered within CDM is enabled at a given
|
|
|
|
* moment.
|
|
|
|
* moment.
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param status Indicates whether the device is active
|
|
|
|
* @param status Indicates whether the device is active
|
|
|
|
* @throws DeviceManagementException If some unusual behaviour is observed while enrolling a device
|
|
|
|
* @throws DeviceManagementException If some unusual behaviour is observed while enrolling a device
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -77,6 +88,7 @@ public interface DeviceManagerService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Method to retrieve metadata of all devices registered within CDM corresponding to a particular device type.
|
|
|
|
* Method to retrieve metadata of all devices registered within CDM corresponding to a particular device type.
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param type Device Type
|
|
|
|
* @param type Device Type
|
|
|
|
* @return List of metadata corresponding to all devices registered within CDM
|
|
|
|
* @return List of metadata corresponding to all devices registered within CDM
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -84,16 +96,18 @@ public interface DeviceManagerService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Method to retrieve metadata of a device corresponding to a particular type that carries a specific identifier.
|
|
|
|
* Method to retrieve metadata of a device corresponding to a particular type that carries a specific identifier.
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param type Device Type
|
|
|
|
* @param type Device Type
|
|
|
|
* @param deviceId Device Identifier
|
|
|
|
* @param deviceId Device Identifier
|
|
|
|
* @return Metadata corresponding to a particular device
|
|
|
|
* @return Metadata corresponding to a particular device
|
|
|
|
* @throws DeviceManagementException If some unusual behaviour is observed while enrolling a device
|
|
|
|
* @throws DeviceManagementException If some unusual behaviour is observed while enrolling a device
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
Device getDeviceInfo(String type, String deviceId) throws DeviceManagementException;
|
|
|
|
Device getDeviceInfo(String type, String deviceId) throws DeviceManagementException;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Method to set the ownership type of a particular device. i.e. BYOD, COPE
|
|
|
|
* Method to set the ownership type of a particular device. i.e. BYOD, COPE
|
|
|
|
* @param ownershipType Type of ownership
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param ownershipType Type of ownership
|
|
|
|
* @throws DeviceManagementException If some unusual behaviour is observed while enrolling a device
|
|
|
|
* @throws DeviceManagementException If some unusual behaviour is observed while enrolling a device
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void setOwnership(String ownershipType) throws DeviceManagementException;
|
|
|
|
void setOwnership(String ownershipType) throws DeviceManagementException;
|
|
|
|