ContentHub Class

Access Files Connect repositories and their files and folders.

ConnectApi

These methods are for ContentHub. All methods are static.

Use ContentHub methods to work with Files Connect repositories.

Add a repository item.

39.0

No

public static ConnectApi.RepositoryFolderItem addRepositoryItem(String repositoryId, String repositoryFolderId, ConnectApi.ContentHubItemInput file)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

Type: ConnectApi.RepositoryFolderItem

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

This example creates a file without binary content (metadata only) in a Google Drive repository folder. After the file is created, we show the file’s ID, name, description, external URL, and download URL.

See Also

Add a repository item in an Experience Cloud site.

39.0

No

public static ConnectApi.RepositoryFolderItem addRepositoryItem(String communityId, String repositoryId, String repositoryFolderId, ConnectApi.ContentHubItemInput file)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

Type: ConnectApi.RepositoryFolderItem

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Add a repository item, including the binary file.

39.0

No

public static ConnectApi.RepositoryFolderItem addRepositoryItem(String repositoryId, String repositoryFolderId, ConnectApi.ContentHubItemInput file, ConnectApi.BinaryInput fileData)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

fileData

Type: ConnectApi.BinaryInput

The binary file.

Type: ConnectApi.RepositoryFolderItem

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

This example creates a file with binary content and metadata in a Google Drive repository folder. After the file is created, we show the file’s ID, name, description, external URL, and download URL.

See Also

Add a repository item, including the binary file, in an Experience Cloud site.

39.0

No

public static ConnectApi.RepositoryFolderItem addRepositoryItem(String communityId, String repositoryId, String repositoryFolderId, ConnectApi.ContentHubItemInput file, ConnectApi.BinaryInput fileData)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

fileData

Type: ConnectApi.BinaryInput

The binary file.

Type: ConnectApi.RepositoryFolderItem

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get the item types that the context user is allowed to create in the repository folder.

39.0

No

public static ConnectApi.ContentHubAllowedItemTypeCollection getAllowedItemTypes(String repositoryId, String repositoryFolderId)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

Type: ConnectApi.ContentHubAllowedItemTypeCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get the item types, filtered by type, that the context user is allowed to create in the repository folder.

39.0

No

public static ConnectApi.ContentHubAllowedItemTypeCollection getAllowedItemTypes(String repositoryId, String repositoryFolderId, ConnectApi.ConnectContentHubItemType filter)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

filter

Type: ConnectApi.ContentHubItemType

Item types. Values are:

  • Any—Includes files and folders.
  • FilesOnly—Includes files only.
  • FoldersOnly—Includes folders only.

Type: ConnectApi.ContentHubAllowedItemTypeCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

This example calls getAllowedItemTypes(repositoryId, repositoryFolderId, ConnectApi.ContentHubItemType.FilesOnly) to get the first ConnectApi.ContentHubItemTypeSummary.id of a file. The context user can create allowed files in a repository folder in the external system.

See Also

Get the item types that the context user is allowed to create in the repository folder in an Experience Cloud site.

39.0

No

