if (parameter == null) {
parameter = service.getParameter(EventingConstants.SUBSCRIPTION_MANAGER);
}
Subscription subscription = null;
if (parameter == null) {
manager = new SubscriptionManagerAdapter(serviceName);
} else {
manager = (SubscriptionManager) parameter.getValue();
}
try {
subscription = manager.getSubscription(subscriberId);
} catch (EventException e) {
String message = "Error while retrieving subscription details for " + subscriberId;
log.error(message, e);
throw new AxisFault(message, e);
}
details = new SubscriptionDTO();
if (subscription.getExpires() != null) {
details.setSubscriptionEndingTime(subscription.getExpires().getTime());
details.setSubscriptionEndString(ConverterUtil.convertToString(subscription.getExpires()));
}
details.setEpr(subscription.getAddressUrl());
details.setDiliveryMode(subscription.getDeliveryMode());
if (subscription.getSubscriptionData() != null) {
String filterVal = (String) subscription.getSubscriptionData().getProperty("filter");
if (filterVal != null) {
details.setFilterValue(filterVal);
}
String dialect = (String) subscription.getSubscriptionData().getProperty("dialect");
if (dialect != null) {
details.setDialect(dialect);
}
}
return details;