🔍 Code Extractor

class ChannelInfoCollection

Maturity: 29

A collection class that manages and stores multiple ChannelInfo objects, inheriting from ClientValue to provide SharePoint Portal channel information collection functionality.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/channels/info_collection.py
Lines:
6 - 12
Complexity:
simple

Purpose

ChannelInfoCollection serves as a container for managing collections of ChannelInfo objects within the SharePoint Portal context. It wraps a ClientValueCollection to provide type-safe storage and manipulation of channel information, with proper entity type identification for SharePoint API interactions. This class is typically used when working with multiple channels in SharePoint Portal operations.

Source Code

class ChannelInfoCollection(ClientValue):
    def __init__(self, value=None):
        self.value = ClientValueCollection(ChannelInfo, value)

    @property
    def entity_type_name(self):
        return "Microsoft.SharePoint.Portal.ChannelInfoCollection"

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

value: Optional initial value to populate the collection. Can be None (creates empty collection), a list of ChannelInfo objects, or compatible data structure that ClientValueCollection can process. Defaults to None if not provided.

Return Value

Instantiation returns a ChannelInfoCollection object containing a ClientValueCollection of ChannelInfo objects. The entity_type_name property returns the string 'Microsoft.SharePoint.Portal.ChannelInfoCollection' which identifies this collection type in SharePoint API operations.

Class Interface

Methods

__init__(self, value=None)

Purpose: Initializes a new ChannelInfoCollection instance with an optional initial value

Parameters:

  • value: Optional initial collection data, can be None, a list of ChannelInfo objects, or compatible data structure

Returns: None (constructor)

@property entity_type_name(self) -> str property

Purpose: Returns the SharePoint entity type name for this collection, used in API operations

Returns: String 'Microsoft.SharePoint.Portal.ChannelInfoCollection' identifying the collection type in SharePoint

Attributes

Name Type Description Scope
value ClientValueCollection The underlying collection that stores ChannelInfo objects, providing collection management functionality instance

Dependencies

  • office365

Required Imports

from office365.runtime.client_value import ClientValue
from office365.runtime.client_value_collection import ClientValueCollection
from office365.sharepoint.portal.channels.info import ChannelInfo

Usage Example

from office365.sharepoint.portal.channels.info import ChannelInfo
from office365.sharepoint.portal.channels.info_collection import ChannelInfoCollection

# Create an empty collection
channel_collection = ChannelInfoCollection()

# Create collection with initial values
initial_channels = [ChannelInfo(), ChannelInfo()]
channel_collection = ChannelInfoCollection(value=initial_channels)

# Access the underlying collection
channels = channel_collection.value

# Get the entity type name for SharePoint API operations
entity_type = channel_collection.entity_type_name
print(entity_type)  # Output: Microsoft.SharePoint.Portal.ChannelInfoCollection

Best Practices

  • Always initialize with appropriate ChannelInfo objects or None to ensure type safety
  • Use the entity_type_name property when making SharePoint API calls that require entity type identification
  • Access the underlying collection through the 'value' attribute for iteration and manipulation
  • This class is immutable in terms of its entity_type_name, which is fixed for SharePoint API compatibility
  • Ensure proper SharePoint context is established before creating and using instances of this class
  • The class inherits from ClientValue, so it can be serialized for SharePoint API requests

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class ChannelInfo 83.4% similar

    ChannelInfo is a data class representing Microsoft SharePoint Portal channel information, inheriting from ClientValue to provide serialization capabilities for SharePoint API interactions.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/channels/info.py
  • class VideoChannelCollection 75.2% similar

    A collection class that manages VideoChannel entities in SharePoint, providing methods to query, retrieve, and manipulate video channels.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/publishing/video/channel_collection.py
  • class CreatableItemInfoCollection 72.8% similar

    A collection class that wraps and manages a list of CreatableItemInfo objects, inheriting from ClientValue to provide client-side value semantics.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/lists/creatable_item_info.py
  • class CurrencyInformationCollection 71.2% similar

    A collection class that holds a list of CurrencyInformation objects representing supported currencies in SharePoint.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/lists/currency_information_collection.py
  • class WebInformationCollection 66.8% similar

    A collection class that manages WebInformation objects containing metadata about SharePoint sites, providing methods to retrieve and manage site information.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/webs/information_collection.py
← Back to Browse