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:
java.lang.Cloneable,org.apache.velocity.context.Context,org.apache.velocity.context.InternalEventContext
public class ConsolidatedPickSlipContext extends AbstractDocumentContext<BusinessProcessModel>
Context for ConsolidatedPickLabel generating and sorting the form entries.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.acceleratorservices.document.context.AbstractDocumentContext
DOCUMENT_LANGUAGE
-
Fields 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 Constructor Description ConsolidatedPickSlipContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.velocity.app.event.EventCartridgeattachEventCartridge(org.apache.velocity.app.event.EventCartridge arg0)protected java.util.List<ConsolidatedPickSlipFormEntry>createPickSlipFormEntries(java.util.List<ConsignmentEntryModel> consignmentEntries)Creates a list ofConsignmentEntryModel.java.lang.StringescapeHtml(java.lang.String stringToEscape)Escapes String to generate safe HTMLprotected java.util.Collection<AllocationEventModel>extractAllocationEvents(ConsignmentEntryModel consignmentEntryModel)Extracts the bin location of the product for the selectedConsignmentEntryModelprotected java.lang.StringextractBin(AllocationEventModel allocationEventModel)Extracts the bin out of theStockLevelModelin theAllocationEventModelprotected java.util.List<ConsignmentModel>extractConsignments(BusinessProcessModel businessProcessModel)java.util.List<ConsignmentModel>getConsignmentList()protected java.util.Comparator<ConsolidatedPickSlipFormEntry>getConsolidatedPickSlipComparator()intgetCurrentMacroCallDepth()java.lang.StringgetCurrentMacroName()org.apache.velocity.runtime.resource.ResourcegetCurrentResource()java.lang.StringgetCurrentTemplateName()org.apache.velocity.tools.generic.DateToolgetDate()protected LanguageModelgetDocumentLanguage(BusinessProcessModel businessProcessModel)org.apache.velocity.app.event.EventCartridgegetEventCartridge()java.util.List<ConsolidatedPickSlipFormEntry>getFormEntries()protected InventoryEventServicegetInventoryEventService()java.util.ListgetMacroLibraries()java.lang.Object[]getMacroNameStack()java.lang.StringgetProductImageURL(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)java.lang.Object[]getTemplateNameStack()org.apache.velocity.util.introspection.IntrospectionCacheDataicacheGet(java.lang.Object arg0)voidicachePut(java.lang.Object arg0, org.apache.velocity.util.introspection.IntrospectionCacheData arg1)voidinit(BusinessProcessModel businessProcessModel, DocumentPageModel documentPageModel)voidpopCurrentMacroName()voidpopCurrentTemplateName()voidpushCurrentMacroName(java.lang.String arg0)voidpushCurrentTemplateName(java.lang.String arg0)voidsetConsignmentList(java.util.List<ConsignmentModel> consignmentList)voidsetConsolidatedPickSlipComparator(java.util.Comparator<ConsolidatedPickSlipFormEntry> consolidatedPickSlipComparator)voidsetCurrentResource(org.apache.velocity.runtime.resource.Resource arg0)voidsetFormEntries(java.util.List<ConsolidatedPickSlipFormEntry> formEntries)voidsetInventoryEventService(InventoryEventService inventoryEventService)voidsetMacroLibraries(java.util.List arg0)-
Methods inherited from class de.hybris.platform.acceleratorservices.document.context.AbstractDocumentContext
getDocumentLanguage
-
Methods 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, setUrlEncodingAttributes
-
Methods inherited from class org.apache.velocity.VelocityContext
clone, internalContainsKey, internalGet, internalGetKeys, internalPut, internalRemove
-
-
-
-
Method Detail
-
init
public void init(BusinessProcessModel businessProcessModel, DocumentPageModel documentPageModel)
- Overrides:
initin classAbstractDocumentContext<BusinessProcessModel>
-
escapeHtml
public java.lang.String escapeHtml(java.lang.String stringToEscape)
Escapes String to generate safe HTML- Parameters:
stringToEscape- String to escape- Returns:
- escaped String
-
createPickSlipFormEntries
protected java.util.List<ConsolidatedPickSlipFormEntry> createPickSlipFormEntries(java.util.List<ConsignmentEntryModel> consignmentEntries)
Creates a list ofConsignmentEntryModel. Groups by product and bin and sorts using a comparator.- Parameters:
consignmentEntries- Consignment Entries
-
extractBin
protected java.lang.String extractBin(AllocationEventModel allocationEventModel)
Extracts the bin out of theStockLevelModelin theAllocationEventModel- Parameters:
allocationEventModel- theAllocationEventModel- Returns:
- a string containing the bin
-
extractConsignments
protected java.util.List<ConsignmentModel> extractConsignments(BusinessProcessModel businessProcessModel)
- Parameters:
businessProcessModel- the businessProcess containing the consignments- Returns:
- list of
ConsignmentModel
-
getSite
protected BaseSiteModel getSite(BusinessProcessModel businessProcessModel)
- Specified by:
getSitein classAbstractDocumentContext<BusinessProcessModel>
-
getDocumentLanguage
protected LanguageModel getDocumentLanguage(BusinessProcessModel businessProcessModel)
- Specified by:
getDocumentLanguagein classAbstractDocumentContext<BusinessProcessModel>
-
extractAllocationEvents
protected java.util.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
public java.lang.String getProductImageURL(ProductModel productModel)
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
public java.util.List<ConsolidatedPickSlipFormEntry> getFormEntries()
-
setFormEntries
public void setFormEntries(java.util.List<ConsolidatedPickSlipFormEntry> formEntries)
-
getConsignmentList
public java.util.List<ConsignmentModel> getConsignmentList()
-
setConsignmentList
public void setConsignmentList(java.util.List<ConsignmentModel> consignmentList)
-
getConsolidatedPickSlipComparator
protected java.util.Comparator<ConsolidatedPickSlipFormEntry> getConsolidatedPickSlipComparator()
-
setConsolidatedPickSlipComparator
public void setConsolidatedPickSlipComparator(java.util.Comparator<ConsolidatedPickSlipFormEntry> consolidatedPickSlipComparator)
-
getInventoryEventService
protected InventoryEventService getInventoryEventService()
-
setInventoryEventService
public void setInventoryEventService(InventoryEventService inventoryEventService)
-
pushCurrentTemplateName
public void pushCurrentTemplateName(java.lang.String arg0)
-
popCurrentTemplateName
public void popCurrentTemplateName()
-
getCurrentTemplateName
public java.lang.String getCurrentTemplateName()
-
getTemplateNameStack
public java.lang.Object[] getTemplateNameStack()
-
pushCurrentMacroName
public void pushCurrentMacroName(java.lang.String arg0)
-
popCurrentMacroName
public void popCurrentMacroName()
-
getCurrentMacroName
public java.lang.String getCurrentMacroName()
-
getCurrentMacroCallDepth
public int getCurrentMacroCallDepth()
-
getMacroNameStack
public java.lang.Object[] getMacroNameStack()
-
icacheGet
public org.apache.velocity.util.introspection.IntrospectionCacheData icacheGet(java.lang.Object arg0)
-
icachePut
public void icachePut(java.lang.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
public void setMacroLibraries(java.util.List arg0)
-
getMacroLibraries
public java.util.List 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
-
-