Skip to main content
Version: 1.4.0

UsageLimit

This abstract class models the information of an usageLimit.

public abstract class UsageLimit {
private String name;
private String description;
private ValueType valueType;
private Object defaultValue;
protected UsageLimitType type;
private String unit;
private transient Object value;
private List<String> linkedFeatures = new ArrayList<>();
private String expression;
private String serverExpression;

// Getters and setters...

public boolean isLinkedToFeature(String featureName);

// Extra methods...
}

The method isLinkedToFeature can be used to check if the feature whose name is received as parameter is linked to the usageLimit.

Besides, each usage limit type supported by Yaml4SaaS is represented by a class that extends this abstract one. The following list shows the classes that extend Feature:

  • NonRenewable
  • Renewable
  • ResponseDriven
  • TimeDriven