com.tle.core.payment.scripting.objects
Interface PricingTierScriptObject
Declaration: public interface PricingTierScriptObject extends ScriptObject
All Superinterfaces: ScriptObject, java.io.Serializable

 

Referenced by the 'tier' variable in script

 

 

Fields Summary
static java.lang.String DEFAULT_VARIABLE
    

 

 

Methods Summary
abstract PurchaseTierScriptType[] getAllPurchaseTiers()
    
Same as listAllPurchaseTiers, but an array is returned
abstract SubscriptionTierScriptType[] getAllSubscriptionTiers()
    
Same as listAllSubscriptionTiers, but an array is returned
abstract PurchaseTierScriptType getPurchaseTier()
    
abstract PurchaseTierScriptType getPurchaseTier(ItemScriptType item)
    
abstract PurchaseTierScriptType getPurchaseTier(java.lang.String uuid)
    
Get a purchase tier by UUID
abstract SubscriptionTierScriptType getSubscriptionTier()
    
abstract SubscriptionTierScriptType getSubscriptionTier(ItemScriptType item)
    
abstract SubscriptionTierScriptType getSubscriptionTier(java.lang.String uuid)
    
Get a subscription tier by UUID
abstract boolean isFreeAllowed()
    
abstract boolean isFreeAllowed(ItemScriptType item)
    
Determine if an item is allowed to be obtained for free
abstract boolean isFreeEnabled()
    
abstract boolean isPurchaseEnabled()
    
abstract boolean isSubscriptionEnabled()
    
abstract java.util.List<PurchaseTierScriptType> listAllPurchaseTiers()
    
List all available purchase tiers
abstract java.util.List<SubscriptionTierScriptType> listAllSubscriptionTiers()
    
List all available subscription tiers
abstract void setFreeAllowed(boolean free)
    
abstract void setFreeAllowed(ItemScriptType item, boolean free)
    
Allow an item to be obtained for free
abstract void setPurchaseTier(ItemScriptType item, PurchaseTierScriptType tier)
    
Assign a purchase tier to an item
abstract void setPurchaseTier(PurchaseTierScriptType tier)
    
Sets the assigned purchase tier of the current item
abstract void setPurchaseTierByUuid(java.lang.String purchaseTierUuid)
    
Sets the assigned purchase tier of the current item
abstract void setSubscriptionTier(ItemScriptType item, SubscriptionTierScriptType tier)
    
abstract void setSubscriptionTier(SubscriptionTierScriptType tier)
    
Sets the assigned subscription tier of the current item
abstract void setSubscriptionTierByUuid(java.lang.String subscriptionTierUuid)
    
Sets the assigned subscription tier of the current item

 

Methods inherited from interface: com.tle.common.scripting.ScriptObject
scriptEnter, scriptExit

 

 

 

 

DEFAULT_VARIABLE

 

public static final java.lang.String DEFAULT_VARIABLE

 

See also: Constants

 

 

 

 

listAllPurchaseTiers

 

public abstract java.util.List<PurchaseTierScriptType> listAllPurchaseTiers( )

 

List all available purchase tiers

 

Returns:
A list of enabled PurchaseTierScriptType

 

 

 

listAllSubscriptionTiers

 

public abstract java.util.List<SubscriptionTierScriptType> listAllSubscriptionTiers( )

 

List all available subscription tiers

 

Returns:
A list of enabled SubscriptionTierScriptType

 

 

 

getAllPurchaseTiers

 

public abstract PurchaseTierScriptType[] getAllPurchaseTiers( )

 

Same as listAllPurchaseTiers, but an array is returned

 

Returns:
An array of PurchaseTierScriptType which can be assigned to this item

 

 

 

getAllSubscriptionTiers

 

public abstract SubscriptionTierScriptType[] getAllSubscriptionTiers( )

 

Same as listAllSubscriptionTiers, but an array is returned

 

Returns:
An array of SubscriptionTierScriptType which can be assigned to this item

 

 

 

getPurchaseTier

 

public abstract PurchaseTierScriptType getPurchaseTier( java.lang.String uuid)

 

Get a purchase tier by UUID

 