public static ConnectApi.ContentHubAllowedItemTypeCollection getAllowedItemTypes(String communityId, String repositoryId, String repositoryFolderId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

Type: ConnectApi.ContentHubAllowedItemTypeCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get the item types, filtered by type, that the context user is allowed to create in the repository folder in an Experience Cloud site.

39.0

No

public static ConnectApi.ContentHubAllowedItemTypeCollection getAllowedItemTypes(String communityId, String repositoryId, String repositoryFolderId, ConnectApi.ConnectContentHubItemType filter)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

filter

Type: ConnectApi.ContentHubItemType

Item types. Values are:

  • Any—Includes files and folders.
  • FilesOnly—Includes files only.
  • FoldersOnly—Includes folders only.

Type: ConnectApi.ContentHubAllowedItemTypeCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a repository file preview.

39.0

No

public static ConnectApi.FilePreview getFilePreview(String repositoryId, String repositoryFileId, ConnectApi.FilePreviewFormat formatType)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

formatType

Type: ConnectApi.FilePreviewFormat

Specifies the format of the file preview. Values are:

  • Audio—Preview format is MP3.
  • Jpg—Preview format is JPG.
  • Pdf—Preview format is PDF.
  • Svg—Preview format is compressed SVG.
  • Thumbnail—Preview format is 240 x 180 PNG.
  • ThumbnailBig—Preview format is 720 x 480 PNG.
  • ThumbnailTiny—Preview format is 120 x 90 PNG.
  • Video—Preview format is MP4.

PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. SVG files are generated on demand.

If you’re concerned that feature-rich SVG previews don’t work in your org, choose alternative file previews. To use JPG file previews, enter general in the Quick Find box in Setup. Select General Settings, and then select Display alternative file previews.

Type: ConnectApi.FilePreview

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

This example calls getFilePreview(repositoryId, repositoryFileId, ConnectApi.FilePreviewFormat.Thumbnail) to get the thumbnail format preview along with its respective URL and number of thumbnail renditions. For each thumbnail format, we show every rendition URL available.

See Also

Get a page or page range of a repository file preview.

39.0

No

public static ConnectApi.FilePreview getFilePreview(String repositoryId, String repositoryFileId, ConnectApi.FilePreviewFormat formatType, Integer startPageNumber, Integer endPageNumber)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

formatType

Type: ConnectApi.FilePreviewFormat

Specifies the format of the file preview. Values are:

  • Audio—Preview format is MP3.
  • Jpg—Preview format is JPG.
  • Pdf—Preview format is PDF.
  • Svg—Preview format is compressed SVG.
  • Thumbnail—Preview format is 240 x 180 PNG.
  • ThumbnailBig—Preview format is 720 x 480 PNG.
  • ThumbnailTiny—Preview format is 120 x 90 PNG.
  • Video—Preview format is MP4.

PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. SVG files are generated on demand.

If you’re concerned that feature-rich SVG previews don’t work in your org, choose alternative file previews. To use JPG file previews, enter general in the Quick Find box in Setup. Select General Settings, and then select Display alternative file previews.

startPageNumber

Type: Integer

The starting page number in the range of file preview URLs.

endPageNumber

Type: Integer

The ending page number in the range of file preview URLs.

Type: ConnectApi.FilePreview

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a repository file preview in an Experience Cloud site.

39.0

No

public static ConnectApi.FilePreview getFilePreview(String communityId, String repositoryId, String repositoryFileId, ConnectApi.FilePreviewFormat formatType)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

formatType

Type: ConnectApi.FilePreviewFormat

Specifies the format of the file preview. Values are:

  • Audio—Preview format is MP3.
  • Jpg—Preview format is JPG.
  • Pdf—Preview format is PDF.
  • Svg—Preview format is compressed SVG.
  • Thumbnail—Preview format is 240 x 180 PNG.
  • ThumbnailBig—Preview format is 720 x 480 PNG.
  • ThumbnailTiny—Preview format is 120 x 90 PNG.
  • Video—Preview format is MP4.

PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. SVG files are generated on demand.

If you’re concerned that feature-rich SVG previews don’t work in your org, choose alternative file previews. To use JPG file previews, enter general in the Quick Find box in Setup. Select General Settings, and then select Display alternative file previews.

Type: ConnectApi.FilePreview

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a page or page range of a repository file preview in an Experience Cloud site.

39.0

No

public static ConnectApi.FilePreview getFilePreview(String communityId, String repositoryId, String repositoryFileId, ConnectApi.FilePreviewFormat formatType, Integer startPageNumber, Integer endPageNumber)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

formatType

Type: ConnectApi.FilePreviewFormat

Specifies the format of the file preview. Values are:

  • Audio—Preview format is MP3.
  • Jpg—Preview format is JPG.
  • Pdf—Preview format is PDF.
  • Svg—Preview format is compressed SVG.
  • Thumbnail—Preview format is 240 x 180 PNG.
  • ThumbnailBig—Preview format is 720 x 480 PNG.
  • ThumbnailTiny—Preview format is 120 x 90 PNG.
  • Video—Preview format is MP4.

PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. SVG files are generated on demand.

If you’re concerned that feature-rich SVG previews don’t work in your org, choose alternative file previews. To use JPG file previews, enter general in the Quick Find box in Setup. Select General Settings, and then select Display alternative file previews.

startPageNumber

Type: Integer

The starting page number in the range of file preview URLs.

endPageNumber

Type: Integer

The ending page number in the range of file preview URLs.

Type: ConnectApi.FilePreview

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get information about an item type associated with a repository.

39.0

No

public static ConnectApi.ContentHubItemTypeDetail getItemType(String repositoryId, String repositoryItemTypeId)

repositoryId

Type: String

The ID of the repository.

repositoryItemTypeId

Type: String

The ID of the repository item type.

Type: ConnectApi.ContentHubItemTypeDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get information about an item type associated with a repository in an Experience Cloud site.

39.0

No

public static ConnectApi.ContentHubItemTypeDetail getItemType(String communityId, String repositoryId, String repositoryItemTypeId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryItemTypeId

Type: String

The ID of the repository item type.

Type: ConnectApi.ContentHubItemTypeDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get information about a repository file’s supported previews.

39.0

No

public static ConnectApi.FilePreviewCollection getPreviews(String repositoryId, String repositoryFileId)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

Type: ConnectApi.FilePreviewCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

This example gets all supported preview formats and their respective URLs and number of renditions. For each supported preview format, we show every rendition URL available.

See Also

Get information about a repository file’s supported previews in an Experience Cloud site.

39.0

No

public static ConnectApi.FilePreviewCollection getPreviews(String communityId, String repositoryId, String repositoryFileId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

Type: ConnectApi.FilePreviewCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a list of repositories.

39.0

No

public static ConnectApi.ContentHubRepositoryCollection getRepositories()

Type: ConnectApi.ContentHubRepositoryCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

This example gets all repositories and gets the first SharePoint online repository found.

See Also

Get a list of repositories in an Experience Cloud site.

39.0

No

public static ConnectApi.ContentHubRepositoryCollection getRepositories(String communityId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

Type: ConnectApi.ContentHubRepositoryCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a page of repositories.

39.0

No

public static ConnectApi.ContentHubRepositoryCollection getRepositories(Integer pageParam, Integer pageSize)

pageParam

Type: Integer

Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.

pageSize

Type: Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default page size is 25.

Type: ConnectApi.ContentHubRepositoryCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a page of repositories in an Experience Cloud site.

39.0

No

public static ConnectApi.ContentHubRepositoryCollection getRepositories(String communityId, Integer pageParam, Integer pageSize)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

pageParam

Type: Integer

Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.

pageSize

Type: Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default page size is 25.

Type: ConnectApi.ContentHubRepositoryCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a repository.

369.0

No

public static ConnectApi.ContentHubRepository getRepository(String repositoryId)

repositoryId

Type: String

The ID of the repository.

Type: ConnectApi.ContentHubRepository

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a repository in an Experience Cloud site.

39.0

No

public static ConnectApi.ContentHubRepository getRepository(String communityId, String repositoryId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

Type: ConnectApi.ContentHubRepository

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a repository file.

39.0

No

public static ConnectApi.RepositoryFileDetail getRepositoryFile(String repositoryId, String repositoryFileId)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

Type: ConnectApi.RepositoryFileDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a repository file with or without permissions information.

39.0

No

public static ConnectApi.RepositoryFileDetail getRepositoryFile(String repositoryId, String repositoryFileId, Boolean includeExternalFilePermissionsInfo)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

includeExternalFilePermissionsInfo

Type: Boolean

Specifies whether to include permission information, such as whether the file is shared and what are the available permission types.

Managing external file permissions is supported for Google Drive, SharePoint Online, and OneDrive for Business.

Type: ConnectApi.RepositoryFileDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a repository file in an Experience Cloud site.

39.0

No

public static ConnectApi.RepositoryFileDetail getRepositoryFile(String communityId, String repositoryId, String repositoryFileId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

Type: ConnectApi.RepositoryFileDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a repository file with or without permissions information in an Experience Cloud site.

39.0

No

public static ConnectApi.RepositoryFileDetail getRepositoryFile(String communityId, String repositoryId, String repositoryFileId, Boolean includeExternalFilePermissionsInfo)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

includeExternalFilePermissionsInfo

Type: Boolean

Specifies whether to include permission information, such as whether the file is shared and what are the available permission types.

Managing external file permissions is supported for Google Drive, SharePoint Online, and OneDrive for Business.

Type: ConnectApi.RepositoryFileDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a repository folder.

39.0

No

public static ConnectApi.RepositoryFolderDetail getRepositoryFolder(String repositoryId, String repositoryFolderId)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

Type: ConnectApi.RepositoryFolderDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a repository folder in an Experience Cloud site.

39.0

No

public static ConnectApi.RepositoryFolderDetail getRepositoryFolder(String communityId, String repositoryId, String repositoryFolderId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

Type: ConnectApi.RepositoryFolderDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get repository folder items.

39.0

No

public static ConnectApi.RepositoryFolderItemsCollection getRepositoryFolderItems(String repositoryId, String repositoryFolderId)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

Type: ConnectApi.RepositoryFolderItemsCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

This example gets the collection of items in a repository folder. For files, we show the file’s name, size, external URL, and download URL. For folders, we show the folder’s name, description, and external URL.

See Also

Get repository folder items in an Experience Cloud site.

39.0

No

public static ConnectApi.RepositoryFolderItemsCollection getRepositoryFolderItems(String communityId, String repositoryId, String repositoryFolderId)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

Type: ConnectApi.RepositoryFolderItemsCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a page of repository folder items.

39.0

No

public static ConnectApi.RepositoryFolderItemsCollection getRepositoryFolderItems(String repositoryId, String repositoryFolderId, Integer pageParam, Integer pageSize)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

pageParam

Type: Integer

Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.

pageSize

Type: Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default page size is 25.

Type: ConnectApi.RepositoryFolderItemsCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Get a page of repository folder items in an Experience Cloud site.

39.0

No

public static ConnectApi.RepositoryFolderItemsCollection getRepositoryFolderItems(String communityId, String repositoryId, String repositoryFolderId, Integer pageParam, Integer pageSize)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

pageParam

Type: Integer

Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.

pageSize

Type: Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default page size is 25.

Type: ConnectApi.RepositoryFolderItemsCollection

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Update the name of a repository file.

39.0

No

public static ConnectApi.RepositoryFileDetail updateRepositoryFile(String repositoryId, String repositoryFileId, ConnectApi.ContentHubItemInput file)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

When updating the metadata of a repository file, only the name field can be updated.

Type: ConnectApi.RepositoryFileDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

This example updates the name of a file in a Google Drive repository. After the file is updated, we show the file’s ID, name, description, external URL, download URL.

See Also

Update the content of a repository file.

39.0

No

public static ConnectApi.RepositoryFileDetail updateRepositoryFile(String repositoryId, String repositoryFileId, ConnectApi.ContentHubItemInput file, ConnectApi.BinaryInput fileData)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

When updating the metadata of a repository file, only the name field can be updated.

fileData

Type: ConnectApi.BinaryInput

The binary file.

Type: ConnectApi.RepositoryFileDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

This example updates the content and name of a file in a Google Drive repository. After the file is updated, we show the file’s ID, name, description, external URL, and download URL.

See Also

Update the name of a repository file in an Experience Cloud site.

39.0

No

public static ConnectApi.RepositoryFileDetail updateRepositoryFile(String communityId, String repositoryId, String repositoryFileId, ConnectApi.ContentHubItemInput file)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

When updating the metadata of a repository file, only the name field can be updated.

Type: ConnectApi.RepositoryFileDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

Update the content of a repository file in an Experience Cloud site.

39.0

No

public static ConnectApi.RepositoryFileDetail updateRepositoryFile(String communityId, String repositoryId, String repositoryFileId, ConnectApi.ContentHubItemInput file, ConnectApi.BinaryInput fileData)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

When updating the metadata of a repository file, only the name field can be updated.

fileData

Type: ConnectApi.BinaryInput

The binary file.

Type: ConnectApi.RepositoryFileDetail

To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.

See Also

These test methods are for ContentHub. All methods are static.

For information about using these methods to test your ConnectApi code, see Testing ConnectApi Code.

Register a ConnectApi.RepositoryFolderItem object to be returned when the matching addRepositoryItem(repositoryId, repositoryFolderId, file) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestAddRepositoryItem(String repositoryId, String repositoryFolderId, ConnectApi.ContentHubItemInput file, ConnectApi.RepositoryFolderItem result)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

result

Type: ConnectApi.RepositoryFolderItem

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFolderItem object to be returned when the matching addRepositoryItem(communityId, repositoryId, repositoryFolderId, file) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestAddRepositoryItem(String communityId, String repositoryId, String repositoryFolderId, ConnectApi.ContentHubItemInput file, ConnectApi.RepositoryFolderItem result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

result

Type: ConnectApi.RepositoryFolderItem

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFolderItem object to be returned when the matching addRepositoryItem(repositoryId, repositoryFolderId, file, fileData) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestAddRepositoryItem(String repositoryId, String repositoryFolderId, ConnectApi.ContentHubItemInput file, ConnectApi.BinaryInput fileData, ConnectApi.RepositoryFolderItem result)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

fileData

Type: ConnectApi.BinaryInput

The binary file.

result

Type: ConnectApi.RepositoryFolderItem

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFolderItem object to be returned when the matching addRepositoryItem(communityId, repositoryId, repositoryFolderId, file, fileData) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestAddRepositoryItem(String communityId, String repositoryId, String repositoryFolderId, ConnectApi.ContentHubItemInput file, ConnectApi.BinaryInput fileData, ConnectApi.RepositoryFolderItem result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

fileData

Type: ConnectApi.BinaryInput

The binary file.

result

Type: ConnectApi.RepositoryFolderItem

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubAllowedItemTypeCollection object to be returned when the matching getAllowedItemTypes(repositoryId, repositoryFolderId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetAllowedItemTypes(String repositoryId, String repositoryFolderId, ConnectApi.ContentHubAllowedItemTypeCollection result)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

result

Type: ConnectApi.ContentHubAllowedItemTypeCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubAllowedItemTypeCollection object to be returned when the matching getAllowedItemTypes(repositoryId, repositoryFolderId, filter) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetAllowedItemTypes(String repositoryId, String repositoryFolderId, ConnectApi.ContentHubItemType filter, ConnectApi.ContentHubAllowedItemTypeCollection result)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

filter

Type: ConnectApi.ContentHubItemType

Item types. Values are:

  • Any—Includes files and folders.
  • FilesOnly—Includes files only.
  • FoldersOnly—Includes folders only.

result

Type: ConnectApi.ContentHubAllowedItemTypeCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubAllowedItemTypeCollection object to be returned when the matching getAllowedItemTypes(communityId, repositoryId, repositoryFolderId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetAllowedItemTypes(String communityId, String repositoryId, String repositoryFolderId, ConnectApi.ContentHubAllowedItemTypeCollection result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

result

Type: ConnectApi.ContentHubAllowedItemTypeCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubAllowedItemTypeCollection object to be returned when the matching getAllowedItemTypes(communityId, repositoryId, repositoryFolderId, filter) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetAllowedItemTypes(String communityId, String repositoryId, String repositoryFolderId, ConnectApi.ContentHubItemType filter, ConnectApi.ContentHubAllowedItemTypeCollection result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

filter

Type: ConnectApi.ContentHubItemType

Item types. Values are:

  • Any—Includes files and folders.
  • FilesOnly—Includes files only.
  • FoldersOnly—Includes folders only.

result

Type: ConnectApi.ContentHubAllowedItemTypeCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.FilePreview object to be returned when the matching getFilePreview(repositoryId, repositoryFileId, formatType) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetFilePreview(String repositoryId, String repositoryFileId, ConnectApi.FilePreviewFormat formatType, ConnectApi.FilePreview result)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

formatType

Type: ConnectApi.FilePreviewFormat

Specifies the format of the file preview. Values are:

  • Audio—Preview format is MP3.
  • Jpg—Preview format is JPG.
  • Pdf—Preview format is PDF.
  • Svg—Preview format is compressed SVG.
  • Thumbnail—Preview format is 240 x 180 PNG.
  • ThumbnailBig—Preview format is 720 x 480 PNG.
  • ThumbnailTiny—Preview format is 120 x 90 PNG.
  • Video—Preview format is MP4.

PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. SVG files are generated on demand.

If you’re concerned that feature-rich SVG previews don’t work in your org, choose alternative file previews. To use JPG file previews, enter general in the Quick Find box in Setup. Select General Settings, and then select Display alternative file previews.

result

Type: ConnectApi.FilePreview

Object containing test data.

Type: Void

See Also

Register a ConnectApi.FilePreview object to be returned when the matching getFilePreview(repositoryId, repositoryFileId, formatType, startPageNumber, endPageNumber) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetFilePreview(String repositoryId, String repositoryFileId, ConnectApi.FilePreviewFormat formatType, Integer startPageNumber, Integer endPageNumber, ConnectApi.FilePreview result)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

formatType

Type: ConnectApi.FilePreviewFormat

Specifies the format of the file preview. Values are:

  • Audio—Preview format is MP3.
  • Jpg—Preview format is JPG.
  • Pdf—Preview format is PDF.
  • Svg—Preview format is compressed SVG.
  • Thumbnail—Preview format is 240 x 180 PNG.
  • ThumbnailBig—Preview format is 720 x 480 PNG.
  • ThumbnailTiny—Preview format is 120 x 90 PNG.
  • Video—Preview format is MP4.

PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. SVG files are generated on demand.

If you’re concerned that feature-rich SVG previews don’t work in your org, choose alternative file previews. To use JPG file previews, enter general in the Quick Find box in Setup. Select General Settings, and then select Display alternative file previews.

startPageNumber

Type: Integer

The starting page number in the range of file preview URLs.

endPageNumber

Type: Integer

The ending page number in the range of file preview URLs.

result

Type: ConnectApi.FilePreview

Object containing test data.

Type: Void

See Also

Register a ConnectApi.FilePreview object to be returned when the matching getFilePreview(communityId, repositoryId, repositoryFileId, formatType) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetFilePreview(String communityId, String repositoryId, String repositoryFileId, ConnectApi.FilePreviewFormat formatType, ConnectApi.FilePreview result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

formatType

Type: ConnectApi.FilePreviewFormat

Specifies the format of the file preview. Values are:

  • Audio—Preview format is MP3.
  • Jpg—Preview format is JPG.
  • Pdf—Preview format is PDF.
  • Svg—Preview format is compressed SVG.
  • Thumbnail—Preview format is 240 x 180 PNG.
  • ThumbnailBig—Preview format is 720 x 480 PNG.
  • ThumbnailTiny—Preview format is 120 x 90 PNG.
  • Video—Preview format is MP4.

PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. SVG files are generated on demand.

If you’re concerned that feature-rich SVG previews don’t work in your org, choose alternative file previews. To use JPG file previews, enter general in the Quick Find box in Setup. Select General Settings, and then select Display alternative file previews.

result

Type: ConnectApi.FilePreview

Object containing test data.

Type: Void

See Also

Register a ConnectApi.FilePreview object to be returned when the matching getFilePreview(communityId, repositoryId, repositoryFileId, formatType, startPageNumber, endPageNumber) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetFilePreview(String communityId, String repositoryId, String repositoryFileId, ConnectApi.FilePreviewFormat formatType, Integer startPageNumber, Integer endPageNumber, ConnectApi.FilePreview result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

formatType

Type: ConnectApi.FilePreviewFormat

Specifies the format of the file preview. Values are:

  • Audio—Preview format is MP3.
  • Jpg—Preview format is JPG.
  • Pdf—Preview format is PDF.
  • Svg—Preview format is compressed SVG.
  • Thumbnail—Preview format is 240 x 180 PNG.
  • ThumbnailBig—Preview format is 720 x 480 PNG.
  • ThumbnailTiny—Preview format is 120 x 90 PNG.
  • Video—Preview format is MP4.

PDF previews are available for files of type DOC, DOCX, PPT, PPTX, TEXT, XLS, and XLSX. SVG files are generated on demand.

If you’re concerned that feature-rich SVG previews don’t work in your org, choose alternative file previews. To use JPG file previews, enter general in the Quick Find box in Setup. Select General Settings, and then select Display alternative file previews.

startPageNumber

Type: Integer

The starting page number in the range of file preview URLs.

endPageNumber

Type: Integer

The ending page number in the range of file preview URLs.

result

Type: ConnectApi.FilePreview

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubItemTypeDetail object to be returned when the matching getItemType(repositoryId, repositoryItemTypeId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetItemType(String repositoryId, String repositoryItemTypeId, ConnectApi.ContentHubItemTypeDetail result)

repositoryId

Type: String

The ID of the repository.

repositoryItemTypeId

Type: String

The ID of the repository item type.

result

Type: ConnectApi.ContentHubItemTypeDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubItemTypeDetail object to be returned when the matching getItemType(communityId, repositoryId, repositoryItemTypeId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetItemType(String communityId, String repositoryId, String repositoryItemTypeId, ConnectApi.ContentHubItemTypeDetail result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryItemTypeId

Type: String

The ID of the repository item type.

result

Type: ConnectApi.ContentHubItemTypeDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.FilePreviewCollection object to be returned when the matching getPreviews(repositoryId, repositoryFileId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetPreviews(String repositoryId, String repositoryFileId, ConnectApi.FilePreviewCollection result)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

result

Type: ConnectApi.FilePreviewCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.FilePreviewCollection object to be returned when the matching getPreviews(communityId, repositoryId, repositoryFileId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetPreviews(String communityId, String repositoryId, String repositoryFileId, ConnectApi.FilePreviewCollection result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

result

Type: ConnectApi.FilePreviewCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubRepositoryCollection object to be returned when the matching getRepositories() method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositories(ConnectApi.ContentHubRepositoryCollection result)

result

Type: ConnectApi.ContentHubRepositoryCollection

Object containing test data.

Type: Void

See Also

Register a getRepositories(communityId) object to be returned when the matching ConnectApi.ContentHubRepositoryCollection method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositories(String communityId, ConnectApi.ContentHubRepositoryCollection result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

result

Type: ConnectApi.ContentHubRepositoryCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubRepositoryCollection object to be returned when the matching getRepositories(pageParam, pageSize) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositories(Integer pageParam, Integer pageSize, ConnectApi.ContentHubRepositoryCollection result)

pageParam

Type: Integer

Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.

pageSize

Type: Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default page size is 25.

result

Type: ConnectApi.ContentHubRepositoryCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubRepositoryCollection object to be returned when the matching getRepositories(communityId, pageParam, pageSize) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositories(String communityId, Integer pageParam, Integer pageSize, ConnectApi.ContentHubRepositoryCollection result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

pageParam

Type: Integer

Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.

pageSize

Type: Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default page size is 25.

result

Type: ConnectApi.ContentHubRepositoryCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubRepository object to be returned when the matching getRepository(repositoryId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepository(String repositoryId, ConnectApi.ContentHubRepository result)

repositoryId

Type: String

The ID of the repository.

result

Type: ConnectApi.ContentHubRepository

Object containing test data.

Type: Void

See Also

Register a ConnectApi.ContentHubRepository object to be returned when the matching getRepository(communityId, repositoryId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepository(String communityId, String repositoryId, ConnectApi.ContentHubRepository result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

result

Type: ConnectApi.ContentHubRepository

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFileDetail object to be returned when the matching getRepositoryFile(repositoryId, repositoryFileId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositoryFile(String repositoryId, String repositoryFileId, ConnectApi.RepositoryFileDetail result)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

result

Type: ConnectApi.RepositoryFileDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFileDetail object to be returned when the matching getRepositoryFile(repositoryId, repositoryFileId, includeExternalFilePermissionsInfo) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositoryFile(String repositoryId, String repositoryFileId, Boolean includeExternalFilePermissionsInfo, ConnectApi.RepositoryFileDetail result)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

includeExternalFilePermissionsInfo

Type: Boolean

Specifies whether to include permission information, such as whether the file is shared and what are the available permission types.

Managing external file permissions is supported for Google Drive, SharePoint Online, and OneDrive for Business.

result

Type: ConnectApi.RepositoryFileDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFileDetail object to be returned when the matching getRepositoryFile(communityId, repositoryId, repositoryFileId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositoryFile(String communityId, String repositoryId, String repositoryFileId, ConnectApi.RepositoryFileDetail result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

result

Type: ConnectApi.RepositoryFileDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFileDetail object to be returned when the matching getRepositoryFile(communityId, repositoryId, repositoryFileId, includeExternalFilePermissionsInfo) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositoryFile(String communityId, String repositoryId, String repositoryFileId, Boolean includeExternalFilePermissionsInfo, ConnectApi.RepositoryFileDetail result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

includeExternalFilePermissionsInfo

Type: Boolean

Specifies whether to include permission information, such as whether the file is shared and what are the available permission types.

Managing external file permissions is supported for Google Drive, SharePoint Online, and OneDrive for Business.

result

Type: ConnectApi.RepositoryFileDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFolderDetail object to be returned when the matching getRepositoryFolder(repositoryId, repositoryFolderId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositoryFolder(String repositoryId, String repositoryFolderId, ConnectApi.RepositoryFolderDetail result)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

result

Type: ConnectApi.RepositoryFolderDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFolderDetail object to be returned when the matching getRepositoryFolder(communityId, repositoryId, repositoryFolderId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositoryFolder(String communityId, String repositoryId, String repositoryFolderId, ConnectApi.RepositoryFolderDetail result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

result

Type: ConnectApi.RepositoryFolderDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFolderItemsCollection object to be returned when the matching getRepositoryFolderItems(repositoryId, repositoryFolderId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositoryFolderItems(String repositoryId, String repositoryFolderId, ConnectApi.RepositoryFolderItemsCollection result)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

result

Type: ConnectApi.RepositoryFolderItemsCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFolderItemsCollection object to be returned when the matching getRepositoryFolderItems(communityId, repositoryId, repositoryFolderId) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositoryFolderItems(String communityId, String repositoryId, String repositoryFolderId, ConnectApi.RepositoryFolderItemsCollection result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

result

Type: ConnectApi.RepositoryFolderItemsCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFolderItemsCollection object to be returned when the matching getRepositoryFolderItems(repositoryId, repositoryFolderId, pageParam, pageSize) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositoryFolderItems(String repositoryId, String repositoryFolderId, Integer pageParam, Integer pageSize, ConnectApi.RepositoryFolderItemsCollection result)

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

pageParam

Type: Integer

Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.

pageSize

Type: Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default page size is 25.

result

Type: ConnectApi.RepositoryFolderItemsCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFolderItemsCollection object to be returned when the matching getRepositoryFolderItems(communityId, repositoryId, repositoryFolderId, pageParam, pageSize) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestGetRepositoryFolderItems(String communityId, String repositoryId, String repositoryFolderId, Integer pageParam, Integer pageSize, ConnectApi.RepositoryFolderItemsCollection result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFolderId

Type: String

The ID of the repository folder.

pageParam

Type: Integer

Number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.

pageSize

Type: Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default page size is 25.

result

Type: ConnectApi.RepositoryFolderItemsCollection

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFileDetail object to be returned when the matching updateRepositoryFile(communityId, repositoryId, repositoryFileId, file, fileData) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestUpdateRepositoryFile(String communityId, String repositoryId, String repositoryFileId, ConnectApi.ContentHubItemInput file, ConnectApi.BinaryInput fileData, ConnectApi.RepositoryFileDetail result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

fileData

Type: ConnectApi.BinaryInput

The binary file.

result

Type: ConnectApi.RepositoryFileDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFileDetail object to be returned when the matching updateRepositoryFile(repositoryId, repositoryFileId, file) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestUpdateRepositoryFile(String repositoryId, String repositoryFileId, ConnectApi.ContentHubItemInput file, ConnectApi.RepositoryFileDetail result)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

result

Type: ConnectApi.RepositoryFileDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFileDetail object to be returned when the matching updateRepositoryFile(repositoryId, repositoryFileId, file, fileData) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestUpdateRepositoryFile(String repositoryId, String repositoryFileId, ConnectApi.ContentHubItemInput file, ConnectApi.BinaryInput fileData, ConnectApi.RepositoryFileDetail result)

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

fileData

Type: ConnectApi.BinaryInput

The binary file.

result

Type: ConnectApi.RepositoryFileDetail

Object containing test data.

Type: Void

See Also

Register a ConnectApi.RepositoryFileDetail object to be returned when the matching updateRepositoryFile(communityId, repositoryId, repositoryFileId, file) method is called in a test context. Use the method with the same parameters or you receive an exception.

40.0

public static Void setTestUpdateRepositoryFile(String communityId, String repositoryId, String repositoryFileId, ConnectApi.ContentHubItemInput file, ConnectApi.RepositoryFileDetail result)

communityId

Type: String

ID for an Experience Cloud site, internal, or null.

repositoryId

Type: String

The ID of the repository.

repositoryFileId

Type: String

The ID of the repository file.

file

Type: ConnectApi.ContentHubItemInput

The item type ID and fields of the item type.

result

Type: ConnectApi.RepositoryFileDetail

Object containing test data.

Type: Void

See Also