Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mwallace committed Sep 29, 2015
1 parent 3c32ece commit 25c35cc
Showing 1 changed file with 29 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,33 +351,35 @@ private String getSubscriberState(){
* <p>
* @return <code>true</code> if the subscriber is entitled, <code>false</code> otherwise
*/
private boolean entitleSubscriber() {
Boolean subscriberEntitled = false;
logger.info("Entitling subscriber...");
String subscriberState = getSubscriberState();
if (!"ACTIVE".equals(subscriberState)) {
return subscriberEntitled;
}
for (SubscriptionEntitlement entitlement : entitlements) {
WeightedBSSCall<Boolean> entitleSubscriber = new EntitleSubscriber(
this.subscriberId, entitlement.getSubscriptionId(),
this.subscriberEmail);
try {
subscriberEntitled = entitleSubscriber.call();
if (subscriberEntitled == null) {
subscriberEntitled = false;
}
if (!subscriberEntitled) {
// stop when any entitle subscriber fails
logger.severe("Unable to entitle subscriber: " + subscriberState + " to subscription: " + entitlement.getPartNumber());
break;
}
} catch (Exception e) {
logger.severe(e.getClass() + " : " + e.getMessage());
}
}
return subscriberEntitled;
}
private boolean entitleSubscriber() {
Boolean subscriberEntitled = false;
logger.info("Entitling subscriber...");
String subscriberState = getSubscriberState();
if (!"ACTIVE".equals(subscriberState)) {
return subscriberEntitled;
}
for (SubscriptionEntitlement entitlement : entitlements) {
WeightedBSSCall<Boolean> entitleSubscriber = new EntitleSubscriber(
this.subscriberId, entitlement.getSubscriptionId(),
this.subscriberEmail);
try {
subscriberEntitled = entitleSubscriber.call();
if (subscriberEntitled == null) {
subscriberEntitled = false;
}
if (!subscriberEntitled) {
// stop when any entitle subscriber fails
logger.severe("Unable to entitle subscriber: "
+ subscriberState + " to subscription: "
+ entitlement.getPartNumber());
break;
}
} catch (Exception e) {
logger.severe(e.getClass() + " : " + e.getMessage());
}
}
return subscriberEntitled;
}

/**
* This method will trigger the retrieval of the subscriber by mean of invocation of the <code>call()</code> method of the <code>abstract
Expand Down

0 comments on commit 25c35cc

Please sign in to comment.