Class CategoryAncestryHydrationResponse
java.lang.Object
com.broadleafcommerce.catalog.service.category.hydration.CategoryAncestryHydrationResponse
Returned by
CategoryAncestryHydrationService
in response to hydration requests.- Author:
- Samarth Dhruva (samarthd)
-
Constructor Summary
ConstructorDescriptionCategoryAncestryHydrationResponse
(boolean successful, String errorMessage, CategoryAncestorList categoryAndAncestors) -
Method Summary
Modifier and TypeMethodDescriptionboolean
If the operation wassuccessful
, this will contain the category itself along with all of its ancestors.If the operation was notsuccessful
, this will contain an error message describing why.int
hashCode()
boolean
Reports whether the hydration of the ancestry was successful.success
(@NonNull CategoryAncestorList categoryAndAncestors) toString()
-
Constructor Details
-
CategoryAncestryHydrationResponse
public CategoryAncestryHydrationResponse(boolean successful, @Nullable String errorMessage, @Nullable CategoryAncestorList categoryAndAncestors)
-
-
Method Details
-
success
public static CategoryAncestryHydrationResponse success(@NonNull @NonNull CategoryAncestorList categoryAndAncestors) -
error
-
isSuccessful
public boolean isSuccessful()Reports whether the hydration of the ancestry was successful. -
getErrorMessage
If the operation was notsuccessful
, this will contain an error message describing why. -
getCategoryAndAncestors
If the operation wassuccessful
, this will contain the category itself along with all of its ancestors. TheCategoryAncestorList.ancestors
will be sorted starting with the direct parent and so on with the last element being the root-level ancestor. -
equals
-
hashCode
public int hashCode() -
toString
-