Package com.hybris.backoffice.tree.model
Class CatalogTreeModelPopulator
- java.lang.Object
-
- com.hybris.backoffice.tree.model.CatalogTreeModelPopulator
-
- All Implemented Interfaces:
com.hybris.cockpitng.model.ComponentModelPopulator<org.zkoss.zul.TreeModel<org.zkoss.zul.TreeNode<ItemModel>>>,com.hybris.cockpitng.tree.node.DynamicNodePopulator
- Direct Known Subclasses:
BundleTemplatesModelPopulator
public class CatalogTreeModelPopulator extends java.lang.Object implements com.hybris.cockpitng.model.ComponentModelPopulator<org.zkoss.zul.TreeModel<org.zkoss.zul.TreeNode<ItemModel>>>, com.hybris.cockpitng.tree.node.DynamicNodePopulator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCatalogTreeModelPopulator.CatalogTreeModel
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALL_CATALOGS_NODE_IDstatic java.lang.StringBACKOFFICE_CONFIGURATION_CATALOG_IDstatic java.lang.StringI18N_CATALOGTREEMODELPOPULATOR_ALLCATALOGSstatic java.lang.StringI18N_CATALOGTREEMODELPOPULATOR_UNCATEGORIZEDstatic java.lang.StringMULTI_SELECTstatic java.lang.StringSHOW_ALL_CATALOGS_NODEstatic java.lang.StringSHOW_UNCATEGORIZED_CATALOG_NODEstatic java.lang.StringSHOW_UNCATEGORIZED_CATALOG_VERSION_NODEstatic java.lang.StringSHOW_UNCATEGORIZED_CLASSIFICATION_CATALOG_VERSION_NODEstatic java.lang.StringSHOW_UNCATEGORIZED_ROOT_NODEstatic java.lang.StringSIMPLE_LABELS_CTX_PARAMETERSstatic java.lang.StringUNCATEGORIZED_PRODUCTS_NODE_ID
-
Constructor Summary
Constructors Constructor Description CatalogTreeModelPopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected com.hybris.cockpitng.core.context.CockpitContextcreateCockpitContext(com.hybris.backoffice.navigation.NavigationNode node)protected com.hybris.cockpitng.tree.node.DynamicNodecreateDynamicNode(com.hybris.backoffice.navigation.NavigationNode node, org.zkoss.zul.TreeNode treeNode, java.lang.String label)protected java.lang.StringcreateDynamicNodeId(com.hybris.backoffice.navigation.NavigationNode node, java.lang.String postFix)org.zkoss.zul.TreeModel<org.zkoss.zul.TreeNode<ItemModel>>createModel(com.hybris.cockpitng.core.context.CockpitContext context)protected java.lang.StringcreateParentNodesIdPrefix(com.hybris.backoffice.navigation.NavigationNode node)protected java.util.List<com.hybris.backoffice.navigation.NavigationNode>filterAvailableCategories(java.util.function.Function<org.zkoss.zul.TreeNode,com.hybris.cockpitng.tree.node.DynamicNode> nodeCreator, java.util.Collection<CategoryModel> categories)protected java.util.List<com.hybris.backoffice.navigation.NavigationNode>findChildrenNavigationNodes(com.hybris.backoffice.navigation.NavigationNode node)protected java.util.Collection<CatalogVersionModel>getAllCatalogVersions()java.util.Collection<CatalogModel>getAllReadableCatalogs(com.hybris.cockpitng.core.context.CockpitContext context)protected java.util.List<CatalogVersionModel>getAllReadableCatalogVersions(CatalogModel data)protected java.util.Collection<CatalogVersionModel>getAllReadableCatalogVersionsForCurrentUser()CatalogServicegetCatalogService()CatalogTreeSimpleLabelProvidergetCatalogTreeSimpleLabelProvider()CatalogVersionServicegetCatalogVersionService()protected java.util.function.Function<org.zkoss.zul.TreeNode,com.hybris.cockpitng.tree.node.DynamicNode>getCategoryDynamicNodeCreatorFunction(com.hybris.backoffice.navigation.NavigationNode node)java.util.List<com.hybris.backoffice.navigation.NavigationNode>getChildren(com.hybris.backoffice.navigation.NavigationNode node)com.hybris.cockpitng.core.user.CockpitUserServicegetCockpitUserService()Deprecated, for removal: This API element is subject to removal in a future version.since 19.05 - implementation not use it any more, seegetAllReadableCatalogVersionsForCurrentUser()java.util.Set<java.lang.String>getExcludedTypes()protected intgetIndexingDepth(com.hybris.backoffice.navigation.NavigationNode node)com.hybris.cockpitng.labels.LabelServicegetLabelService()intgetPartitionThreshold()com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacadegetPermissionFacade()protected java.util.function.Function<org.zkoss.zul.TreeNode,com.hybris.cockpitng.tree.node.DynamicNode>getRegularNodeCreatorFunction(com.hybris.backoffice.navigation.NavigationNode node)org.zkoss.zul.TreeNode<ItemModel>getRoot(com.hybris.cockpitng.core.context.CockpitContext context)protected SessionServicegetSessionService()com.hybris.cockpitng.dataaccess.facades.type.TypeFacadegetTypeFacade()TypeServicegetTypeService()UserServicegetUserService()protected booleanisCatalogAvailableInContext(CatalogModel catalogModel, com.hybris.cockpitng.core.context.CockpitContext context)protected booleanisCatalogVersionAvailableInContext(CatalogVersionModel catalogVersionModel, com.hybris.cockpitng.core.context.CockpitContext context)protected booleanisParentIdAppended(java.lang.String parentId, java.lang.StringBuilder childId)protected booleanisSupportedType(java.lang.String typeCode)protected java.util.List<com.hybris.backoffice.navigation.NavigationNode>partitionNodes(com.hybris.backoffice.navigation.NavigationNode parent, java.util.List<com.hybris.backoffice.navigation.NavigationNode> nodes)voidpostConstruct()protected com.hybris.cockpitng.tree.node.DynamicNodeprepareAllCatalogsNode(com.hybris.backoffice.navigation.NavigationNode rootNode)protected java.util.List<com.hybris.backoffice.navigation.NavigationNode>prepareCatalogNodes(com.hybris.backoffice.navigation.NavigationNode node)protected java.util.List<com.hybris.backoffice.navigation.NavigationNode>prepareCatalogVersionNodes(com.hybris.backoffice.navigation.NavigationNode node, CatalogModel nodeData)protected java.lang.StringprepareNodeLabel(org.zkoss.zul.TreeNode treeNode, com.hybris.backoffice.navigation.NavigationNode parentNode, java.util.function.Function<java.lang.Object,java.lang.String> labelServiceFn)protected java.util.List<com.hybris.backoffice.navigation.NavigationNode>prepareRootCategoryNodes(com.hybris.backoffice.navigation.NavigationNode node, CatalogVersionModel nodeData)protected java.util.List<com.hybris.backoffice.navigation.NavigationNode>prepareSubcategoryNodes(com.hybris.backoffice.navigation.NavigationNode node, CategoryModel nodeData)protected com.hybris.cockpitng.tree.node.DynamicNodeprepareUncategorizedProductsNode(com.hybris.backoffice.navigation.NavigationNode rootNode, ItemModel parentObject)voidsetCatalogService(CatalogService catalogService)voidsetCatalogTreeSimpleLabelProvider(CatalogTreeSimpleLabelProvider catalogTreeSimpleLabelProvider)voidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetCockpitUserService(com.hybris.cockpitng.core.user.CockpitUserService cockpitUserService)Deprecated, for removal: This API element is subject to removal in a future version.since 19.05 - implementation not use it any more, seegetAllReadableCatalogVersionsForCurrentUser()voidsetExcludedTypes(java.util.Set<java.lang.String> excludedTypes)voidsetLabelService(com.hybris.cockpitng.labels.LabelService labelService)voidsetPartitionThreshold(int partitionThreshold)voidsetPermissionFacade(com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacade permissionFacade)voidsetSessionService(SessionService sessionService)voidsetTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)voidsetTypeService(TypeService typeService)voidsetUserService(UserService userService)protected booleanshowUncategorizedNodeForCatalogVersion(com.hybris.backoffice.navigation.NavigationNode node, CatalogVersionModel nodeData)
-
-
-
Field Detail
-
MULTI_SELECT
public static final java.lang.String MULTI_SELECT
-
SHOW_ALL_CATALOGS_NODE
public static final java.lang.String SHOW_ALL_CATALOGS_NODE
-
SHOW_UNCATEGORIZED_ROOT_NODE
public static final java.lang.String SHOW_UNCATEGORIZED_ROOT_NODE
-
SHOW_UNCATEGORIZED_CATALOG_NODE
public static final java.lang.String SHOW_UNCATEGORIZED_CATALOG_NODE
-
SHOW_UNCATEGORIZED_CATALOG_VERSION_NODE
public static final java.lang.String SHOW_UNCATEGORIZED_CATALOG_VERSION_NODE
-
SHOW_UNCATEGORIZED_CLASSIFICATION_CATALOG_VERSION_NODE
public static final java.lang.String SHOW_UNCATEGORIZED_CLASSIFICATION_CATALOG_VERSION_NODE
-
ALL_CATALOGS_NODE_ID
public static final java.lang.String ALL_CATALOGS_NODE_ID
- See Also:
- Constant Field Values
-
UNCATEGORIZED_PRODUCTS_NODE_ID
public static final java.lang.String UNCATEGORIZED_PRODUCTS_NODE_ID
- See Also:
- Constant Field Values
-
I18N_CATALOGTREEMODELPOPULATOR_ALLCATALOGS
public static final java.lang.String I18N_CATALOGTREEMODELPOPULATOR_ALLCATALOGS
- See Also:
- Constant Field Values
-
I18N_CATALOGTREEMODELPOPULATOR_UNCATEGORIZED
public static final java.lang.String I18N_CATALOGTREEMODELPOPULATOR_UNCATEGORIZED
- See Also:
- Constant Field Values
-
SIMPLE_LABELS_CTX_PARAMETERS
public static final java.lang.String SIMPLE_LABELS_CTX_PARAMETERS
- See Also:
- Constant Field Values
-
BACKOFFICE_CONFIGURATION_CATALOG_ID
public static final java.lang.String BACKOFFICE_CONFIGURATION_CATALOG_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
postConstruct
@PostConstruct public void postConstruct()
-
createModel
public org.zkoss.zul.TreeModel<org.zkoss.zul.TreeNode<ItemModel>> createModel(com.hybris.cockpitng.core.context.CockpitContext context)
- Specified by:
createModelin interfacecom.hybris.cockpitng.model.ComponentModelPopulator<org.zkoss.zul.TreeModel<org.zkoss.zul.TreeNode<ItemModel>>>
-
getChildren
public java.util.List<com.hybris.backoffice.navigation.NavigationNode> getChildren(com.hybris.backoffice.navigation.NavigationNode node)
- Specified by:
getChildrenin interfacecom.hybris.cockpitng.tree.node.DynamicNodePopulator
-
findChildrenNavigationNodes
protected java.util.List<com.hybris.backoffice.navigation.NavigationNode> findChildrenNavigationNodes(com.hybris.backoffice.navigation.NavigationNode node)
-
prepareCatalogNodes
protected java.util.List<com.hybris.backoffice.navigation.NavigationNode> prepareCatalogNodes(com.hybris.backoffice.navigation.NavigationNode node)
-
prepareCatalogVersionNodes
protected java.util.List<com.hybris.backoffice.navigation.NavigationNode> prepareCatalogVersionNodes(com.hybris.backoffice.navigation.NavigationNode node, CatalogModel nodeData)
-
prepareRootCategoryNodes
protected java.util.List<com.hybris.backoffice.navigation.NavigationNode> prepareRootCategoryNodes(com.hybris.backoffice.navigation.NavigationNode node, CatalogVersionModel nodeData)
-
showUncategorizedNodeForCatalogVersion
protected boolean showUncategorizedNodeForCatalogVersion(com.hybris.backoffice.navigation.NavigationNode node, CatalogVersionModel nodeData)
-
prepareSubcategoryNodes
protected java.util.List<com.hybris.backoffice.navigation.NavigationNode> prepareSubcategoryNodes(com.hybris.backoffice.navigation.NavigationNode node, CategoryModel nodeData)
-
getRegularNodeCreatorFunction
protected java.util.function.Function<org.zkoss.zul.TreeNode,com.hybris.cockpitng.tree.node.DynamicNode> getRegularNodeCreatorFunction(com.hybris.backoffice.navigation.NavigationNode node)
-
getCategoryDynamicNodeCreatorFunction
protected java.util.function.Function<org.zkoss.zul.TreeNode,com.hybris.cockpitng.tree.node.DynamicNode> getCategoryDynamicNodeCreatorFunction(com.hybris.backoffice.navigation.NavigationNode node)
-
prepareNodeLabel
protected java.lang.String prepareNodeLabel(org.zkoss.zul.TreeNode treeNode, com.hybris.backoffice.navigation.NavigationNode parentNode, java.util.function.Function<java.lang.Object,java.lang.String> labelServiceFn)
-
createDynamicNode
protected com.hybris.cockpitng.tree.node.DynamicNode createDynamicNode(com.hybris.backoffice.navigation.NavigationNode node, org.zkoss.zul.TreeNode treeNode, java.lang.String label)
-
prepareAllCatalogsNode
protected com.hybris.cockpitng.tree.node.DynamicNode prepareAllCatalogsNode(com.hybris.backoffice.navigation.NavigationNode rootNode)
-
prepareUncategorizedProductsNode
protected com.hybris.cockpitng.tree.node.DynamicNode prepareUncategorizedProductsNode(com.hybris.backoffice.navigation.NavigationNode rootNode, ItemModel parentObject)
-
createDynamicNodeId
protected java.lang.String createDynamicNodeId(com.hybris.backoffice.navigation.NavigationNode node, java.lang.String postFix)
-
createParentNodesIdPrefix
protected java.lang.String createParentNodesIdPrefix(com.hybris.backoffice.navigation.NavigationNode node)
-
isParentIdAppended
protected boolean isParentIdAppended(java.lang.String parentId, java.lang.StringBuilder childId)
-
filterAvailableCategories
protected java.util.List<com.hybris.backoffice.navigation.NavigationNode> filterAvailableCategories(java.util.function.Function<org.zkoss.zul.TreeNode,com.hybris.cockpitng.tree.node.DynamicNode> nodeCreator, java.util.Collection<CategoryModel> categories)
-
partitionNodes
protected java.util.List<com.hybris.backoffice.navigation.NavigationNode> partitionNodes(com.hybris.backoffice.navigation.NavigationNode parent, java.util.List<com.hybris.backoffice.navigation.NavigationNode> nodes)
-
getIndexingDepth
protected int getIndexingDepth(com.hybris.backoffice.navigation.NavigationNode node)
-
createCockpitContext
protected com.hybris.cockpitng.core.context.CockpitContext createCockpitContext(com.hybris.backoffice.navigation.NavigationNode node)
-
getAllReadableCatalogs
public java.util.Collection<CatalogModel> getAllReadableCatalogs(com.hybris.cockpitng.core.context.CockpitContext context)
-
isCatalogAvailableInContext
protected boolean isCatalogAvailableInContext(CatalogModel catalogModel, com.hybris.cockpitng.core.context.CockpitContext context)
-
isCatalogVersionAvailableInContext
protected boolean isCatalogVersionAvailableInContext(CatalogVersionModel catalogVersionModel, com.hybris.cockpitng.core.context.CockpitContext context)
-
getRoot
public org.zkoss.zul.TreeNode<ItemModel> getRoot(com.hybris.cockpitng.core.context.CockpitContext context)
-
getCatalogService
public CatalogService getCatalogService()
-
setCatalogService
public void setCatalogService(CatalogService catalogService)
-
getPermissionFacade
public com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacade getPermissionFacade()
-
setPermissionFacade
public void setPermissionFacade(com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacade permissionFacade)
-
getCatalogVersionService
public CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
getCockpitUserService
@Deprecated(since="19.05", forRemoval=true) public com.hybris.cockpitng.core.user.CockpitUserService getCockpitUserService()Deprecated, for removal: This API element is subject to removal in a future version.since 19.05 - implementation not use it any more, seegetAllReadableCatalogVersionsForCurrentUser()
-
setCockpitUserService
@Deprecated(since="19.05", forRemoval=true) public void setCockpitUserService(com.hybris.cockpitng.core.user.CockpitUserService cockpitUserService)Deprecated, for removal: This API element is subject to removal in a future version.since 19.05 - implementation not use it any more, seegetAllReadableCatalogVersionsForCurrentUser()
-
getUserService
public UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
getAllReadableCatalogVersions
protected java.util.List<CatalogVersionModel> getAllReadableCatalogVersions(CatalogModel data)
-
getAllReadableCatalogVersionsForCurrentUser
protected java.util.Collection<CatalogVersionModel> getAllReadableCatalogVersionsForCurrentUser()
-
getAllCatalogVersions
protected java.util.Collection<CatalogVersionModel> getAllCatalogVersions()
-
isSupportedType
protected boolean isSupportedType(java.lang.String typeCode)
-
getTypeFacade
public com.hybris.cockpitng.dataaccess.facades.type.TypeFacade getTypeFacade()
-
setTypeFacade
public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
-
getTypeService
public TypeService getTypeService()
-
setTypeService
public void setTypeService(TypeService typeService)
-
getPartitionThreshold
public int getPartitionThreshold()
-
setPartitionThreshold
public void setPartitionThreshold(int partitionThreshold)
-
getCatalogTreeSimpleLabelProvider
public CatalogTreeSimpleLabelProvider getCatalogTreeSimpleLabelProvider()
-
setCatalogTreeSimpleLabelProvider
public void setCatalogTreeSimpleLabelProvider(CatalogTreeSimpleLabelProvider catalogTreeSimpleLabelProvider)
-
getExcludedTypes
public java.util.Set<java.lang.String> getExcludedTypes()
-
setExcludedTypes
public void setExcludedTypes(java.util.Set<java.lang.String> excludedTypes)
-
getLabelService
public com.hybris.cockpitng.labels.LabelService getLabelService()
-
setLabelService
public void setLabelService(com.hybris.cockpitng.labels.LabelService labelService)
-
getSessionService
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
-