revert-70aa11f8
prabathabey 9 years ago
commit 9288e3846d

@ -52,6 +52,10 @@
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
</plugin>
<plugin> <plugin>
<groupId>org.apache.felix</groupId> <groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId> <artifactId>maven-bundle-plugin</artifactId>

@ -26,11 +26,13 @@ import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService;
import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherService; import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherService;
import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherServiceImpl; import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherServiceImpl;
/**
* @scr.component name="org.wso2.carbon.apimgt.webapp.publisher" immediate="true"
*/
public class APIPublisherServiceComponent { public class APIPublisherServiceComponent {
private static Log log = LogFactory.getLog(APIPublisherServiceComponent.class); private static Log log = LogFactory.getLog(APIPublisherServiceComponent.class);
@SuppressWarnings("unused")
protected void activate(ComponentContext componentContext) { protected void activate(ComponentContext componentContext) {
try { try {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
@ -48,7 +50,6 @@ public class APIPublisherServiceComponent {
} }
} }
@SuppressWarnings("unused")
protected void deactivate(ComponentContext componentContext) { protected void deactivate(ComponentContext componentContext) {
//do nothing //do nothing
} }

@ -77,7 +77,6 @@ public class MonitoringTask implements Task {
try { try {
DeviceManagementProviderService deviceManagementProviderService = DeviceManagementProviderService deviceManagementProviderService =
PolicyManagementDataHolder.getInstance().getDeviceManagementService(); PolicyManagementDataHolder.getInstance().getDeviceManagementService();
@ -100,15 +99,21 @@ public class MonitoringTask implements Task {
deviceType.getName()); deviceType.getName());
} }
for (Device device : devices) { for (Device device : devices) {
if (device.getEnrolmentInfo().getStatus().equals(EnrolmentInfo.Status.INACTIVE) || EnrolmentInfo.Status status = device.getEnrolmentInfo().getStatus();
device.getEnrolmentInfo().getStatus().equals(EnrolmentInfo.Status.BLOCKED)) { if (status.equals(EnrolmentInfo.Status.INACTIVE) ||
status.equals(EnrolmentInfo.Status.BLOCKED) ||
status.equals(EnrolmentInfo.Status.REMOVED) ||
status.equals(EnrolmentInfo.Status.UNCLAIMED) ||
status.equals(EnrolmentInfo.Status.DISENROLLMENT_REQUESTED) ||
status.equals(EnrolmentInfo.Status.SUSPENDED)) {
continue; continue;
} else { } else {
notifiableDevices.add(device); notifiableDevices.add(device);
} }
} }
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Following devices selected to send the notification for " + deviceType.getName()); log.debug("Following devices selected to send the notification for " +
deviceType.getName());
for (Device device : notifiableDevices) { for (Device device : notifiableDevices) {
log.debug(device.getDeviceIdentifier()); log.debug(device.getDeviceIdentifier());
} }

Loading…
Cancel
Save