Class CSSClassResolverImpl
- java.lang.Object
-
- de.hybris.platform.sap.productconfig.frontend.util.impl.CSSClassResolverImpl
-
- All Implemented Interfaces:
CSSClassResolver
public class CSSClassResolverImpl extends java.lang.Object implements CSSClassResolver
Default implementation ofCSSClassResolver
-
-
Constructor Summary
Constructors Constructor Description CSSClassResolverImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringappendStyleClass(java.lang.String styleClassString, java.lang.String styleClass)java.lang.StringgetExtendedMessageStyleClass(ProductConfigMessageData message)Returns the style class for the extended message.java.lang.StringgetGroupStatusTooltipKey(UiGroupData group)Computes the resource key for the tool-tip to be associated with the group statusjava.lang.StringgetGroupStyleClass(UiGroupData group)same as callingCSSClassResolver.getGroupStyleClass(UiGroupData, boolean)with hideExpandCollapse=false.java.lang.StringgetGroupStyleClass(UiGroupData group, boolean hideExpandCollapse)Computes the group style based and theGroupStatusType.java.lang.StringgetLabelStyleClass(CsticData cstic)Computes the label style based on theCsticStatusTypeof the corresponding cstic.
So for example one can style cstics with an error differently from ones without an error.java.lang.StringgetMenuConflictStyleClass(UiGroupData conflict)Computes the style for an conflict node in the configuration menu.
If the node is representing an ordinary group, please useCSSClassResolver.getMenuNodeStyleClass(UiGroupData, Integer)java.lang.StringgetMenuNodeStyleClass(UiGroupData group, java.lang.Integer level)Computes the style for an ordinary node in the configuration menu based on several aspects:
the level of the node in the menu hierarchy collapsed/expanded state of node whether the node is a leaf node or notGroupStatusTypeof the ui group represented by this node If the node is representing a conflict group, please useCSSClassResolver.getMenuConflictStyleClass(UiGroupData)java.lang.StringgetMessageIconStyleClass(ProductConfigMessageData message)Returns the style class for the message icon.java.lang.StringgetMessageTextAdditionalStyleClass(ProductConfigMessageData message)Returns the additional style class for the message text if necessary.java.lang.StringgetValuePromoStyleClass(CsticData cstic, CsticValueData value)Computes the style for a cstic value based on theCsticStatusTypeof the corresponding cstic.java.lang.StringgetValueStyleClass(CsticData cstic)Computes the style for a cstic based on theCsticStatusTypeof the corresponding cstic.protected booleanisMultiUiElementsType(CsticData cstic)protected booleanisNullorEmptyList(java.util.List<?> list)
-
-
-
Method Detail
-
getLabelStyleClass
public java.lang.String getLabelStyleClass(CsticData cstic)
Description copied from interface:CSSClassResolverComputes the label style based on theCsticStatusTypeof the corresponding cstic.
So for example one can style cstics with an error differently from ones without an error.- Specified by:
getLabelStyleClassin interfaceCSSClassResolver- Parameters:
cstic- cstic the label belongs to- Returns:
- style class string, may contain many classes
-
getValueStyleClass
public java.lang.String getValueStyleClass(CsticData cstic)
Description copied from interface:CSSClassResolverComputes the style for a cstic based on theCsticStatusTypeof the corresponding cstic. Additionally the cstic type, for example whether the cstic is multi-valued or not may influence the style.- Specified by:
getValueStyleClassin interfaceCSSClassResolver- Parameters:
cstic- cstic the value blongs to- Returns:
- style class string, may contain many classes
-
getValuePromoStyleClass
public java.lang.String getValuePromoStyleClass(CsticData cstic, CsticValueData value)
Description copied from interface:CSSClassResolverComputes the style for a cstic value based on theCsticStatusTypeof the corresponding cstic. Additionally the cstic value will be analysed if it is promo oppotunity or promo applied for the value.- Specified by:
getValuePromoStyleClassin interfaceCSSClassResolver- Parameters:
cstic- cstic to define a stylevalue- cstic value to define a style- Returns:
- style class string, may contain many classes
-
isMultiUiElementsType
protected boolean isMultiUiElementsType(CsticData cstic)
-
appendStyleClass
protected java.lang.String appendStyleClass(java.lang.String styleClassString, java.lang.String styleClass)
-
isNullorEmptyList
protected boolean isNullorEmptyList(java.util.List<?> list)
-
getGroupStyleClass
public java.lang.String getGroupStyleClass(UiGroupData group)
Description copied from interface:CSSClassResolversame as callingCSSClassResolver.getGroupStyleClass(UiGroupData, boolean)with hideExpandCollapse=false.- Specified by:
getGroupStyleClassin interfaceCSSClassResolver- Parameters:
group- group to check- Returns:
- style class string, may contain many classes
- See Also:
CSSClassResolver.getGroupStyleClass(UiGroupData)
-
getGroupStyleClass
public java.lang.String getGroupStyleClass(UiGroupData group, boolean hideExpandCollapse)
Description copied from interface:CSSClassResolverComputes the group style based and theGroupStatusType. Optionally the expand/collapse state of the group is considered
So for example one can style an group with an error different from a group which is complete and consistent.- Specified by:
getGroupStyleClassin interfaceCSSClassResolver- Parameters:
group- group to checkhideExpandCollapse- only iffalsethe expand/collapse state of the group is considered- Returns:
- style class string, may contain many classes
-
getMenuNodeStyleClass
public java.lang.String getMenuNodeStyleClass(UiGroupData group, java.lang.Integer level)
Description copied from interface:CSSClassResolverComputes the style for an ordinary node in the configuration menu based on several aspects:
- the level of the node in the menu hierarchy
- collapsed/expanded state of node
- whether the node is a leaf node or not
GroupStatusTypeof the ui group represented by this node
CSSClassResolver.getMenuConflictStyleClass(UiGroupData)- Specified by:
getMenuNodeStyleClassin interfaceCSSClassResolver- Parameters:
group- ui group representing the nodelevel- nesting level of the node in the menu hierarchy- Returns:
- style class string, may contain many classes
-
getMenuConflictStyleClass
public java.lang.String getMenuConflictStyleClass(UiGroupData conflict)
Description copied from interface:CSSClassResolverComputes the style for an conflict node in the configuration menu.
If the node is representing an ordinary group, please useCSSClassResolver.getMenuNodeStyleClass(UiGroupData, Integer)- Specified by:
getMenuConflictStyleClassin interfaceCSSClassResolver- Parameters:
conflict- conflicting ui group represented by this node- Returns:
- style class string, may contain many classes
-
getGroupStatusTooltipKey
public java.lang.String getGroupStatusTooltipKey(UiGroupData group)
Description copied from interface:CSSClassResolverComputes the resource key for the tool-tip to be associated with the group status- Specified by:
getGroupStatusTooltipKeyin interfaceCSSClassResolver- Parameters:
group- group to check- Returns:
- style class string, may contain many classes
- See Also:
CSSClassResolver.getGroupStyleClass(UiGroupData, boolean)
-
getMessageTextAdditionalStyleClass
public java.lang.String getMessageTextAdditionalStyleClass(ProductConfigMessageData message)
Description copied from interface:CSSClassResolverReturns the additional style class for the message text if necessary.- Specified by:
getMessageTextAdditionalStyleClassin interfaceCSSClassResolver- Parameters:
message- message to check- Returns:
- additional style class for message text
-
getExtendedMessageStyleClass
public java.lang.String getExtendedMessageStyleClass(ProductConfigMessageData message)
Description copied from interface:CSSClassResolverReturns the style class for the extended message. If message does not support extended message text the style class will be empty.- Specified by:
getExtendedMessageStyleClassin interfaceCSSClassResolver- Parameters:
message- message to check- Returns:
- style class for extended message text
-
getMessageIconStyleClass
public java.lang.String getMessageIconStyleClass(ProductConfigMessageData message)
Description copied from interface:CSSClassResolverReturns the style class for the message icon. If message does not support message icon the style class will be empty.- Specified by:
getMessageIconStyleClassin interfaceCSSClassResolver- Parameters:
message- message to check- Returns:
- style class for message icon
-
-