public class RatingContextDescriptionProvider extends Object implements RatingContextDescription
| Modifier and Type | Class and Description |
|---|---|
static class |
RatingContextDescriptionProvider.ParameterFilter |
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_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, 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(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.
|
List<QualifiedChargeableItemDescription> |
availableCINamesForCharging(String ciName)
Returns a list of
QualifiedChargeableItemDescription. |
Vector<QualifiedChargeableItemDescription> |
availableCINamesForRating(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(). |
Vector<PropertyDescriptionModel> |
getAllAvailableFullNamedProperties()
Gets all properties from all categories.
|
List<SearchCodeResult.ObjectCode> |
getAllChargeableItemClassCodes() |
com.highdeal.allowance.allowanceeventclass.hci.AllowanceEventClassModel |
getAllowanceEventClass(String ecName) |
List<String> |
getAvailableEventNames()
Returns a vector of strings representing the default events
that a type of relationship can produce.
|
List<PropertyDescriptionModel> |
getAvailableFullNamedProperties(RatingContextDescription.IPropertyFilter filter)
Gets all property descriptions that matches the filter.
|
List<String> |
getAvailablePropertyNames(int propertyType)
Gets all properties of the specified type.
|
List<String> |
getAvailablePropertyNames(int propertyType,
boolean strict)
Gets all properties of the specified type.
|
List<String> |
getAvailablePropertyNames(int propertyType,
List<AdditionalInfoModel> criteria)
Gets all properties of the specified type and matching the given criteria.
|
List<String> |
getAvailablePropertyNames(int propertyType,
String category)
Gets all properties of the specified type and category.
|
List<String> |
getAvailablePropertyNames(int propertyType,
String category,
List<AdditionalInfoModel> criteria)
Gets the name of all properties of the specified type and category
of which the additional information matches the given one.
|
List<String> |
getAvailablePropertyNames(RatingContextDescription.IPropertyFilter filter)
Gets all property names that matches the filter.
|
Vector<String> |
getAvailablePropertyNames(String category)
Gets all property names from a category.
|
ChargeableItemDescriptionModel |
getCIDescriptionFor(Object objectCodeParam) |
String |
getCurrencyCode()
Gets the currency code.
|
List<PropertyDescriptionModel> |
getDefaultPropertyDescriptions()
Returns the descriptions for the default properties used by the rating process.
|
List<PropertyDescriptionModel> |
getDefaultPropertyDescriptionsForRefill()
Returns the descriptions for the default properties used by the refilling process.
|
static List<PropertyDescriptionModel> |
getDefaultStaticPropertyDescriptions() |
static List<PropertyDescriptionModel> |
getDefaultStaticPropertyDescriptionsForRefill() |
static DetailCategory |
getInitialPrefixedName(DetailCategory fromCategory) |
static DetailCategory |
getInitialPrefixedName(String propertyFullName) |
boolean |
getIsAllowanceFlag()
Returns true if charge component is an allowance component.
|
boolean |
getIsContractFlag()
Returns true if charge component uses charging contract.
|
SearchCodeResult.ObjectCode |
getObjectCodeFor(UsageChargeModel model) |
SearchCodeResult.ObjectCode |
getObjectCodeFor(UsageRateModel model) |
SearchCodeResult.ObjectCode |
getObjectCodeForCI(String ciName,
List<ProductModel> products) |
String |
getRelationType()
Gets the relation type.
|
SharedObjectsRetriever |
getSharedObjectsRetriever() |
static String |
getUnprefixedName(String propertyFullName) |
boolean |
isAllowanceEventClassValid(String ecName)
Returns true if the Allowance Event Class exists.
|
boolean |
isChargeableItemClassValid(Object objectCode)
Returns true if the Chargeable item is a valid one.
|
boolean |
isCIValid(String ciName)
Returns true if the Chargeable item is a valid one.
|
boolean |
isEventValid(String eventName)
Returns true if the event name is a valid one.
|
boolean |
isPropagationSensitive() |
boolean |
isPropertyValid(String propertyName,
DetailCategory category)
Tests if a property from a category is valid.
|
boolean |
isPropertyValid(String longPropertyName,
int type)
Test if a property from a category is valid.
|
boolean |
isRefillItemValid(String riName)
Returns true if the Refill Item Class exists.
|
static boolean |
isVisible(String propertyName)
Returns whether a specified property name is linked to a visible property.
|
void |
setCurrencyCode(String code)
Sets the currency code.
|
void |
setIsAllowanceFlag(boolean flag)
Sets the use allowance flag.
|
void |
setIsContractFlag(boolean flag)
Sets the use charging contract flag.
|
void |
setObjectCodeFor(UsageChargeModel model,
Object objectCode) |
void |
setObjectCodeFor(UsageRateModel model,
Object objectCode) |
void |
setPropertyDescription(PropertyDescriptionModel pd,
DetailCategory category)
Adds a property with its description to the context.
|
void |
setPropertyDescription(String name,
int type,
DetailCategory category)
Adds a property with its description to the context.
|
void |
setPropertyDescription(String name,
int type,
DetailCategory category,
List<AdditionalInfoModel> additionalInfo)
Adds a property with its description to the context.
|
void |
setRelationType(String type)
Sets the relation type.
|
void |
setSharedObjectsRetriever(SharedObjectsRetriever retriever) |
public RatingContextDescriptionProvider()
public RatingContextDescriptionProvider(String relationType)
relationType - the type of the business relationship.public void clean()
RatingContextDescriptionclean in interface RatingContextDescriptionpublic String getCurrencyCode()
RatingContextDescriptiongetCurrencyCode in interface RatingContextDescriptionpublic void setCurrencyCode(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 fleg to define if charge component uses charging contractpublic boolean getIsAllowanceFlag()
RatingContextDescriptiongetIsAllowanceFlag in interface RatingContextDescriptionpublic void setIsAllowanceFlag(boolean flag)
RatingContextDescriptionsetIsAllowanceFlag in interface RatingContextDescriptionflag - the fleg to define if charge component is an allowance component.public void setPropertyDescription(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(String name, int type, DetailCategory category, 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 List<String> getAvailablePropertyNames(RatingContextDescription.IPropertyFilter filter)
RatingContextDescriptiongetAvailablePropertyNames in interface RatingContextDescriptionfilter - The filter that describes the constraints to checkpublic List<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 List<String> getAvailablePropertyNames(int propertyType)
RatingContextDescriptionsetPropertyDescription for allowed types.getAvailablePropertyNames in interface RatingContextDescriptionpropertyType - The type of the propertypublic List<String> getAvailablePropertyNames(int propertyType, 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 Vector<String> getAvailablePropertyNames(String category)
RatingContextDescriptionsetPropertyDescription for allowed categories.getAvailablePropertyNames in interface RatingContextDescriptioncategory - the category of the property.public List<String> getAvailablePropertyNames(int propertyType, String category, 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 List<String> getAvailablePropertyNames(int propertyType, 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 List<PropertyDescriptionModel> getAvailableFullNamedProperties(RatingContextDescription.IPropertyFilter filter)
RatingContextDescriptiongetAvailableFullNamedProperties in interface RatingContextDescriptionfilter - The filter that describes the constraints to checkpublic Vector<PropertyDescriptionModel> getAllAvailableFullNamedProperties()
RatingContextDescriptiongetAllAvailableFullNamedProperties in interface RatingContextDescriptionproperty description model.public boolean isPropertyValid(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(String longPropertyName, int type)
RatingContextDescriptionsetPropertyDescription for allowed types and names.isPropertyValid in interface RatingContextDescriptionlongPropertyName - the property name.type - the property type.public List<SearchCodeResult.ObjectCode> getAllChargeableItemClassCodes()
getAllChargeableItemClassCodes in interface RatingContextDescriptionpublic void cleanAllChargeableItemClassCodes()
RatingContextDescriptionRatingContextDescription.getAllChargeableItemClassCodes().cleanAllChargeableItemClassCodes in interface RatingContextDescriptionpublic SearchCodeResult.ObjectCode getObjectCodeForCI(String ciName, List<ProductModel> products)
getObjectCodeForCI in interface RatingContextDescriptionpublic SearchCodeResult.ObjectCode getObjectCodeFor(UsageRateModel model)
getObjectCodeFor in interface RatingContextDescriptionpublic void setObjectCodeFor(UsageRateModel model, Object objectCode)
setObjectCodeFor in interface RatingContextDescriptionobjectCode - is an ObjectCodepublic SearchCodeResult.ObjectCode getObjectCodeFor(UsageChargeModel model)
getObjectCodeFor in interface RatingContextDescriptionpublic void setObjectCodeFor(UsageChargeModel model, Object objectCode)
setObjectCodeFor in interface RatingContextDescriptionobjectCode - Is an ObjectCodepublic ChargeableItemDescriptionModel getCIDescriptionFor(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 Vector<QualifiedChargeableItemDescription> availableCINamesForRating(String ciName)
QualifiedChargeableItemDescription.availableCINamesForRating in interface RatingContextDescriptionciName - QualifiedChargeableItemDescription.public List<QualifiedChargeableItemDescription> availableCINamesForCharging(String ciName)
QualifiedChargeableItemDescription.availableCINamesForCharging in interface RatingContextDescriptionciName - QualifiedChargeableItemDescription.public List<String> getAvailableEventNames()
getAvailableEventNames in interface RatingContextDescriptionpublic boolean isEventValid(String eventName)
RatingContextDescriptionisEventValid in interface RatingContextDescriptioneventName - the name of the event.public boolean isCIValid(String ciName)
RatingContextDescriptionisCIValid in interface RatingContextDescriptionciName - a Chargeable item name.public boolean isChargeableItemClassValid(Object objectCode)
RatingContextDescriptionisChargeableItemClassValid in interface RatingContextDescriptionobjectCode - the code of a Chargeable item .public boolean isRefillItemValid(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 String getRelationType()
RatingContextDescriptiongetRelationType in interface RatingContextDescriptionpublic void setRelationType(String type)
RatingContextDescriptionsetRelationType in interface RatingContextDescriptiontype - the relation type.
Allowed values are :
public static DetailCategory getInitialPrefixedName(String propertyFullName)
public static DetailCategory getInitialPrefixedName(DetailCategory fromCategory)
public List<PropertyDescriptionModel> getDefaultPropertyDescriptions()
PropertyDescriptionModel.getDefaultPropertyDescriptions in interface RatingContextDescriptionproperty description models.public static List<PropertyDescriptionModel> getDefaultStaticPropertyDescriptions()
public List<PropertyDescriptionModel> getDefaultPropertyDescriptionsForRefill()
PropertyDescriptionModel.getDefaultPropertyDescriptionsForRefill in interface RatingContextDescriptionproperty description models.public static 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(String propertyName)
propertyName - The property name to check.public boolean isAllowanceEventClassValid(String ecName)
RatingContextDescriptionisAllowanceEventClassValid in interface RatingContextDescriptionecName - a Allowance Event Class name.public com.highdeal.allowance.allowanceeventclass.hci.AllowanceEventClassModel getAllowanceEventClass(String ecName)
getAllowanceEventClass in interface RatingContextDescriptionecName - a Allowance Event Class name.