/** @return max members for this entitlement */ public Long getMaxEntitlements() { Long count = EntitlementManager.getMaxEntitlements(this.getEntitlement(), org); if (count == null) { return new Long(0); } return count; }
/** * @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; }