Package com.smartsheet.api.models
Class AbstractSheet<TRow extends AbstractRow<TColumn,TCell>,TColumn extends Column,TCell extends Cell>
- java.lang.Object
-
- com.smartsheet.api.models.IdentifiableModel<T>
-
- com.smartsheet.api.models.NamedModel<java.lang.Long>
-
- com.smartsheet.api.models.AbstractSheet<TRow,TColumn,TCell>
-
public abstract class AbstractSheet<TRow extends AbstractRow<TColumn,TCell>,TColumn extends Column,TCell extends Cell> extends NamedModel<java.lang.Long>
-
-
Constructor Summary
Constructors Constructor Description AbstractSheet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessLevel
getAccessLevel()
Gets the access level for the sheet.java.util.List<Attachment>
getAttachments()
Gets the attachments for the sheet.TColumn
getColumnById(long columnId)
Get aColumn
by ID.TColumn
getColumnByIndex(int index)
Get a column by index.java.util.List<TColumn>
getColumns()
Gets the columns for the sheet.java.util.List<ContactObjectValue>
getContactReferences()
Sets contact references used by MULTI_CONTACT_LIST columnsjava.util.Date
getCreatedAt()
Gets the date and time the sheet was created.java.util.List<CrossSheetReference>
getCrossSheetReferences()
Gets the list of cross sheet references used by this sheetjava.lang.Boolean
getDependenciesEnabled()
Gets the dependencies enabled flag.java.util.List<Discussion>
getDiscussions()
Gets the discussions for the sheet.java.util.EnumSet<AttachmentType>
getEffectiveAttachmentOptions()
Gets the effective attachment options.java.util.List<SheetFilter>
getFilters()
Get the list of sheet filters for this sheet.java.lang.Long
getFromId()
Gets the ID of the sheet/template from which the sheet was created.java.lang.Boolean
getGanttEnabled()
Gets the gantt enabled flag.java.lang.Boolean
getHasSummaryFields()
Gets flag indicating whether a sheet summary is presentjava.util.Date
getModifiedAt()
Gets the date and time the sheet was last modified.java.lang.String
getOwner()
Gets the owner email.java.lang.Long
getOwnerId()
Gets the owner id.java.lang.String
getPermalink()
Gets the permalink for the sheet.ProjectSettings
getProjectSettings()
Gets the project settings.java.lang.Boolean
getReadOnly()
Gets the read only flag for the sheet.java.lang.Boolean
getResourceManagementEnabled()
ResourceManagementType
getResourceManagementType()
Gets the resource management type for the sheet.TRow
getRowByRowNumber(int rowNumber)
Get aRow
by row number.java.util.List<TRow>
getRows()
Gets the rows for the sheet.java.lang.Boolean
getShowParentRowsForFilters()
True if show parent rows for filters.Source
getSource()
Gets the source.SheetSummary
getSummary()
Gets the sheet summary if one exists for this sheetjava.lang.Integer
getTotalRowCount()
Gets the total row count for the sheet.SheetUserPermissions
getUserPermissions()
Gets the sheet user permissionsSheetUserSettings
getUserSettings()
Gets the sheet user settings.java.lang.Integer
getVersion()
Gets the version for the sheet.Workspace
getWorkspace()
Gets a workspace object containing the name and id of the workspace containing this sheetjava.lang.Boolean
isFavorite()
True if the sheet is a favorite sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetAccessLevel(AccessLevel accessLevel)
Sets the access level for the sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetAttachments(java.util.List<Attachment> attachments)
Sets the attachments for the sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetColumns(java.util.List<TColumn> columns)
Sets the columns for the sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetContactReferences(java.util.List<ContactObjectValue> contactReferences)
Sets contact references used by MULTI_CONTACT_LIST columns<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetCreatedAt(java.util.Date createdAt)
Sets the date and time the sheet was created.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetCrossSheetReferences(java.util.List<CrossSheetReference> crossSheetReferences)
Sets the list of cross sheet references used by this sheet<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetDependenciesEnabled(java.lang.Boolean dependenciesEnabled)
Sets the dependencies enabled flag.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetDiscussions(java.util.List<Discussion> discussions)
Sets the discussions for the sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetEffectiveAttachmentOptions(java.util.EnumSet<AttachmentType> effectiveAttachmentOptions)
Sets the effective attachment options.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetFavorite(java.lang.Boolean favorite)
Sets the favorite sheet<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetFilters(java.util.List<SheetFilter> filters)
Sets the list of sheet filters for this sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetFromId(java.lang.Long fromId)
Sets the ID of the sheet/template from which the sheet was created.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetGanttEnabled(java.lang.Boolean ganttEnabled)
Sets the gantt enabled flag.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetHasSummaryFields(java.lang.Boolean hasSummaryFields)
Sets flag indicating whether a sheet summary is present<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetModifiedAt(java.util.Date modifiedAt)
Sets the date and time the sheet was last modified.AbstractSheet<TRow,TColumn,TCell>
setName(java.lang.String name)
Provide an 'override' of setName (returns AbstractSheet not NamedModel)<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetOwner(java.lang.String owner)
Sets the owner<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetOwnerId(long ownerId)
Sets the owner id.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetPermalink(java.lang.String permalink)
Sets the permalink for the sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetProjectSettings(ProjectSettings projectSettings)
Sets the project settings.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetReadOnly(java.lang.Boolean readOnly)
Sets the read only flag for the sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetResourceManagementEnabled(java.lang.Boolean resourceManagementEnabled)
<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetResourceManagementType(ResourceManagementType resourceManagementType)
Sets the access level for the sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetRows(java.util.List<TRow> rows)
Sets the rows for the sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetSheetId(java.lang.Long id)
version of setId that returns this type<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetSheetName(java.lang.String name)
version of setName that returns this type<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetShowParentRowsForFilters(java.lang.Boolean showParentRowsForFilters)
Sets the show parent rows for filters.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetSource(Source source)
Sets the source.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetSummary(SheetSummary summary)
Sets the sheet summary if one exists for this sheet<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetTotalRowCount(java.lang.Integer totalRowCount)
Sets the total row count.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetUserPermissions(SheetUserPermissions userPermissions)
Sets the sheet user permissions<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetUserSettings(SheetUserSettings userSettings)
Sets the user settings.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetVersion(java.lang.Integer version)
Sets the version for the sheet.<T extends AbstractSheet<TRow,TColumn,TCell>>
TsetWorkspace(Workspace workspace)
Sets a workspace object containing the name and id of the workspace containing this sheet-
Methods inherited from class com.smartsheet.api.models.NamedModel
getName
-
Methods inherited from class com.smartsheet.api.models.IdentifiableModel
equals, getId, hashCode, setId
-
-
-
-
Method Detail
-
getFromId
public java.lang.Long getFromId()
Gets the ID of the sheet/template from which the sheet was created.- Returns:
- the from id
-
setFromId
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setFromId(java.lang.Long fromId)
Sets the ID of the sheet/template from which the sheet was created.- Parameters:
fromId
- the new from id
-
getOwnerId
public java.lang.Long getOwnerId()
Gets the owner id.- Returns:
- the ownerid
-
setOwnerId
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setOwnerId(long ownerId)
Sets the owner id.- Parameters:
ownerId
- the owner id
-
getAccessLevel
public AccessLevel getAccessLevel()
Gets the access level for the sheet.- Returns:
- the access level
-
setAccessLevel
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setAccessLevel(AccessLevel accessLevel)
Sets the access level for the sheet.- Parameters:
accessLevel
- the new access level
-
getAttachments
public java.util.List<Attachment> getAttachments()
Gets the attachments for the sheet.- Returns:
- the attachments
-
setAttachments
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setAttachments(java.util.List<Attachment> attachments)
Sets the attachments for the sheet.- Parameters:
attachments
- the new attachments
-
getColumns
public java.util.List<TColumn> getColumns()
Gets the columns for the sheet.- Returns:
- the columns
-
setColumns
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setColumns(java.util.List<TColumn> columns)
Sets the columns for the sheet.- Parameters:
columns
- the new columns
-
getContactReferences
public java.util.List<ContactObjectValue> getContactReferences()
Sets contact references used by MULTI_CONTACT_LIST columns- Returns:
- contact references
-
setContactReferences
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setContactReferences(java.util.List<ContactObjectValue> contactReferences)
Sets contact references used by MULTI_CONTACT_LIST columns
-
getCreatedAt
public java.util.Date getCreatedAt()
Gets the date and time the sheet was created.- Returns:
- the created at
-
setCreatedAt
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setCreatedAt(java.util.Date createdAt)
Sets the date and time the sheet was created.- Parameters:
createdAt
- the new created at
-
getCrossSheetReferences
public java.util.List<CrossSheetReference> getCrossSheetReferences()
Gets the list of cross sheet references used by this sheet- Returns:
- the cross sheet references
-
setCrossSheetReferences
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setCrossSheetReferences(java.util.List<CrossSheetReference> crossSheetReferences)
Sets the list of cross sheet references used by this sheet- Parameters:
crossSheetReferences
- the cross sheet references
-
getDependenciesEnabled
public java.lang.Boolean getDependenciesEnabled()
Gets the dependencies enabled flag.- Returns:
- the dependencies enabled
-
setDependenciesEnabled
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setDependenciesEnabled(java.lang.Boolean dependenciesEnabled)
Sets the dependencies enabled flag.- Parameters:
dependenciesEnabled
- the new dependencies enabled
-
getDiscussions
public java.util.List<Discussion> getDiscussions()
Gets the discussions for the sheet.- Returns:
- the discussions
-
setDiscussions
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setDiscussions(java.util.List<Discussion> discussions)
Sets the discussions for the sheet.- Parameters:
discussions
- the new discussions
-
getEffectiveAttachmentOptions
public java.util.EnumSet<AttachmentType> getEffectiveAttachmentOptions()
Gets the effective attachment options.- Returns:
- list of attachment types
-
setEffectiveAttachmentOptions
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setEffectiveAttachmentOptions(java.util.EnumSet<AttachmentType> effectiveAttachmentOptions)
Sets the effective attachment options.- Parameters:
effectiveAttachmentOptions
- the effective attachment options
-
isFavorite
public java.lang.Boolean isFavorite()
True if the sheet is a favorite sheet.- Returns:
- the favorite
-
setFavorite
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setFavorite(java.lang.Boolean favorite)
Sets the favorite sheet- Parameters:
favorite
- the favorite
-
getFilters
public java.util.List<SheetFilter> getFilters()
Get the list of sheet filters for this sheet.- Returns:
- the list of SheetFilters
-
setFilters
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setFilters(java.util.List<SheetFilter> filters)
Sets the list of sheet filters for this sheet.- Parameters:
filters
- the list of SheetFilters
-
getGanttEnabled
public java.lang.Boolean getGanttEnabled()
Gets the gantt enabled flag.- Returns:
- the gantt enabled flag
-
setGanttEnabled
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setGanttEnabled(java.lang.Boolean ganttEnabled)
Sets the gantt enabled flag.- Parameters:
ganttEnabled
- the new gantt enabled flag
-
getHasSummaryFields
public java.lang.Boolean getHasSummaryFields()
Gets flag indicating whether a sheet summary is present- Returns:
- hasSheetSummary
-
setHasSummaryFields
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setHasSummaryFields(java.lang.Boolean hasSummaryFields)
Sets flag indicating whether a sheet summary is present
-
getModifiedAt
public java.util.Date getModifiedAt()
Gets the date and time the sheet was last modified.- Returns:
- the modified at
-
setModifiedAt
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setModifiedAt(java.util.Date modifiedAt)
Sets the date and time the sheet was last modified.- Parameters:
modifiedAt
- the new modified at
-
setName
public AbstractSheet<TRow,TColumn,TCell> setName(java.lang.String name)
Provide an 'override' of setName (returns AbstractSheet not NamedModel)- Overrides:
setName
in classNamedModel<java.lang.Long>
- Parameters:
name
- the new name
-
setSheetName
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setSheetName(java.lang.String name)
version of setName that returns this type- Parameters:
name
- the new name- Returns:
- this
-
setSheetId
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setSheetId(java.lang.Long id)
version of setId that returns this type- Parameters:
id
- the new sheet ID- Returns:
- this
-
getOwner
public java.lang.String getOwner()
Gets the owner email.- Returns:
- the owner email
-
setOwner
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setOwner(java.lang.String owner)
Sets the owner- Parameters:
owner
- the owner email
-
getPermalink
public java.lang.String getPermalink()
Gets the permalink for the sheet.- Returns:
- the permalink
-
setPermalink
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setPermalink(java.lang.String permalink)
Sets the permalink for the sheet.- Parameters:
permalink
- the new permalink
-
getProjectSettings
public ProjectSettings getProjectSettings()
Gets the project settings.- Returns:
- the project settings
-
setProjectSettings
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setProjectSettings(ProjectSettings projectSettings)
Sets the project settings.- Parameters:
projectSettings
- the project settings
-
getReadOnly
public java.lang.Boolean getReadOnly()
Gets the read only flag for the sheet.- Returns:
- the read only
-
setReadOnly
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setReadOnly(java.lang.Boolean readOnly)
Sets the read only flag for the sheet.- Parameters:
readOnly
- the new read only
-
getResourceManagementEnabled
public java.lang.Boolean getResourceManagementEnabled()
- Returns:
- the flag indicating if resource management is enabled.
-
setResourceManagementEnabled
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setResourceManagementEnabled(java.lang.Boolean resourceManagementEnabled)
- Parameters:
resourceManagementEnabled
- the resourceManagementEnabled to set
-
getResourceManagementType
public ResourceManagementType getResourceManagementType()
Gets the resource management type for the sheet.- Returns:
- the resource management type
-
setResourceManagementType
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setResourceManagementType(ResourceManagementType resourceManagementType)
Sets the access level for the sheet.
-
getRows
public java.util.List<TRow> getRows()
Gets the rows for the sheet.- Returns:
- the rows
-
setRows
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setRows(java.util.List<TRow> rows)
Sets the rows for the sheet.- Parameters:
rows
- the new rows
-
getShowParentRowsForFilters
public java.lang.Boolean getShowParentRowsForFilters()
True if show parent rows for filters.- Returns:
- the show parent row for filters
-
setShowParentRowsForFilters
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setShowParentRowsForFilters(java.lang.Boolean showParentRowsForFilters)
Sets the show parent rows for filters.- Parameters:
showParentRowsForFilters
- the show parent rows for filters
-
getSource
public Source getSource()
Gets the source.- Returns:
- the source
-
setSource
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setSource(Source source)
Sets the source.- Parameters:
source
- the source
-
getSummary
public SheetSummary getSummary()
Gets the sheet summary if one exists for this sheet- Returns:
- sheetSummary
-
setSummary
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setSummary(SheetSummary summary)
Sets the sheet summary if one exists for this sheet
-
getTotalRowCount
public java.lang.Integer getTotalRowCount()
Gets the total row count for the sheet.- Returns:
- the total row count
-
setTotalRowCount
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setTotalRowCount(java.lang.Integer totalRowCount)
Sets the total row count.- Parameters:
totalRowCount
- the total row count
-
getUserPermissions
public SheetUserPermissions getUserPermissions()
Gets the sheet user permissions- Returns:
- userPermissions
-
setUserPermissions
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setUserPermissions(SheetUserPermissions userPermissions)
Sets the sheet user permissions
-
getUserSettings
public SheetUserSettings getUserSettings()
Gets the sheet user settings.- Returns:
- the user settings
-
setUserSettings
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setUserSettings(SheetUserSettings userSettings)
Sets the user settings.- Parameters:
userSettings
- the user settings
-
getVersion
public java.lang.Integer getVersion()
Gets the version for the sheet.- Returns:
- the version
-
setVersion
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setVersion(java.lang.Integer version)
Sets the version for the sheet.- Parameters:
version
- the new version
-
getWorkspace
public Workspace getWorkspace()
Gets a workspace object containing the name and id of the workspace containing this sheet- Returns:
- workspace
-
setWorkspace
public <T extends AbstractSheet<TRow,TColumn,TCell>> T setWorkspace(Workspace workspace)
Sets a workspace object containing the name and id of the workspace containing this sheet
-
getColumnByIndex
public TColumn getColumnByIndex(int index)
Get a column by index.- Parameters:
index
- the column index- Returns:
- the column by index
-
getColumnById
public TColumn getColumnById(long columnId)
Get aColumn
by ID.- Parameters:
columnId
- the column id- Returns:
- the column by id
-
-