Parameters:
uuid-
The uuid of a purchase tier
Returns:
The purchase tier with the supplied uuid, or null if no match

 

 

 

getSubscriptionTier

 

public abstract SubscriptionTierScriptType getSubscriptionTier( java.lang.String uuid)

 

Get a subscription tier by UUID

 

Parameters:
uuid-
The uuid of a subscription tier
Returns:
The subscription tier with the supplied uuid, or null if no match

 

 

 

getPurchaseTier

 

public abstract PurchaseTierScriptType getPurchaseTier( )

 

Returns:
The assigned purchase tier of the current item, or null if none assigned

 

 

 

setPurchaseTier

 

public abstract void setPurchaseTier( PurchaseTierScriptType tier)

 

Sets the assigned purchase tier of the current item

 

Parameters:
tier-
The purchase tier to assign

 

 

 

setPurchaseTierByUuid

 

public abstract void setPurchaseTierByUuid( java.lang.String purchaseTierUuid)

 

Sets the assigned purchase tier of the current item

 

Parameters:
purchaseTierUuid-
The UUID of the purchase tier to assign

 

 

 

getSubscriptionTier

 

public abstract SubscriptionTierScriptType getSubscriptionTier( )

 

Returns:
The assigned subscription tier of the current item, or null if none assigned

 

 

 

setSubscriptionTier

 

public abstract void setSubscriptionTier( SubscriptionTierScriptType tier)

 

Sets the assigned subscription tier of the current item

 

Parameters:
tier-
The subscription tier to assign

 

 

 

setSubscriptionTierByUuid

 

public abstract void setSubscriptionTierByUuid( java.lang.String subscriptionTierUuid)

 

Sets the assigned subscription tier of the current item

 

Parameters:
subscriptionTierUuid-
The UUID of the subscription tier to assign

 

 

 

isFreeAllowed

 

public abstract boolean isFreeAllowed( )

 

Returns:
true if the current item is allowed to be obtained for free

 

 

 

setFreeAllowed

 

public abstract void setFreeAllowed( boolean free)

 

Parameters:
free-
The current item is allowed to be obtained for free

 

 

 

setPurchaseTier

 

public abstract void setPurchaseTier( ItemScriptType item,
PurchaseTierScriptType tier)

 

Assign a purchase tier to an item

 

Parameters:
item-
The item to assign the tier to
tier-
The purchase tier to assign to the item

 

 

 

getPurchaseTier

 

public abstract PurchaseTierScriptType getPurchaseTier( ItemScriptType item)

 

Parameters:
item-
The item to obtain the assigned purchase tier of
Returns:
The purchase tier assigned to the supplied item, or null if none assigned

 

 

 

setSubscriptionTier

 

public abstract void setSubscriptionTier( ItemScriptType item,
SubscriptionTierScriptType tier)

 

Parameters:
item-
The item to assign the tier to
tier-
The subscription tier to assign to the item

 

 

 

getSubscriptionTier

 

public abstract SubscriptionTierScriptType getSubscriptionTier( ItemScriptType item)

 

Parameters:
item-
The item to obtain the assigned subscription tier of
Returns:
The subscription tier assigned to the supplied item, or null if none assigned

 

 

 

setFreeAllowed

 

public abstract void setFreeAllowed( ItemScriptType item,
boolean free)

 

Allow an item to be obtained for free

 

Parameters:
item-
The item to assign the free option to
free-
Supplied item is allowed to be obtained for free

 

 

 

isFreeAllowed

 

public abstract boolean isFreeAllowed( ItemScriptType item)

 

Determine if an item is allowed to be obtained for free

 

Parameters:
item-
The item to read the free option of
Returns:
true if the supplied item is allowed to be obtained for free

 

 

 

isFreeEnabled

 

public abstract boolean isFreeEnabled( )

 

Returns:
The value of the global setting that determines if 'free' is an assignable option

 

 

 

isPurchaseEnabled

 

public abstract boolean isPurchaseEnabled( )

 

Returns:
The value of the global setting that determines if purchase tiers are an assignable option

 

 

 

isSubscriptionEnabled

 

public abstract boolean isSubscriptionEnabled( )

 

Returns:
The value of the global setting that determines if subscription tiers are an assignable option