public abstract class Contact extends AbstractHierarchyListItem2
Modifier and Type | Class and Description |
---|---|
static class |
Contact.UpdateStatus |
HierarchyListItem.ComparatorSort, HierarchyListItem.Sort, HierarchyListItem.SortAlphabet, HierarchyListItem.SortAlphabetDesc, HierarchyListItem.SortDistanceFrom
Modifier and Type | Field and Description |
---|---|
static int |
BACKGROUND_COLOR_ALIVE |
static int |
BACKGROUND_COLOR_DEAD |
static int |
BACKGROUND_COLOR_NA |
static int |
BACKGROUND_COLOR_STALE |
protected java.lang.String |
contactUUID |
static int |
FOREGROUND_COLOR_ALIVE |
static int |
FOREGROUND_COLOR_DEAD |
static int |
FOREGROUND_COLOR_STALE |
asyncRefresh, children, disposed, filter, listener, postFilter, reusable, uiHandler
Modifier and Type | Method and Description |
---|---|
boolean |
descendedFrom(java.lang.String uid)
Determine if this contact is within the hierarchy of UID
|
void |
dispatchChangeEvent() |
void |
dispose()
Unregister any listeners,
|
java.util.List<java.lang.String[]> |
findChildPaths(java.lang.String uid)
Find the path to the child contact UID to this contact
|
<T extends Action> |
getAction(java.lang.Class<T> clazz)
Returns an instance of the specified action that can be used to interact with the node's
underlying content.
|
int |
getBackgroundColor()
Get the color of the contact view background
|
java.util.List<Contact> |
getChildContacts() |
int |
getDescendantCount()
Returns the total number of descendant nodes that this node has.
|
android.os.Bundle |
getExtras() |
android.view.View |
getExtraView()
Returns the extra view, if any, associated with the node.
|
java.util.List<Contact> |
getFiltered(boolean onlineOnly,
boolean incParents)
Return a complete list of filtered contacts
This includes descendant contacts
|
java.util.List<java.lang.String> |
getFilteredUIDs(boolean onlineOnly) |
java.lang.String[] |
getHierarchyPath()
Get the path to this contact as a string array
Form is [name1, uid1, name2, uid2, ..., nameN, uidN]
This is used specifically for CoT events
|
java.lang.String |
getName()
Return the display name of the contact
|
Contact |
getParent() |
java.util.List<Contact> |
getParentContacts(boolean filtered) |
java.util.List<Contact> |
getParentHierarchy() |
java.lang.String |
getParentUID()
Return the UID of this contact's parent
For individual contacts this is "Root"
|
java.lang.Integer |
getPresenceColor()
Get color of presence indicator, or null if not applicable
|
int |
getTextColor()
Get the text color of the contact name text view
|
java.lang.String |
getTitle()
Returns the title to be displayed for the item.
|
java.lang.String |
getUID()
Hierarchy list item methods
|
int |
getUnreadCount() |
Contact.UpdateStatus |
getUpdateStatus() |
java.lang.Object |
getUserObject()
Returns the user object associated with the node.
|
protected void |
notifyListener() |
HierarchyListFilter |
refresh(HierarchyListFilter filter)
Send a refresh request to the thread pool
|
void |
refresh(java.lang.String reason) |
void |
setDispatch(boolean bDispatch) |
void |
setExtras(android.os.Bundle extras) |
void |
setListener(android.widget.BaseAdapter listener)
Set the listener adapter that is notified when refresh is finished
|
void |
setName(java.lang.String name)
Set the display name of the contact
|
void |
setParentUID(java.lang.String uid)
Set the parent UID of this contact
For groups, should typically let addContact handle this
|
protected void |
setUid(java.lang.String uid)
Set the uid of the contact
This should only be used for special cases (see RoleGroup)
|
void |
setUnreadCount(int unreadCount) |
void |
setUpdateStatus(Contact.UpdateStatus status) |
protected void |
updateChildren(java.util.List<HierarchyListItem> items)
Copy a list of items to the children array on the UI thread
|
protected boolean |
validChild(HierarchyListItem item)
Check if a child item is valid
Assumes item is already part of this.children
|
async, buildQueryParams, delete, disposeChildren, disposeItems, find, findChild, getAssociationKey, getChildActions, getChildAt, getChildCount, getChildren, getCustomLayout, getDefaultSortModes, getDeleteActions, getDescription, getDropDownSize, getExtraView, getFilter, getFooterView, getHeaderView, getIconColor, getIconDrawable, getIconUri, getListItemView, getLocalData, getLocalData, getPreferredListIndex, getSorts, getVisibility, isChildSupported, isDisposed, isGetChildrenSupported, isMultiSelectSupported, isVisible, notifyListener, postAccept, postRefresh, refresh, refresh, refresh, refreshImpl, requestRefresh, requestRefresh, search, setLocalData, setPostFilter, setVisible, sortItems, syncRefresh
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hideIfEmpty
public static final int BACKGROUND_COLOR_ALIVE
public static final int BACKGROUND_COLOR_STALE
public static final int BACKGROUND_COLOR_DEAD
public static final int BACKGROUND_COLOR_NA
public static final int FOREGROUND_COLOR_ALIVE
public static final int FOREGROUND_COLOR_STALE
public static final int FOREGROUND_COLOR_DEAD
protected java.lang.String contactUUID
public void setDispatch(boolean bDispatch)
public java.lang.String getName()
public void setName(java.lang.String name)
name
- Display nameprotected void setUid(java.lang.String uid)
uid
- New UIDpublic android.os.Bundle getExtras()
public void setExtras(android.os.Bundle extras)
public void dispatchChangeEvent()
public void setUpdateStatus(Contact.UpdateStatus status)
public Contact.UpdateStatus getUpdateStatus()
public int getTextColor()
public int getBackgroundColor()
public java.lang.Integer getPresenceColor()
public java.lang.String getUID()
getUID
in interface HierarchyListItem
getUID
in class AbstractHierarchyListItem2
public java.lang.String getTitle()
HierarchyListItem
public int getDescendantCount()
HierarchyListItem
public java.lang.Object getUserObject()
HierarchyListItem
null
.public android.view.View getExtraView()
HierarchyListItem
getExtraView
in interface HierarchyListItem
getExtraView
in class AbstractHierarchyListItem2
null
if there is no view.public HierarchyListFilter refresh(HierarchyListFilter filter)
AbstractHierarchyListItem2
refresh
in interface HierarchyListItem2
refresh
in class AbstractHierarchyListItem2
filter
- The new filterpublic void refresh(java.lang.String reason)
public java.util.List<Contact> getChildContacts()
public java.util.List<Contact> getFiltered(boolean onlineOnly, boolean incParents)
onlineOnly
- True to only include valid (online) contactsincParents
- True to include contacts that are members
of any parent groupspublic java.util.List<java.lang.String> getFilteredUIDs(boolean onlineOnly)
public java.util.List<Contact> getParentContacts(boolean filtered)
public java.util.List<Contact> getParentHierarchy()
protected void updateChildren(java.util.List<HierarchyListItem> items)
AbstractHierarchyListItem2
updateChildren
in class AbstractHierarchyListItem2
items
- List of filtered/sorted itemsprotected void notifyListener()
notifyListener
in class AbstractHierarchyListItem2
public java.lang.String getParentUID()
public void setParentUID(java.lang.String uid)
uid
- Parent UIDpublic Contact getParent()
public java.lang.String[] getHierarchyPath()
public boolean descendedFrom(java.lang.String uid)
uid
- UID of the parent contact to checkpublic java.util.List<java.lang.String[]> findChildPaths(java.lang.String uid)
uid
- Child contact UIDpublic void setListener(android.widget.BaseAdapter listener)
listener
- Listener adapterprotected boolean validChild(HierarchyListItem item)
item
- Item to testpublic void dispose()
HierarchyListItem2
dispose
in interface HierarchyListItem2
dispose
in class AbstractHierarchyListItem2
public <T extends Action> T getAction(java.lang.Class<T> clazz)
HierarchyListItem
getAction
in interface HierarchyListItem
getAction
in class AbstractHierarchyListItem2
clazz
- The action classnull
if the specified
action is not supported for the node.public int getUnreadCount()
public void setUnreadCount(int unreadCount)