public class RatingContextDescriptionProvider extends java.lang.Object implements RatingContextDescription
| Modifier and Type | Class and Description |
|---|---|
static class |
RatingContextDescriptionProvider.ParameterFilter |
RatingContextDescription.AllowanceFlag, RatingContextDescription.IPropertyFilterACCOUNT_EVENT_DATE, ACCOUNT_STATE, ACTIVATION_DATE, AGREEMENT_CANCELLATION_DATE, AGREEMENT_EFFECTIVE_DATE, AGREEMENT_ENDCOMMITMENT_DATE, AGREEMENT_RESUMPTION_DATE, AGREEMENT_SUSPENSION_DATE, ALLOWANCE_CREATION_DATE, ALLOWANCE_END_DATE, ALLOWANCE_PRE_END_DATE, ALLOWANCE_PRE_START_DATE, ALLOWANCE_SHARE_IDENTIFIER, ALLOWANCE_START_DATE, ALLOWANCE_UNIQUE_IDENTIFIER, BALANCE_AMOUNT, BASE_AMOUNT, BASE_CURRENCY_CODE, BASE_ISO_CURRENCY_CODE, BLOCKED_DATE, CHARGE_DESCRIPTION, CI_NAME, CLOSED_DATE, CONSUMPTION_DATE, CONTRACT_ID, CONTRACT_ITEM_EXTERNAL_ID, CONTRACT_ITEM_ID, CURRENCY_CODE, DATE_MAX_VALUE, DEPENDENT_TYPE, EMPTY_LIMIT, ENUMERATION, ENUMERATION_CLASS, ENUMERATION_TYPE, INTERNAL_ENUMERATION, ISO_CURRENCY_CODE, LOCKED_DATE, MASTER_TYPE, NOT_PRORATED, NOT_REFUNDED, PRICE_PLAN_NAME, PRICING_MACRO_TYPE, PRODUCT_CODE, PRORATED, RECURRING_PREPAID_TYPE, RECURRING_PRORATA, RECURRING_REFUND, RECURRING_START, RECURRING_START_REF, RECURRING_STOP, RECURRING_STOP_REF, REFILL_AMOUNT_PROPERTY_NAME, REFILL_CURRENCY_PROPERTY_NAME, REFILL_DATE, REFILL_ISO_CURRENCY_PROPERTY_NAME, REFUNDED, RESTRICTION, SERVICE_ID, THRESHOLD_AMOUNT, TRIGGERING_CONTRACT_ID, TRIGGERING_CONTRACT_ITEM_EXTERNAL_ID, UNROUNDED_AMOUNT, USER_SERVICE_ID| Constructor and Description |
|---|
RatingContextDescriptionProvider() |
RatingContextDescriptionProvider(java.lang.String relationType)
Constructs a rating context description provider
with a specified business relationship type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addProductCIDescription(QualifiedChargeableItemDescription cid) |
void |
addUsedCIDescriptionForCharging(QualifiedChargeableItemDescription cid) |
void |
addUsedCIDescriptionForRating(QualifiedChargeableItemDescription cid) |
static boolean |
areTypesEqual(PropertyDescriptionModel pd,
int type,
boolean strict)
Returns whether a specified property description type is equal to a specified type.
|
java.util.List<QualifiedChargeableItemDescription> |
availableCINamesForCharging(java.lang.String ciName)
Returns a list of
QualifiedChargeableItemDescription. |
java.util.Vector<QualifiedChargeableItemDescription> |
availableCINamesForRating(java.lang.String ciName)
Returns a list of
QualifiedChargeableItemDescription. |
void |
clean()
Cleans the context.
|
void |
cleanAllChargeableItemClassCodes()
Clean the cache of Chargeable Item Description or Class used by the method
RatingContextDescription.getAllChargeableItemClassCodes(). |
java.util.Vector<PropertyDescriptionModel> |
getAllAvailableFullNamedProperties()
Gets all properties from all categories.
|
java.util.List<SearchCodeResult.ObjectCode> |
getAllChargeableItemClassCodes() |
com.highdeal.allowance.allowanceeventclass.hci.AllowanceEventClassModel |
getAllowanceEventClass(java.lang.String ecName) |
RatingContextDescription.AllowanceFlag |
getAllowanceFlag()
Gets the use allowance flag.
|
java.util.List<java.lang.String> |
getAvailableEventNames()
Returns a vector of strings representing the default events
that a type of relationship can produce.
|
java.util.List<PropertyDescriptionModel> |
getAvailableFullNamedProperties(RatingContextDescription.IPropertyFilter filter)
Gets all property descriptions that matches the filter.
|
java.util.List<java.lang.String> |
getAvailablePropertyNames(int propertyType)
Gets all properties of the specified type.
|
java.util.List<java.lang.String> |
getAvailablePropertyNames(int propertyType,
boolean strict)
Gets all properties of the specified type.
|
java.util.List<java.lang.String> |
getAvailablePropertyNames(int propertyType,
java.util.List<AdditionalInfoModel> criteria)
Gets all properties of the specified type and matching the given criteria.
|
java.util.List<java.lang.String> |
getAvailablePropertyNames(int propertyType,
java.lang.String category)
Gets all properties of the specified type and category.
|
java.util.List<java.lang.String> |
getAvailablePropertyNames(int propertyType,
java.lang.String category,
java.util.List<AdditionalInfoModel> criteria)
Gets the name of all properties of the specified type and category
of which the additional information matches the given one.
|
java.util.List<java.lang.String> |
getAvailablePropertyNames(RatingContextDescription.IPropertyFilter filter)
Gets all property names that matches the filter.
|
java.util.Vector<java.lang.String> |
getAvailablePropertyNames(java.lang.String category)
Gets all property names from a category.
|
ChargeableItemDescriptionModel |
getCIDescriptionFor(java.lang.Object objectCodeParam) |
java.lang.String |
getCurrencyCode()
Gets the currency code.
|
java.util.List<PropertyDescriptionModel> |
getDefaultPropertyDescriptions()
Returns the descriptions for the default properties used by the rating process.
|
java.util.List<PropertyDescriptionModel> |
getDefaultPropertyDescriptionsForRefill()
Returns the descriptions for the default properties used by the refilling process.
|
static java.util.List<PropertyDescriptionModel> |
getDefaultStaticPropertyDescriptions() |
static java.util.List<PropertyDescriptionModel> |
getDefaultStaticPropertyDescriptionsForRefill() |
static DetailCategory |
getInitialPrefixedName(DetailCategory fromCategory) |
static DetailCategory |
getInitialPrefixedName(java.lang.String propertyFullName) |
boolean |
getIsAllowanceFlag()
Returns true if charge component is an allowance logic (shared or not).
|
boolean |
getIsContractFlag()
Returns true if charge component uses charging contract.
|
SearchCodeResult.ObjectCode |
getObjectCodeFor(UsageChargeModel model) |
SearchCodeResult.ObjectCode |
getObjectCodeFor(UsageRateModel model) |
SearchCodeResult.ObjectCode |
getObjectCodeForCI(java.lang.String ciName,
java.util.List<ProductModel> products) |
java.lang.String |
getOneShotTriggerName() |
PropertyDescriptionModel |
getPropertyByName(java.lang.String longPropertyName)
Returns the description of the property by this full name.
|
java.lang.String |
getRelationType()
Gets the relation type.
|
SharedObjectsRetriever |
getSharedObjectsRetriever() |
static java.lang.String |
getUnprefixedName(java.lang.String propertyFullName) |
boolean |
isAllowanceEventClassValid(java.lang.String ecName)
Returns true if the Allowance Event Class exists.
|
boolean |
isChargeableItemClassValid(java.lang.Object objectCode)
Returns true if the Chargeable item is a valid one.
|
boolean |
isCIValid(java.lang.String ciName)
Returns true if the Chargeable item is a valid one.
|
boolean |
isEventValid(java.lang.String eventName)
Returns true if the event name is a valid one.
|
boolean |
isPropagationSensitive() |
boolean |
isPropertyValid(java.lang.String propertyName,
DetailCategory category)
Tests if a property from a category is valid.
|
boolean |
isPropertyValid(java.lang.String longPropertyName,
int type)
Test if a property from a category is valid, without taking any restriction into account.
|
boolean |
isPropertyValid(java.lang.String longPropertyName,
int type,
boolean strict)
Test if a property from a category is valid.
|
boolean |
isRefillItemValid(java.lang.String riName)
Returns true if the Refill Item Class exists.
|
static boolean |
isVisible(java.lang.String propertyName)
Returns whether a specified property name is linked to a visible property.
|
void |
setAllowanceFlag(RatingContextDescription.AllowanceFlag flag)
Sets the use allowance flag.
|
void |
setCurrencyCode(java.lang.String code)
Sets the currency code.
|
void |
setIsContractFlag(boolean flag)
Sets the use charging contract flag.
|
void |
setObjectCodeFor(UsageChargeModel model,
java.lang.Object objectCode) |
void |
setObjectCodeFor(UsageRateModel model,
java.lang.Object objectCode) |
void |
setOneShotTriggerName(java.lang.String oneShotTriggerName) |
void |
setPropertyDescription(PropertyDescriptionModel pd,
DetailCategory category)
Adds a property with its description to the context.
|
void |
setPropertyDescription(java.lang.String name,
int type,
DetailCategory category)
Adds a property with its description to the context.
|
void |
setPropertyDescription(java.lang.String name,
int type,
DetailCategory category,
java.util.List<AdditionalInfoModel> additionalInfo)
Adds a property with its description to the context.
|
void |
setRelationType(java.lang.String type)
Sets the relation type.
|
void |
setSharedObjectsRetriever(SharedObjectsRetriever retriever) |
public RatingContextDescriptionProvider()
public RatingContextDescriptionProvider(java.lang.String relationType)
relationType - the type of the business relationship.public void clean()
RatingContextDescriptionclean in interface RatingContextDescriptionpublic java.lang.String getCurrencyCode()
RatingContextDescriptiongetCurrencyCode in interface RatingContextDescriptionpublic void setCurrencyCode(java.lang.String code)
RatingContextDescriptionsetCurrencyCode in interface RatingContextDescriptioncode - The currency codepublic boolean getIsContractFlag()
RatingContextDescriptiongetIsContractFlag in interface RatingContextDescriptiontrue if charge component uses charging contract, false otherwise.public void setIsContractFlag(boolean flag)
RatingContextDescriptionsetIsContractFlag in interface RatingContextDescriptionflag - The flag to define if charge component uses charging contractpublic boolean getIsAllowanceFlag()
RatingContextDescriptiongetIsAllowanceFlag in interface RatingContextDescriptionpublic void setAllowanceFlag(RatingContextDescription.AllowanceFlag flag)
RatingContextDescriptionsetAllowanceFlag in interface RatingContextDescriptionflag - the flag to define if charge component is an allowance component.public RatingContextDescription.AllowanceFlag getAllowanceFlag()
RatingContextDescriptiongetAllowanceFlag in interface RatingContextDescriptionpublic void setPropertyDescription(java.lang.String name,
int type,
DetailCategory category)
RatingContextDescriptionagreement_creation_date,
agreement_cancellation_date,
agreement_suspension_date,
agreement_cancellation_date,
agreement_end_commitment_date,
price_plan_name,
charge_description,
base_amount,
base_currency_code,
product_code,
ci_name,
consumption_date,
access_login,
service_identifier,
recurring_start,
recurring_stop,
recurring_start_ref,
recurring_stop_ref,
recurring_prorata,
activation_date,
unrounded_amountnumber,
string,
datesetPropertyDescription in interface RatingContextDescriptionname - The property nametype - The property typecategory - The category of the propertypublic void setPropertyDescription(java.lang.String name,
int type,
DetailCategory category,
java.util.List<AdditionalInfoModel> additionalInfo)
RatingContextDescriptionagreement_creation_date,
agreement_cancellation_date,
agreement_suspension_date,
agreement_cancellation_date,
agreement_end_commitment_date,
price_plan_name,
charge_description,
base_amount,
base_currency_code,
product_code,
ci_name,
consumption_date,
access_login,
service_identifier,
recurring_start,
recurring_stop,
recurring_start_ref,
recurring_stop_ref,
recurring_prorata,
activation_date,
unrounded_amountnumber,
string,
datesetPropertyDescription in interface RatingContextDescriptionname - The property nametype - The property typecategory - The category of the propertyadditionalInfo - The additional information of the property.
Passing in null is equivalent to passing in an empty list.public void setPropertyDescription(PropertyDescriptionModel pd, DetailCategory category)
RatingContextDescriptionsetPropertyDescription for allowed categories.setPropertyDescription in interface RatingContextDescriptionpd - The property descriptioncategory - The category of the propertypublic java.util.List<java.lang.String> getAvailablePropertyNames(RatingContextDescription.IPropertyFilter filter)
RatingContextDescriptiongetAvailablePropertyNames in interface RatingContextDescriptionfilter - The filter that describes the constraints to checkpublic java.util.List<java.lang.String> getAvailablePropertyNames(int propertyType,
boolean strict)
RatingContextDescriptionsetPropertyDescription for allowed types.getAvailablePropertyNames in interface RatingContextDescriptionpropertyType - the type of the property.strict - true if the types must be strictly equal.public java.util.List<java.lang.String> getAvailablePropertyNames(int propertyType)
RatingContextDescriptionsetPropertyDescription for allowed types.getAvailablePropertyNames in interface RatingContextDescriptionpropertyType - The type of the propertypublic java.util.List<java.lang.String> getAvailablePropertyNames(int propertyType,
java.util.List<AdditionalInfoModel> criteria)
RatingContextDescriptionsetPropertyDescription for allowed types.getAvailablePropertyNames in interface RatingContextDescriptionpropertyType - The type of the propertycriteria - The additional information that must be present in the returned property description modelspublic java.util.Vector<java.lang.String> getAvailablePropertyNames(java.lang.String category)
RatingContextDescriptionsetPropertyDescription for allowed categories.getAvailablePropertyNames in interface RatingContextDescriptioncategory - the category of the property.public java.util.List<java.lang.String> getAvailablePropertyNames(int propertyType,
java.lang.String category,
java.util.List<AdditionalInfoModel> criteria)
RatingContextDescriptionsetPropertyDescription for allowed types.
see setPropertyDescription for allowed categories.getAvailablePropertyNames in interface RatingContextDescriptionpropertyType - the type of the property.category - the category of the property.criteria - the additional information that must be present in the returned property description models.property description models.public java.util.List<java.lang.String> getAvailablePropertyNames(int propertyType,
java.lang.String category)
RatingContextDescriptionsetPropertyDescription for allowed types.
see setPropertyDescription for allowed categories.getAvailablePropertyNames in interface RatingContextDescriptionpropertyType - the type of the property.category - the category of the property.public java.util.List<PropertyDescriptionModel> getAvailableFullNamedProperties(RatingContextDescription.IPropertyFilter filter)
RatingContextDescriptiongetAvailableFullNamedProperties in interface RatingContextDescriptionfilter - The filter that describes the constraints to checkpublic java.util.Vector<PropertyDescriptionModel> getAllAvailableFullNamedProperties()
RatingContextDescriptiongetAllAvailableFullNamedProperties in interface RatingContextDescriptionproperty description model.public boolean isPropertyValid(java.lang.String propertyName,
DetailCategory category)
RatingContextDescriptionsetPropertyDescription for allowed categories and names.isPropertyValid in interface RatingContextDescriptionpropertyName - the property name.category - the category of the property.public boolean isPropertyValid(java.lang.String longPropertyName,
int type,
boolean strict)
RatingContextDescriptionsetPropertyDescription for allowed types and names.isPropertyValid in interface RatingContextDescriptionlongPropertyName - the property name.type - the property type.strict - true if the types must be strictly equal.public boolean isPropertyValid(java.lang.String longPropertyName,
int type)
RatingContextDescriptionsetPropertyDescription for allowed types and names.isPropertyValid in interface RatingContextDescriptionlongPropertyName - the property name.type - the property type.public PropertyDescriptionModel getPropertyByName(java.lang.String longPropertyName)
RatingContextDescriptionnull is returned if there is no property by this name.getPropertyByName in interface RatingContextDescriptionlongPropertyName - full name of the property looked fornull if there is nonepublic java.util.List<SearchCodeResult.ObjectCode> getAllChargeableItemClassCodes()
getAllChargeableItemClassCodes in interface RatingContextDescriptionpublic void cleanAllChargeableItemClassCodes()
RatingContextDescriptionRatingContextDescription.getAllChargeableItemClassCodes().cleanAllChargeableItemClassCodes in interface RatingContextDescriptionpublic SearchCodeResult.ObjectCode getObjectCodeForCI(java.lang.String ciName, java.util.List<ProductModel> products)
getObjectCodeForCI in interface RatingContextDescriptionpublic SearchCodeResult.ObjectCode getObjectCodeFor(UsageRateModel model)
getObjectCodeFor in interface RatingContextDescriptionpublic void setObjectCodeFor(UsageRateModel model, java.lang.Object objectCode)
setObjectCodeFor in interface RatingContextDescriptionobjectCode - is an ObjectCodepublic SearchCodeResult.ObjectCode getObjectCodeFor(UsageChargeModel model)
getObjectCodeFor in interface RatingContextDescriptionpublic void setObjectCodeFor(UsageChargeModel model, java.lang.Object objectCode)
setObjectCodeFor in interface RatingContextDescriptionobjectCode - Is an ObjectCodepublic ChargeableItemDescriptionModel getCIDescriptionFor(java.lang.Object objectCodeParam)
getCIDescriptionFor in interface RatingContextDescriptionobjectCodeParam - Is an ObjectCode (of a Chargeable Item Description or Class)public void addProductCIDescription(QualifiedChargeableItemDescription cid)
addProductCIDescription in interface RatingContextDescriptionpublic void addUsedCIDescriptionForRating(QualifiedChargeableItemDescription cid)
addUsedCIDescriptionForRating in interface RatingContextDescriptionpublic void addUsedCIDescriptionForCharging(QualifiedChargeableItemDescription cid)
addUsedCIDescriptionForCharging in interface RatingContextDescriptionpublic java.util.Vector<QualifiedChargeableItemDescription> availableCINamesForRating(java.lang.String ciName)
QualifiedChargeableItemDescription.availableCINamesForRating in interface RatingContextDescriptionciName - QualifiedChargeableItemDescription.public java.util.List<QualifiedChargeableItemDescription> availableCINamesForCharging(java.lang.String ciName)
QualifiedChargeableItemDescription.availableCINamesForCharging in interface RatingContextDescriptionciName - QualifiedChargeableItemDescription.public java.util.List<java.lang.String> getAvailableEventNames()
getAvailableEventNames in interface RatingContextDescriptionpublic boolean isEventValid(java.lang.String eventName)
RatingContextDescriptionisEventValid in interface RatingContextDescriptioneventName - the name of the event.public boolean isCIValid(java.lang.String ciName)
RatingContextDescriptionisCIValid in interface RatingContextDescriptionciName - a Chargeable item name.public boolean isChargeableItemClassValid(java.lang.Object objectCode)
RatingContextDescriptionisChargeableItemClassValid in interface RatingContextDescriptionobjectCode - the code of a Chargeable item .public boolean isRefillItemValid(java.lang.String riName)
RatingContextDescriptionisRefillItemValid in interface RatingContextDescriptionriName - a Refill Item Class name.public boolean isPropagationSensitive()
isPropagationSensitive in interface RatingContextDescriptionpublic void setSharedObjectsRetriever(SharedObjectsRetriever retriever)
setSharedObjectsRetriever in interface RatingContextDescriptionpublic SharedObjectsRetriever getSharedObjectsRetriever()
getSharedObjectsRetriever in interface RatingContextDescriptionpublic java.lang.String getRelationType()
RatingContextDescriptiongetRelationType in interface RatingContextDescriptionpublic void setRelationType(java.lang.String type)
RatingContextDescriptionsetRelationType in interface RatingContextDescriptiontype - the relation type.
Allowed values are :
public static java.lang.String getUnprefixedName(java.lang.String propertyFullName)
public static DetailCategory getInitialPrefixedName(java.lang.String propertyFullName)
public static DetailCategory getInitialPrefixedName(DetailCategory fromCategory)
public java.util.List<PropertyDescriptionModel> getDefaultPropertyDescriptions()
PropertyDescriptionModel.getDefaultPropertyDescriptions in interface RatingContextDescriptionproperty description models.public static java.util.List<PropertyDescriptionModel> getDefaultStaticPropertyDescriptions()
public java.util.List<PropertyDescriptionModel> getDefaultPropertyDescriptionsForRefill()
PropertyDescriptionModel.getDefaultPropertyDescriptionsForRefill in interface RatingContextDescriptionproperty description models.public static java.util.List<PropertyDescriptionModel> getDefaultStaticPropertyDescriptionsForRefill()
public static boolean areTypesEqual(PropertyDescriptionModel pd, int type, boolean strict)
pd - The property description to check.type - The type to compare to.strict - true if the types must be strictly equal.public static boolean isVisible(java.lang.String propertyName)
propertyName - The property name to check.public boolean isAllowanceEventClassValid(java.lang.String ecName)
RatingContextDescriptionisAllowanceEventClassValid in interface RatingContextDescriptionecName - a Allowance Event Class name.public com.highdeal.allowance.allowanceeventclass.hci.AllowanceEventClassModel getAllowanceEventClass(java.lang.String ecName)
getAllowanceEventClass in interface RatingContextDescriptionecName - a Allowance Event Class name.public java.lang.String getOneShotTriggerName()
getOneShotTriggerName in interface RatingContextDescriptionpublic void setOneShotTriggerName(java.lang.String oneShotTriggerName)
setOneShotTriggerName in interface RatingContextDescription