mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Adding commit 'added java doc comments'
This commit is contained in:
parent
9e5574dccc
commit
eb12e5b9f1
@ -539,6 +539,14 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change device status.
|
||||||
|
*
|
||||||
|
* @param type Device type
|
||||||
|
* @param id Device id
|
||||||
|
* @param newsStatus Device new status
|
||||||
|
* @return {@link Response} object
|
||||||
|
*/
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/{type}/{id}/changestatus")
|
@Path("/{type}/{id}/changestatus")
|
||||||
public Response changeDeviceStatus(@PathParam("type") @Size(max = 45) String type,
|
public Response changeDeviceStatus(@PathParam("type") @Size(max = 45) String type,
|
||||||
|
|||||||
@ -310,6 +310,15 @@ public interface DeviceManagementProviderService {
|
|||||||
|
|
||||||
List<Integer> getDeviceEnrolledTenants() throws DeviceManagementException;
|
List<Integer> getDeviceEnrolledTenants() throws DeviceManagementException;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change device status.
|
||||||
|
*
|
||||||
|
* @param deviceIdentifier {@link DeviceIdentifier} object
|
||||||
|
* @param newStatus New status of the device
|
||||||
|
* @return Whether status is changed or not
|
||||||
|
* @throws DeviceManagementException on errors while trying to change device status
|
||||||
|
*/
|
||||||
boolean changeDeviceStatus(DeviceIdentifier deviceIdentifier, EnrolmentInfo.Status newStatus)
|
boolean changeDeviceStatus(DeviceIdentifier deviceIdentifier, EnrolmentInfo.Status newStatus)
|
||||||
throws DeviceManagementException;
|
throws DeviceManagementException;
|
||||||
|
|
||||||
|
|||||||
@ -84,8 +84,6 @@ import java.util.Map;
|
|||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static org.wso2.carbon.device.mgt.common.EnrolmentInfo.Status.ACTIVE;
|
|
||||||
|
|
||||||
public class DeviceManagementProviderServiceImpl implements DeviceManagementProviderService,
|
public class DeviceManagementProviderServiceImpl implements DeviceManagementProviderService,
|
||||||
PluginInitializationListener {
|
PluginInitializationListener {
|
||||||
|
|
||||||
@ -170,7 +168,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
if (deviceManager.isClaimable(deviceIdentifier)) {
|
if (deviceManager.isClaimable(deviceIdentifier)) {
|
||||||
device.getEnrolmentInfo().setStatus(EnrolmentInfo.Status.INACTIVE);
|
device.getEnrolmentInfo().setStatus(EnrolmentInfo.Status.INACTIVE);
|
||||||
} else {
|
} else {
|
||||||
device.getEnrolmentInfo().setStatus(ACTIVE);
|
device.getEnrolmentInfo().setStatus(EnrolmentInfo.Status.ACTIVE);
|
||||||
}
|
}
|
||||||
int tenantId = this.getTenantId();
|
int tenantId = this.getTenantId();
|
||||||
|
|
||||||
@ -1983,6 +1981,14 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change device status.
|
||||||
|
*
|
||||||
|
* @param deviceIdentifier {@link DeviceIdentifier} object
|
||||||
|
* @param newStatus New status of the device
|
||||||
|
* @return Whether status is changed or not
|
||||||
|
* @throws DeviceManagementException on errors while trying to change device status
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean changeDeviceStatus(DeviceIdentifier deviceIdentifier, EnrolmentInfo.Status newStatus)
|
public boolean changeDeviceStatus(DeviceIdentifier deviceIdentifier, EnrolmentInfo.Status newStatus)
|
||||||
throws DeviceManagementException {
|
throws DeviceManagementException {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user