Class BundlerMessageHelper
java.lang.Object
overit.geocallapp.wfm.orchestrator.workorders.bl.bundler.bundling.task.BundlerMessageHelper
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendLocationInfo(BOBundleCriterion bundleCriterion, StringBuilder message) Appends all the location needed information.protected voidappendTechnicalObjectInfo(BOBundleCriterion bundleCriterion, PoolKit poolKit, StringBuilder message) Appends all the technical object needed information.protected voidappendTimeIntervalInfo(BOBundleCriterion bundleCriterion, StringBuilder message) Appends all the time interval needed information retrieving them from the givenBOBundleCriterion.static BundlerMessageHelpercreate(BundleEntitiesCache cache) Creates an instance of a bundler message helper, with the specific characteristics.protected StringgetBundleCriterionMunicipality(BOBundleCriterion bundleCriterion) Returns the municipality contained in the givenBOBundleCriterion.protected StringgetBundleCriterionStreet(BOBundleCriterion bundleCriterion) Returns the street contained in the givenBOBundleCriterion.protected StringgetBundleCriterionStreetNumber(BOBundleCriterion bundleCriterion) Returns the street number contained in the givenBOBundleCriterion.getBundleMessage(Long bundleId, List<Long> workOrderOperationIds) Builds a message specific to the givenBundledetails, such as all itsBOWorkOrderOperationids.Builds a message specific to the given bundle messages.getBundlingRuleLog(BundlingRule bundlingRule) Returns theBundlingRulelog message.getCache()Returns the cache used for theBundlerelated entities.getCriterionMessage(BOBundleCriterion bundleCriterion, PoolKit poolKit) Builds a message specific to the givenBOBundleCriterion.getMaxDurationBundleMessage(List<Long> workOrderOperationIds) Returns the max durationBundlemessage.getMinSizeBundleMessage(List<Long> workOrderOperationIds) Returns the min sizeBundlemessage.protected StringgetTechnicalObjectBundlingType(Long techObjBundlingType) Returns the right log description for a givenTechnicalObjectBundlingType.voidsetCache(BundleEntitiesCache cache) Sets the cache to use for theBundlerelated entities.
-
Constructor Details
-
BundlerMessageHelper
public BundlerMessageHelper()
-
-
Method Details
-
create
Creates an instance of a bundler message helper, with the specific characteristics.- Parameters:
cache- theBundleEntitiesCache- Returns:
- the created bundler message helper
-
getCache
Returns the cache used for theBundlerelated entities.- Returns:
- the
BundleEntitiesCache
-
setCache
Sets the cache to use for theBundlerelated entities.- Parameters:
cache- theBundleEntitiesCache
-
getBundlingRuleLog
Returns theBundlingRulelog message.- Parameters:
bundlingRule- theBundlingRule- Returns:
- the
BundlingRulelog message - Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
getCriterionMessage
Builds a message specific to the givenBOBundleCriterion.- Parameters:
bundleCriterion- theBOBundleCriterionpoolKit- thePoolKit- Returns:
- the criterion log message
-
appendTechnicalObjectInfo
protected void appendTechnicalObjectInfo(BOBundleCriterion bundleCriterion, PoolKit poolKit, StringBuilder message) Appends all the technical object needed information.- Parameters:
bundleCriterion- theBOBundleCriterionpoolKit- thePoolKitmessage- the technical object log message
-
getTechnicalObjectBundlingType
Returns the right log description for a givenTechnicalObjectBundlingType.- Parameters:
techObjBundlingType- theTechnicalObjectBundlingTypeid- Returns:
- the technical object bundling type log description
-
appendLocationInfo
Appends all the location needed information.- Parameters:
bundleCriterion- theBOBundleCriterionmessage- the location log message
-
getBundleCriterionMunicipality
Returns the municipality contained in the givenBOBundleCriterion.- Parameters:
bundleCriterion- theBOBundleCriterion- Returns:
- the bundle criterion municipality
-
getBundleCriterionStreet
Returns the street contained in the givenBOBundleCriterion.- Parameters:
bundleCriterion- theBOBundleCriterion- Returns:
- the bundle criterion street
-
getBundleCriterionStreetNumber
Returns the street number contained in the givenBOBundleCriterion.- Parameters:
bundleCriterion- theBOBundleCriterion- Returns:
- the bundle criterion street number
-
appendTimeIntervalInfo
Appends all the time interval needed information retrieving them from the givenBOBundleCriterion.- Parameters:
bundleCriterion- theBOBundleCriterionmessage- the time interval log message
-
getBundlingMessage
public String getBundlingMessage(List<Long> bundleIds, List<String> bundleMessages, PoolKit poolKit) Builds a message specific to the given bundle messages. Returns the details message to log. -
getBundleMessage
Builds a message specific to the givenBundledetails, such as all itsBOWorkOrderOperationids.- Parameters:
bundleId- theBundleidworkOrderOperationIds- list ofBOWorkOrderOperationids- Returns:
- the bundle message
-
getMinSizeBundleMessage
Returns the min sizeBundlemessage.- Parameters:
workOrderOperationIds- list ofBOWorkOrderOperationids- Returns:
- the min size bundle message
-
getMaxDurationBundleMessage
Returns the max durationBundlemessage.- Parameters:
workOrderOperationIds- list ofBOWorkOrderOperationids- Returns:
- the max duration bundle message
-