Code cleanup

revert-70aa11f8
prabathabey 10 years ago
parent 19fbc11642
commit 4638d25ff1

@ -24,7 +24,7 @@ public interface FeatureManager {
boolean addFeature(Feature feature) throws DeviceManagementException; boolean addFeature(Feature feature) throws DeviceManagementException;
boolean getFeature(String name) throws DeviceManagementException; Feature getFeature(String name) throws DeviceManagementException;
List<Feature> getFeatures() throws DeviceManagementException; List<Feature> getFeatures() throws DeviceManagementException;

@ -35,8 +35,8 @@ public interface OperationManager {
* @throws OperationManagementException If some unusual behaviour is observed while adding the * @throws OperationManagementException If some unusual behaviour is observed while adding the
* operation * operation
*/ */
public boolean addOperation(Operation operation, List<DeviceIdentifier> devices) public boolean addOperation(Operation operation,
throws OperationManagementException; List<DeviceIdentifier> devices) throws OperationManagementException;
/** /**
* Method to retrieve the list of all operations to a device. * Method to retrieve the list of all operations to a device.
@ -45,8 +45,7 @@ public interface OperationManager {
* @throws OperationManagementException If some unusual behaviour is observed while fetching the * @throws OperationManagementException If some unusual behaviour is observed while fetching the
* operation list. * operation list.
*/ */
public List<Operation> getOperations(DeviceIdentifier deviceId) public List<Operation> getOperations(DeviceIdentifier deviceId) throws OperationManagementException;
throws OperationManagementException;
/** /**
* Method to retrieve the list of available operations to a device. * Method to retrieve the list of available operations to a device.
@ -55,15 +54,6 @@ public interface OperationManager {
* @throws OperationManagementException If some unusual behaviour is observed while fetching the * @throws OperationManagementException If some unusual behaviour is observed while fetching the
* operation list. * operation list.
*/ */
public List<Operation> getPendingOperations(DeviceIdentifier deviceId) public List<Operation> getPendingOperations(DeviceIdentifier deviceId) throws OperationManagementException;
throws OperationManagementException;
/**
* TODO: Move this into a separate FeatureManager
* @param deviceType - Device type
* @return a list of Feature objects.
* @throws org.wso2.carbon.device.mgt.common.FeatureManagementException
*/
public List<Feature> getFeatures(String deviceType) throws FeatureManagementException;
} }

@ -247,9 +247,4 @@ public class DeviceManagementServiceProviderImpl implements DeviceManagementServ
return operationManager.getPendingOperations(deviceId); return operationManager.getPendingOperations(deviceId);
} }
@Override
public List<Feature> getFeatures(String deviceType) throws FeatureManagementException {
return operationManager.getFeatures(deviceType);
}
} }

@ -85,11 +85,6 @@ public class OperationManagerImpl implements OperationManager {
return null; return null;
} }
@Override
public List<Feature> getFeatures(String deviceType) throws FeatureManagementException {
return null;
}
private OperationDAO lookupOperationDAO(Operation operation) { private OperationDAO lookupOperationDAO(Operation operation) {
if (operation instanceof CommandOperation) { if (operation instanceof CommandOperation) {
return commandOperationDAO; return commandOperationDAO;

@ -127,9 +127,4 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getPendingOperations(deviceId); return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getPendingOperations(deviceId);
} }
@Override
public List<Feature> getFeatures(String deviceType) throws FeatureManagementException {
return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getFeatures(deviceType);
}
} }

Loading…
Cancel
Save