Class ConsolidatedPickSlipContext
java.lang.Object
org.apache.velocity.context.AbstractContext
org.apache.velocity.VelocityContext
de.hybris.platform.acceleratorservices.document.context.AbstractHybrisVelocityContext
de.hybris.platform.acceleratorservices.document.context.AbstractDocumentContext<BusinessProcessModel>
de.hybris.platform.warehousing.labels.context.ConsolidatedPickSlipContext
- All Implemented Interfaces:
Serializable,Cloneable,org.apache.velocity.context.Context,org.apache.velocity.context.InternalEventContext
Context for ConsolidatedPickLabel generating and sorting the form entries.
- See Also:
-
Field Summary
Fields inherited from class de.hybris.platform.acceleratorservices.document.context.AbstractDocumentContext
DOCUMENT_LANGUAGEFields inherited from class de.hybris.platform.acceleratorservices.document.context.AbstractHybrisVelocityContext
BASE_SITE, BASE_THEME_URL, BASE_URL, MEDIA_BASE_URL, MEDIA_SECURE_BASE_URL, SECURE_BASE_URL, THEME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.velocity.app.event.EventCartridgeattachEventCartridge(org.apache.velocity.app.event.EventCartridge arg0) protected List<ConsolidatedPickSlipFormEntry>createPickSlipFormEntries(List<ConsignmentEntryModel> consignmentEntries) Creates a list ofConsignmentEntryModel.escapeHtml(String stringToEscape) Escapes String to generate safe HTMLprotected Collection<AllocationEventModel>extractAllocationEvents(ConsignmentEntryModel consignmentEntryModel) Extracts the bin location of the product for the selectedConsignmentEntryModelprotected StringextractBin(AllocationEventModel allocationEventModel) Extracts the bin out of theStockLevelModelin theAllocationEventModelprotected List<ConsignmentModel>extractConsignments(BusinessProcessModel businessProcessModel) protected Comparator<ConsolidatedPickSlipFormEntry>intorg.apache.velocity.runtime.resource.Resourceorg.apache.velocity.tools.generic.DateToolgetDate()protected LanguageModelgetDocumentLanguage(BusinessProcessModel businessProcessModel) org.apache.velocity.app.event.EventCartridgeprotected InventoryEventServiceList<org.apache.velocity.Template>String[]getProductImageURL(ProductModel productModel) Extracts the image url for the thumbnail of aProductModelintgetRowQuantity(int columns) Returns the quantity of row for the amount of column based on the list ofConsignmentModelprotected BaseSiteModelgetSite(BusinessProcessModel businessProcessModel) String[]org.apache.velocity.util.introspection.IntrospectionCacheDatavoidvoidinit(BusinessProcessModel businessProcessModel, DocumentPageModel documentPageModel) voidvoidvoidpushCurrentMacroName(String arg0) voidvoidsetConsignmentList(List<ConsignmentModel> consignmentList) voidsetConsolidatedPickSlipComparator(Comparator<ConsolidatedPickSlipFormEntry> consolidatedPickSlipComparator) voidsetCurrentResource(org.apache.velocity.runtime.resource.Resource arg0) voidsetFormEntries(List<ConsolidatedPickSlipFormEntry> formEntries) voidsetInventoryEventService(InventoryEventService inventoryEventService) voidsetMacroLibraries(List<org.apache.velocity.Template> arg0) Methods inherited from class de.hybris.platform.acceleratorservices.document.context.AbstractDocumentContext
getDocumentLanguageMethods inherited from class de.hybris.platform.acceleratorservices.document.context.AbstractHybrisVelocityContext
getBaseSite, getBaseThemeUrl, getBaseUrl, getCmsSlotContents, getMediaBaseUrl, getMediaSecureBaseUrl, getMessage, getMessages, getSecureBaseUrl, getSiteBaseUrlResolutionService, getTheme, getUrlEncoderService, getUrlEncodingAttributes, init, setBaseSite, setCmsSlotContents, setMessages, setSiteBaseUrlResolutionService, setUrlEncoderService, setUrlEncodingAttributesMethods inherited from class org.apache.velocity.VelocityContext
clone, internalContainsKey, internalGet, internalGetKeys, internalPut, internalRemoveMethods inherited from class org.apache.velocity.context.AbstractContext
containsKey, get, getChainedContext, getKeys, put, remove
-
Constructor Details
-
ConsolidatedPickSlipContext
public ConsolidatedPickSlipContext()
-
-
Method Details
-
init
- Overrides:
initin classAbstractDocumentContext<BusinessProcessModel>
-
escapeHtml
Escapes String to generate safe HTML- Parameters:
stringToEscape- String to escape- Returns:
- escaped String
-
createPickSlipFormEntries
protected List<ConsolidatedPickSlipFormEntry> createPickSlipFormEntries(List<ConsignmentEntryModel> consignmentEntries) Creates a list ofConsignmentEntryModel. Groups by product and bin and sorts using a comparator.- Parameters:
consignmentEntries- Consignment Entries
-
extractBin
Extracts the bin out of theStockLevelModelin theAllocationEventModel- Parameters:
allocationEventModel- theAllocationEventModel- Returns:
- a string containing the bin
-
extractConsignments
- Parameters:
businessProcessModel- the businessProcess containing the consignments- Returns:
- list of
ConsignmentModel
-
getSite
- Specified by:
getSitein classAbstractDocumentContext<BusinessProcessModel>
-
getDocumentLanguage
- Specified by:
getDocumentLanguagein classAbstractDocumentContext<BusinessProcessModel>
-
extractAllocationEvents
protected Collection<AllocationEventModel> extractAllocationEvents(ConsignmentEntryModel consignmentEntryModel) Extracts the bin location of the product for the selectedConsignmentEntryModel- Parameters:
consignmentEntryModel- theConsignmentEntryModelfor which we request the Consolidated Pick Slip label- Returns:
- The binCode location of the product
-
getProductImageURL
Extracts the image url for the thumbnail of aProductModel- Parameters:
productModel- theProductModelfor which we request Product Image- Returns:
- the source url for the product thumbnail (expecting the relative path as a string)
-
getRowQuantity
public int getRowQuantity(int columns) Returns the quantity of row for the amount of column based on the list ofConsignmentModel- Parameters:
columns- amount of columns needed- Returns:
- amount of rows required minus one.
-
getDate
public org.apache.velocity.tools.generic.DateTool getDate() -
getFormEntries
-
setFormEntries
-
getConsignmentList
-
setConsignmentList
-
getConsolidatedPickSlipComparator
-
setConsolidatedPickSlipComparator
public void setConsolidatedPickSlipComparator(Comparator<ConsolidatedPickSlipFormEntry> consolidatedPickSlipComparator) -
getInventoryEventService
-
setInventoryEventService
-
pushCurrentTemplateName
-
popCurrentTemplateName
public void popCurrentTemplateName() -
getCurrentTemplateName
-
getTemplateNameStack
-
pushCurrentMacroName
-
popCurrentMacroName
public void popCurrentMacroName() -
getCurrentMacroName
-
getCurrentMacroCallDepth
public int getCurrentMacroCallDepth() -
getMacroNameStack
-
icacheGet
-
icachePut
public void icachePut(Object arg0, org.apache.velocity.util.introspection.IntrospectionCacheData arg1) -
setCurrentResource
public void setCurrentResource(org.apache.velocity.runtime.resource.Resource arg0) -
getCurrentResource
public org.apache.velocity.runtime.resource.Resource getCurrentResource() -
setMacroLibraries
-
getMacroLibraries
-
attachEventCartridge
public org.apache.velocity.app.event.EventCartridge attachEventCartridge(org.apache.velocity.app.event.EventCartridge arg0) - Specified by:
attachEventCartridgein interfaceorg.apache.velocity.context.InternalEventContext
-
getEventCartridge
public org.apache.velocity.app.event.EventCartridge getEventCartridge()- Specified by:
getEventCartridgein interfaceorg.apache.velocity.context.InternalEventContext
-