Class ListItem
java.lang.Object
com.amilesend.onedrive.resource.item.BaseItem
com.amilesend.onedrive.resource.site.ListItem
Represents an item in a list.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
ListItem.ListItemBuilder<C extends ListItem,
B extends ListItem.ListItemBuilder<C, B>> Nested classes/interfaces inherited from class com.amilesend.onedrive.resource.item.BaseItem
BaseItem.BaseItemBuilder<C extends BaseItem,
B extends BaseItem.BaseItemBuilder<C, B>> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ListItem.ListItemBuilder
<?, ?> builder()
void
delete()
Deletes this item from the list.boolean
Gets the associated columns and its values.getColumnValues
(List<String> columnsToSelect) Gets the selected columns and its values for the given list of column names.The OneDrive API connection.The content type of this list item.For document libraries, the list item as a drive item.The key is the name of the column, the value is the associated value of the columns set on this list item.The associated list identifier.Gets the list of versions for this list item.The Sharepoint identifiers.The associated site identifier.getVersion
(String versionId) Gets theListItemVersion
for the givenversionId
.int
hashCode()
boolean
Indicates if this item is deleted or not (read-only).void
setContentType
(ContentType contentType) The content type of this list item.toString()
update()
Updates this list item (e.g., name, description, parentReference, content type).updateColumnValues
(Map<String, Object> fields) Updates the defined columns and associated values for this list item.Methods inherited from class com.amilesend.onedrive.resource.item.BaseItem
getCreatedBy, getCreatedDateTime, getDescription, getETag, getId, getLastModifiedBy, getLastModifiedDateTime, getName, getParentReference, getWebUrl, setDescription, setName, setParentReference
-
Field Details
-
LIST_ITEM_BASE_URL_PATH
- See Also:
-
LIST_ITEM_URL_SUFFIX
- See Also:
-
-
Method Details
-
getColumnValues
Gets the associated columns and its values.- Returns:
- the response
- See Also:
-
getColumnValues
Gets the selected columns and its values for the given list of column names.- Parameters:
columnsToSelect
- the list of column names (max 12)- Returns:
- the response
- See Also:
-
updateColumnValues
Updates the defined columns and associated values for this list item. All other values on the list item are left alone.- Parameters:
fields
- the fields to update- Returns:
- the field value set containing all the columns and values
-
getListItemVersions
Gets the list of versions for this list item.- Returns:
- the list item versions
-
getVersion
- Parameters:
versionId
- the list item version identifier- Returns:
- the list item version
-
update
Updates this list item (e.g., name, description, parentReference, content type).- Returns:
- the updated list item
-
delete
public void delete()Deletes this item from the list. -
builder
-
equals
-
hashCode
public int hashCode() -
getFields
The key is the name of the column, the value is the associated value of the columns set on this list item. -
getDriveItem
For document libraries, the list item as a drive item. -
getSiteId
The associated site identifier. -
getListId
The associated list identifier. -
getConnection
The OneDrive API connection. -
getContentType
The content type of this list item. -
isDeleted
public boolean isDeleted()Indicates if this item is deleted or not (read-only). -
toString
-
setContentType
The content type of this list item.
-