|
|
@ -25,12 +25,17 @@ import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManage
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* This is the default implementation for the Subscription Manager.
|
|
|
|
|
|
|
|
*/
|
|
|
|
public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
|
|
|
|
|
|
|
private static final Log log = LogFactory.getLog(SubscriptionManagerImpl.class);
|
|
|
|
private static final Log log = LogFactory.getLog(SubscriptionManagerImpl.class);
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceIdentifier> installApplicationForDevices(String applicationUUID, List<DeviceIdentifier> deviceList) throws ApplicationManagementException {
|
|
|
|
public List<DeviceIdentifier> installApplicationForDevices(String applicationUUID,
|
|
|
|
|
|
|
|
List<DeviceIdentifier> deviceList)
|
|
|
|
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
log.info("Install application: " + applicationUUID + " to: " + deviceList.size() + " devices.");
|
|
|
|
log.info("Install application: " + applicationUUID + " to: " + deviceList.size() + " devices.");
|
|
|
|
for (DeviceIdentifier device : deviceList) {
|
|
|
|
for (DeviceIdentifier device : deviceList) {
|
|
|
|
String deviceId = device.getId();
|
|
|
|
String deviceId = device.getId();
|
|
|
@ -42,7 +47,8 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<String> installApplicationForUsers(String applicationUUID, List<String> userList) throws ApplicationManagementException {
|
|
|
|
public List<String> installApplicationForUsers(String applicationUUID, List<String> userList)
|
|
|
|
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
log.info("Install application: " + applicationUUID + " to: " + userList.size() + " users.");
|
|
|
|
log.info("Install application: " + applicationUUID + " to: " + userList.size() + " users.");
|
|
|
|
for (String user : userList) {
|
|
|
|
for (String user : userList) {
|
|
|
|
//Todo: implementation
|
|
|
|
//Todo: implementation
|
|
|
@ -51,7 +57,8 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<String> installApplicationForRoles(String applicationUUID, List<String> roleList) throws ApplicationManagementException {
|
|
|
|
public List<String> installApplicationForRoles(String applicationUUID, List<String> roleList)
|
|
|
|
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
log.info("Install application: " + applicationUUID + " to: " + roleList.size() + " users.");
|
|
|
|
log.info("Install application: " + applicationUUID + " to: " + roleList.size() + " users.");
|
|
|
|
for (String role : roleList) {
|
|
|
|
for (String role : roleList) {
|
|
|
|
//Todo: implementation
|
|
|
|
//Todo: implementation
|
|
|
@ -60,7 +67,9 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceIdentifier> uninstallApplication(String applicationUUID, List<DeviceIdentifier> deviceList) throws ApplicationManagementException {
|
|
|
|
public List<DeviceIdentifier> uninstallApplication(String applicationUUID,
|
|
|
|
|
|
|
|
List<DeviceIdentifier> deviceList)
|
|
|
|
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|