Class ListItem

java.lang.Object
com.amilesend.onedrive.resource.item.BaseItem
com.amilesend.onedrive.resource.site.ListItem

public class ListItem extends BaseItem
Represents an item in a list.

API Documentation.

See Also:
  • Field Details

  • Method Details

    • getColumnValues

      public GetColumnValuesResponse getColumnValues()
      Gets the associated columns and its values.

      API Documentation.

      Returns:
      the response
      See Also:
    • getColumnValues

      public GetColumnValuesResponse getColumnValues(List<String> columnsToSelect)
      Gets the selected columns and its values for the given list of column names.

      API Documentation.

      Parameters:
      columnsToSelect - the list of column names (max 12)
      Returns:
      the response
      See Also:
    • updateColumnValues

      public Map<String,Object> updateColumnValues(Map<String,Object> fields)
      Updates the defined columns and associated values for this list item. All other values on the list item are left alone.

      API Documentation.

      Parameters:
      fields - the fields to update
      Returns:
      the field value set containing all the columns and values
    • getListItemVersions

      public List<ListItemVersion> getListItemVersions()
      Gets the list of versions for this list item.

      API Documentation.

      Returns:
      the list item versions
    • getVersion

      public ListItemVersion getVersion(String versionId)
      Gets the ListItemVersion for the given versionId.

      API Documentation.

      Parameters:
      versionId - the list item version identifier
      Returns:
      the list item version
    • update

      public ListItem update()
      Updates this list item (e.g., name, description, parentReference, content type).

      API Documentation.

      Returns:
      the updated list item
    • delete

      public void delete()
      Deletes this item from the list.

      API Documentation.

    • builder

      public static ListItem.ListItemBuilder<?,?> builder()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BaseItem
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BaseItem
    • getFields

      public Map<String,Object> getFields()
      The key is the name of the column, the value is the associated value of the columns set on this list item.
    • getSharepointIds

      public SharePointIds getSharepointIds()
      The Sharepoint identifiers.
    • getDriveItem

      public DriveItem getDriveItem()
      For document libraries, the list item as a drive item.
    • getSiteId

      public String getSiteId()
      The associated site identifier.
    • getListId

      public String getListId()
      The associated list identifier.
    • getConnection

      public OneDriveConnection getConnection()
      The OneDrive API connection.
    • getContentType

      public ContentType getContentType()
      The content type of this list item.
    • isDeleted

      public boolean isDeleted()
      Indicates if this item is deleted or not (read-only).
    • toString

      public String toString()
      Overrides:
      toString in class BaseItem
    • setContentType

      public void setContentType(ContentType contentType)
      The content type of this list item.