Package com.highdeal.pnr.hci
Class RatingContextDescriptionProvider
java.lang.Object
com.highdeal.pnr.hci.RatingContextDescriptionProvider
- All Implemented Interfaces:
RatingContextDescription
FOR INTERNAL USE ONLY -
This class implements the rating context description interface.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.highdeal.pnr.hci.RatingContextDescription
RatingContextDescription.AllowanceFlag, RatingContextDescription.IPropertyFilter -
Field Summary
Fields inherited from interface com.highdeal.pnr.hci.RatingContextDescription
ACCOUNT_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 Summary
ConstructorsConstructorDescriptionRatingContextDescriptionProvider(String relationType) Constructs a rating context description provider with a specified business relationship type. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidstatic booleanareTypesEqual(PropertyDescriptionModel pd, int type, boolean strict) Returns whether a specified property description type is equal to a specified type.availableCINamesForCharging(String ciName) Returns a list ofQualifiedChargeableItemDescription.availableCINamesForRating(String ciName) Returns a list ofQualifiedChargeableItemDescription.voidclean()Cleans the context.voidClean the cache of Chargeable Item Description or Class used by the methodRatingContextDescription.getAllChargeableItemClassCodes().Gets all properties from all categories.com.highdeal.allowance.allowanceeventclass.hci.AllowanceEventClassModelgetAllowanceEventClass(String ecName) Gets the use allowance flag.Returns a vector of strings representing the default events that a type of relationship can produce.Gets all property descriptions that matches the filter.getAvailablePropertyNames(int propertyType) Gets all properties of the specified type.getAvailablePropertyNames(int propertyType, boolean strict) Gets all properties of the specified type.getAvailablePropertyNames(int propertyType, String category) Gets all properties of the specified type and category.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.getAvailablePropertyNames(int propertyType, List<AdditionalInfoModel> criteria) Gets all properties of the specified type and matching the given criteria.Gets all property names that matches the filter.getAvailablePropertyNames(String category) Gets all property names from a category.getCIDescriptionFor(Object objectCodeParam) Gets the currency code.Returns the descriptions for the default properties used by the rating process.Returns the descriptions for the default properties used by the refilling process.static List<PropertyDescriptionModel>static List<PropertyDescriptionModel>static DetailCategorygetInitialPrefixedName(DetailCategory fromCategory) static DetailCategorygetInitialPrefixedName(String propertyFullName) booleanReturns true if charge component is an allowance logic (shared or not).booleanReturns true if charge component uses charging contract.getObjectCodeFor(UsageChargeModel model) getObjectCodeFor(UsageRateModel model) getObjectCodeForCI(String ciName, List<ProductModel> products) getPropertyByName(String longPropertyName) Returns the description of the property by this full name.Gets the relation type.static StringgetUnprefixedName(String propertyFullName) booleanisAllowanceEventClassValid(String ecName) Returns true if the Allowance Event Class exists.booleanisChargeableItemClassValid(Object objectCode) Returns true if the Chargeable item is a valid one.booleanReturns true if the Chargeable item is a valid one.booleanisEventValid(String eventName) Returns true if the event name is a valid one.booleanReturns true if the charge component is managed by Cockpit.booleanbooleanisPropertyValid(String longPropertyName, int type) Test if a property from a category is valid, without taking any restriction into account.booleanisPropertyValid(String longPropertyName, int type, boolean strict) Test if a property from a category is valid.booleanisPropertyValid(String propertyName, DetailCategory category) Tests if a property from a category is valid.booleanisRefillItemValid(String riName) Returns true if the Refill Item Class exists.static booleanReturns whether a specified property name is linked to a visible property.voidSets the use allowance flag.voidsetCurrencyCode(String code) Sets the currency code.voidsetIsContractFlag(boolean flag) Sets the use charging contract flag.voidsetManagedByCockpit(boolean isManagedByCockpit) Sets the managed by cockpit flag.voidsetObjectCodeFor(UsageChargeModel model, Object objectCode) voidsetObjectCodeFor(UsageRateModel model, Object objectCode) voidsetOneShotTriggerName(String oneShotTriggerName) voidsetPropertyDescription(PropertyDescriptionModel pd, DetailCategory category) Adds a property with its description to the context.voidsetPropertyDescription(String name, int type, DetailCategory category) Adds a property with its description to the context.voidsetPropertyDescription(String name, int type, DetailCategory category, List<AdditionalInfoModel> additionalInfo) Adds a property with its description to the context.voidsetRelationType(String type) Sets the relation type.voidsetSharedObjectsRetriever(SharedObjectsRetriever retriever)
-
Constructor Details
-
RatingContextDescriptionProvider
public RatingContextDescriptionProvider() -
RatingContextDescriptionProvider
Constructs a rating context description provider with a specified business relationship type.- Parameters:
relationType- the type of the business relationship.
-
-
Method Details
-
clean
public void clean()Description copied from interface:RatingContextDescriptionCleans the context.- Specified by:
cleanin interfaceRatingContextDescription
-
getCurrencyCode
Description copied from interface:RatingContextDescriptionGets the currency code.- Specified by:
getCurrencyCodein interfaceRatingContextDescription- Returns:
- The currency code
-
setCurrencyCode
Description copied from interface:RatingContextDescriptionSets the currency code.- Specified by:
setCurrencyCodein interfaceRatingContextDescription- Parameters:
code- The currency code
-
getIsContractFlag
public boolean getIsContractFlag()Description copied from interface:RatingContextDescriptionReturns true if charge component uses charging contract.- Specified by:
getIsContractFlagin interfaceRatingContextDescription- Returns:
trueif charge component uses charging contract, false otherwise.
-
setIsContractFlag
public void setIsContractFlag(boolean flag) Description copied from interface:RatingContextDescriptionSets the use charging contract flag.- Specified by:
setIsContractFlagin interfaceRatingContextDescription- Parameters:
flag- The flag to define if charge component uses charging contract
-
getIsAllowanceFlag
public boolean getIsAllowanceFlag()Description copied from interface:RatingContextDescriptionReturns true if charge component is an allowance logic (shared or not).- Specified by:
getIsAllowanceFlagin interfaceRatingContextDescription- Returns:
- true if charge component is an allowance logic (shared or not), false otherwise.
-
setAllowanceFlag
Description copied from interface:RatingContextDescriptionSets the use allowance flag.- Specified by:
setAllowanceFlagin interfaceRatingContextDescription- Parameters:
flag- the flag to define if charge component is an allowance component.
-
getAllowanceFlag
Description copied from interface:RatingContextDescriptionGets the use allowance flag.- Specified by:
getAllowanceFlagin interfaceRatingContextDescription- Returns:
- the flag that define if charge component is an allowance component, a shared allowance component or not an allowance.
-
setManagedByCockpit
public void setManagedByCockpit(boolean isManagedByCockpit) Description copied from interface:RatingContextDescriptionSets the managed by cockpit flag.- Specified by:
setManagedByCockpitin interfaceRatingContextDescription- Parameters:
isManagedByCockpit- the flag to define if the charge component is managed by Cockpit or not
-
isManagedByCockpit
public boolean isManagedByCockpit()Description copied from interface:RatingContextDescriptionReturns true if the charge component is managed by Cockpit.- Specified by:
isManagedByCockpitin interfaceRatingContextDescription- Returns:
- true if the charge component is managed by Cockpit, false otherwise
-
setPropertyDescription
Description copied from interface:RatingContextDescriptionAdds a property with its description to the context.- Property name can be any string or predefined one:
agreement_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_amount- Allowed property types are:
number,string,date- Specified by:
setPropertyDescriptionin interfaceRatingContextDescription- Parameters:
name- The property nametype- The property typecategory- Thecategoryof the property
- Property name can be any string or predefined one:
-
setPropertyDescription
public void setPropertyDescription(String name, int type, DetailCategory category, List<AdditionalInfoModel> additionalInfo) Description copied from interface:RatingContextDescriptionAdds a property with its description to the context.- Property name can be any string or predefined one:
agreement_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_amount- Allowed property types are:
number,string,date- Specified by:
setPropertyDescriptionin interfaceRatingContextDescription- Parameters:
name- The property nametype- The property typecategory- Thecategoryof the propertyadditionalInfo- Theadditional informationof the property. Passing innullis equivalent to passing in an empty list.
- Property name can be any string or predefined one:
-
setPropertyDescription
Description copied from interface:RatingContextDescriptionAdds a property with its description to the context. SeesetPropertyDescriptionfor allowed categories.- Specified by:
setPropertyDescriptionin interfaceRatingContextDescription- Parameters:
pd- The property descriptioncategory- The category of the property
-
getAvailablePropertyNames
Description copied from interface:RatingContextDescriptionGets all property names that matches the filter.- Specified by:
getAvailablePropertyNamesin interfaceRatingContextDescription- Parameters:
filter- The filter that describes the constraints to check- Returns:
- A list of property name
-
getAvailablePropertyNames
Description copied from interface:RatingContextDescriptionGets all properties of the specified type. seesetPropertyDescriptionfor allowed types.- Specified by:
getAvailablePropertyNamesin interfaceRatingContextDescription- Parameters:
propertyType- the type of the property.strict- true if the types must be strictly equal.- Returns:
- a list of String.
-
getAvailablePropertyNames
Description copied from interface:RatingContextDescriptionGets all properties of the specified type. SeesetPropertyDescriptionfor allowed types.- Specified by:
getAvailablePropertyNamesin interfaceRatingContextDescription- Parameters:
propertyType- The type of the property- Returns:
- A list of String
-
getAvailablePropertyNames
Description copied from interface:RatingContextDescriptionGets all properties of the specified type and matching the given criteria. SeesetPropertyDescriptionfor allowed types.- Specified by:
getAvailablePropertyNamesin interfaceRatingContextDescription- Parameters:
propertyType- The type of the propertycriteria- The additional information that must be present in the returnedproperty description models- Returns:
- A list of String
-
getAvailablePropertyNames
Description copied from interface:RatingContextDescriptionGets all property names from a category. seesetPropertyDescriptionfor allowed categories.- Specified by:
getAvailablePropertyNamesin interfaceRatingContextDescription- Parameters:
category- the category of the property.- Returns:
- a list of String.
-
getAvailablePropertyNames
public List<String> getAvailablePropertyNames(int propertyType, String category, List<AdditionalInfoModel> criteria) Description copied from interface:RatingContextDescriptionGets the name of all properties of the specified type and category of which the additional information matches the given one. seesetPropertyDescriptionfor allowed types. seesetPropertyDescriptionfor allowed categories.- Specified by:
getAvailablePropertyNamesin interfaceRatingContextDescription- Parameters:
propertyType- the type of the property.category- the category of the property.criteria- the additional information that must be present in the returnedproperty description models.- Returns:
- a list of names of
property description models.
-
getAvailablePropertyNames
Description copied from interface:RatingContextDescriptionGets all properties of the specified type and category. seesetPropertyDescriptionfor allowed types. seesetPropertyDescriptionfor allowed categories.- Specified by:
getAvailablePropertyNamesin interfaceRatingContextDescription- Parameters:
propertyType- the type of the property.category- the category of the property.- Returns:
- a list of String.
-
getAvailableFullNamedProperties
public List<PropertyDescriptionModel> getAvailableFullNamedProperties(RatingContextDescription.IPropertyFilter filter) Description copied from interface:RatingContextDescriptionGets all property descriptions that matches the filter.- Specified by:
getAvailableFullNamedPropertiesin interfaceRatingContextDescription- Parameters:
filter- The filter that describes the constraints to check- Returns:
- A list of property descriptions
-
getAllAvailableFullNamedProperties
Description copied from interface:RatingContextDescriptionGets all properties from all categories.- Specified by:
getAllAvailableFullNamedPropertiesin interfaceRatingContextDescription- Returns:
- a List of
property description model.
-
isPropertyValid
Description copied from interface:RatingContextDescriptionTests if a property from a category is valid. seesetPropertyDescriptionfor allowed categories and names.- Specified by:
isPropertyValidin interfaceRatingContextDescription- Parameters:
propertyName- the property name.category- the category of the property.- Returns:
- true if the property is valid, false otherwise.
-
isPropertyValid
Description copied from interface:RatingContextDescriptionTest if a property from a category is valid. seesetPropertyDescriptionfor allowed types and names.- Specified by:
isPropertyValidin interfaceRatingContextDescription- Parameters:
longPropertyName- the property name.type- the property type.strict- true if the types must be strictly equal.- Returns:
- true if the property is valid, false otherwise.
-
isPropertyValid
Description copied from interface:RatingContextDescriptionTest if a property from a category is valid, without taking any restriction into account. seesetPropertyDescriptionfor allowed types and names.- Specified by:
isPropertyValidin interfaceRatingContextDescription- Parameters:
longPropertyName- the property name.type- the property type.- Returns:
- true if the property is valid, false otherwise.
-
getPropertyByName
Description copied from interface:RatingContextDescriptionReturns the description of the property by this full name. Only one occurrence can be found, since each new declaration overwrites the previous one.nullis returned if there is no property by this name.- Specified by:
getPropertyByNamein interfaceRatingContextDescription- Parameters:
longPropertyName- full name of the property looked for- Returns:
- the description of the property whose name is specified, or
nullif there is none
-
getAllChargeableItemClassCodes
- Specified by:
getAllChargeableItemClassCodesin interfaceRatingContextDescription- Returns:
- Object Codes of all Chargeable Item Classes.
-
cleanAllChargeableItemClassCodes
public void cleanAllChargeableItemClassCodes()Description copied from interface:RatingContextDescriptionClean the cache of Chargeable Item Description or Class used by the methodRatingContextDescription.getAllChargeableItemClassCodes().- Specified by:
cleanAllChargeableItemClassCodesin interfaceRatingContextDescription
-
getObjectCodeForCI
- Specified by:
getObjectCodeForCIin interfaceRatingContextDescription- Returns:
- an ObjectCode
-
getObjectCodeFor
- Specified by:
getObjectCodeForin interfaceRatingContextDescription- Returns:
- an ObjectCode
-
setObjectCodeFor
- Specified by:
setObjectCodeForin interfaceRatingContextDescriptionobjectCode- is an ObjectCode
-
getObjectCodeFor
- Specified by:
getObjectCodeForin interfaceRatingContextDescription- Returns:
- an ObjectCode
-
setObjectCodeFor
- Specified by:
setObjectCodeForin interfaceRatingContextDescriptionobjectCode- Is an ObjectCode
-
getCIDescriptionFor
- Specified by:
getCIDescriptionForin interfaceRatingContextDescription- Parameters:
objectCodeParam- Is an ObjectCode (of a Chargeable Item Description or Class)- Returns:
- A ChargeableItemDescriptionModel
-
addProductCIDescription
- Specified by:
addProductCIDescriptionin interfaceRatingContextDescription
-
addUsedCIDescriptionForRating
- Specified by:
addUsedCIDescriptionForRatingin interfaceRatingContextDescription
-
addUsedCIDescriptionForCharging
- Specified by:
addUsedCIDescriptionForChargingin interfaceRatingContextDescription
-
availableCINamesForRating
Returns a list ofQualifiedChargeableItemDescription.- Specified by:
availableCINamesForRatingin interfaceRatingContextDescription- Parameters:
ciName-- Returns:
- a list of
QualifiedChargeableItemDescription.
-
availableCINamesForCharging
Returns a list ofQualifiedChargeableItemDescription.- Specified by:
availableCINamesForChargingin interfaceRatingContextDescription- Parameters:
ciName-- Returns:
- a list of
QualifiedChargeableItemDescription.
-
getAvailableEventNames
Returns a vector of strings representing the default events that a type of relationship can produce.- Specified by:
getAvailableEventNamesin interfaceRatingContextDescription- Returns:
- a vector of event names (string).
-
isEventValid
Description copied from interface:RatingContextDescriptionReturns true if the event name is a valid one.- Specified by:
isEventValidin interfaceRatingContextDescription- Parameters:
eventName- the name of the event.- Returns:
- true if the event name is valid, false otherwise.
-
isCIValid
Description copied from interface:RatingContextDescriptionReturns true if the Chargeable item is a valid one.- Specified by:
isCIValidin interfaceRatingContextDescription- Parameters:
ciName- a Chargeable item name.- Returns:
- true if the Chargeable item name is valid, false otherwise.
-
isChargeableItemClassValid
Description copied from interface:RatingContextDescriptionReturns true if the Chargeable item is a valid one.- Specified by:
isChargeableItemClassValidin interfaceRatingContextDescription- Parameters:
objectCode- the code of a Chargeable item .- Returns:
- true if the Chargeable item name is valid, false otherwise.
-
isRefillItemValid
Description copied from interface:RatingContextDescriptionReturns true if the Refill Item Class exists.- Specified by:
isRefillItemValidin interfaceRatingContextDescription- Parameters:
riName- a Refill Item Class name.- Returns:
- true if the Refill Item Class exists, false otherwise.
-
isPropagationSensitive
public boolean isPropagationSensitive()- Specified by:
isPropagationSensitivein interfaceRatingContextDescription
-
getRelationType
Description copied from interface:RatingContextDescriptionGets the relation type. Returned values are :- Specified by:
getRelationTypein interfaceRatingContextDescription- Returns:
- the relation type.
-
setRelationType
Description copied from interface:RatingContextDescriptionSets the relation type.- Specified by:
setRelationTypein interfaceRatingContextDescription- Parameters:
type- the relation type. Allowed values are :
-
getUnprefixedName
-
getInitialPrefixedName
-
getInitialPrefixedName
-
getDefaultPropertyDescriptions
Returns the descriptions for the default properties used by the rating process. The vector containsPropertyDescriptionModel.- Specified by:
getDefaultPropertyDescriptionsin interfaceRatingContextDescription- Returns:
- a list of
property description models.
-
getDefaultStaticPropertyDescriptions
-
getDefaultPropertyDescriptionsForRefill
Returns the descriptions for the default properties used by the refilling process. The vector containsPropertyDescriptionModel.- Specified by:
getDefaultPropertyDescriptionsForRefillin interfaceRatingContextDescription- Returns:
- a list of
property description models.
-
getDefaultStaticPropertyDescriptionsForRefill
-
areTypesEqual
Returns whether a specified property description type is equal to a specified type.- Parameters:
pd- The property description to check.type- The type to compare to.strict- true if the types must be strictly equal.- Returns:
- true if the property description type is equal to the type, false otherwise.
-
isVisible
Returns whether a specified property name is linked to a visible property.- Parameters:
propertyName- The property name to check.- Returns:
- true if the property is visible, false otherwise.
-
isAllowanceEventClassValid
Description copied from interface:RatingContextDescriptionReturns true if the Allowance Event Class exists.- Specified by:
isAllowanceEventClassValidin interfaceRatingContextDescription- Parameters:
ecName- a Allowance Event Class name.- Returns:
- true if the Allowance Event Class exists, false otherwise.
-
getAllowanceEventClass
public com.highdeal.allowance.allowanceeventclass.hci.AllowanceEventClassModel getAllowanceEventClass(String ecName) - Specified by:
getAllowanceEventClassin interfaceRatingContextDescription- Parameters:
ecName- a Allowance Event Class name.- Returns:
- a AllowanceEventRateModel
-
getOneShotTriggerName
- Specified by:
getOneShotTriggerNamein interfaceRatingContextDescription
-
setOneShotTriggerName
- Specified by:
setOneShotTriggerNamein interfaceRatingContextDescription
-