Class QualifierLabel
- java.lang.Object
-
- com.hybris.cockpitng.widgets.util.QualifierLabel
-
public class QualifierLabel extends java.lang.ObjectPOJO representing a result of nested qualifiers value's label evaluation.Class contains information whether evaluation was finished successfully and if so, then what label was a result of this evaluation.
-
-
Field Summary
Fields Modifier and Type Field Description static byteSTATUS_ERRORAn error occurred during evaluation.static byteSTATUS_RESTRICTEDIndicates that during evaluation a restricted property has been requested - current user has not enough privileges to evaluate qualifier.static byteSTATUS_SUCCESSIndicates that evaluation has finished successfully and a label is available atgetLabel()method
-
Constructor Summary
Constructors Constructor Description QualifierLabel(byte status, java.lang.String label)QualifierLabel(java.lang.String label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetLabel()Returns a label for evaluated nested qualifier's valuebytegetStatus()booleanisSuccessful()
-
-
-
Field Detail
-
STATUS_SUCCESS
public static final byte STATUS_SUCCESS
Indicates that evaluation has finished successfully and a label is available atgetLabel()method- See Also:
- Constant Field Values
-
STATUS_RESTRICTED
public static final byte STATUS_RESTRICTED
Indicates that during evaluation a restricted property has been requested - current user has not enough privileges to evaluate qualifier. Label is unavailable andgetLabel()will return appropriate message.- See Also:
- Constant Field Values
-
STATUS_ERROR
public static final byte STATUS_ERROR
An error occurred during evaluation. Most probably a qualifier provided is not valid SpEL expression or properties requested does not exist. Label is unavailable andgetLabel()will return errors message.- See Also:
- Constant Field Values
-
-
Method Detail
-
isSuccessful
public boolean isSuccessful()
- Returns:
trueif qualifier's value label evaluation was finished successfully
-
getLabel
public java.lang.String getLabel()
Returns a label for evaluated nested qualifier's value- Returns:
- qualifier's value label evaluation result
-
getStatus
public byte getStatus()
- Returns:
- status of evaluation
- See Also:
STATUS_SUCCESS,STATUS_RESTRICTED,STATUS_ERROR
-
-