Ejemplo n.º 1
0
 /**
  * Get the count of the number of used slots.
  *
  * @return Long count, null if unlimited
  */
 public Long getCurrentEntitlements() {
   Long count = EntitlementManager.getUsedEntitlements(this.getEntitlement(), org);
   if (count == null) {
     return new Long(0);
   }
   return count;
 }
Ejemplo n.º 2
0
 /**
  * @return upper range for which a org can get entitlements (org1 max - org1 consumed + org max)
  */
 public Long getUpperRange() {
   Long defaultMax =
       EntitlementManager.getMaxEntitlements(this.getEntitlement(), OrgFactory.getSatelliteOrg());
   Long defaultCur =
       EntitlementManager.getUsedEntitlements(this.getEntitlement(), OrgFactory.getSatelliteOrg());
   Long upper = getMaxEntitlements() + (defaultMax - defaultCur);
   return upper;
 }