Package zendesk.support
Class CategoryItem
- java.lang.Object
-
- zendesk.support.CategoryItem
-
-
Field Summary
-
Fields inherited from interface zendesk.support.HelpItem
TYPE_ARTICLE, TYPE_CATEGORY, TYPE_LOADING, TYPE_NO_RESULTS, TYPE_PADDING, TYPE_SECTION, TYPE_SEE_ALL
-
-
Constructor Summary
Constructors Constructor and Description CategoryItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)java.lang.LonggetId()Gets the ID of this item.java.lang.StringgetName()Gets the name of the itemjava.lang.LonggetParentId()Returns the ID of the parent item.java.util.List<SectionItem>getSections()intgetViewType()Gets the type of the iteminthashCode()booleanisExpanded()Checks if the category is expandedbooleansetExpanded(boolean expanded)Sets the expanded state.voidsetSections(java.util.List<SectionItem> sections)Sets the sections to set as the children of the category
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:HelpItemGets the name of the item
-
getId
public java.lang.Long getId()
Description copied from interface:HelpItemGets the ID of this item.
-
getParentId
public java.lang.Long getParentId()
Description copied from interface:HelpItemReturns the ID of the parent item.- Specified by:
getParentIdin interfaceHelpItem- Returns:
- the ID of the parent item, or null if there is none.
-
getSections
public java.util.List<SectionItem> getSections()
-
setSections
public void setSections(java.util.List<SectionItem> sections)
Sets the sections to set as the children of the category- Parameters:
sections- The sections to set as children
-
isExpanded
public boolean isExpanded()
Checks if the category is expanded- Returns:
- true if the category is expanded, false otherwise
-
setExpanded
public boolean setExpanded(boolean expanded)
Sets the expanded state. Set this to true to mark the category as expanded, false otherwise.- Parameters:
expanded- the state to set for expanded. true for expanded, false for contracted- Returns:
- the state of expanded after calling this method
-
getViewType
public int getViewType()
Description copied from interface:HelpItemGets the type of the item- Specified by:
getViewTypein interfaceHelpItem- Returns:
- the type of the item
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-