Class FeedManagementApi
- All Implemented Interfaces:
FeedManagementDetails
-
Constructor Summary
ConstructorDescriptionFeedManagementApi
(Connection connection) Pass the connection object to work with Feed Management Api -
Method Summary
Modifier and TypeMethodDescriptioncreateFeed
(String name, String description, boolean badgesEnabled, boolean hideDeletedPackageVersions) Create a feed, a container for various package types.createFeedView
(String feedName, String name, FeedViewType feedViewType, FeedVisibility visibility) Create a new view on the referenced feed.deleteFeed
(String feedId) Remove a feed and all its packages.deleteFeedView
(String feedId, String feedViewId) Delete a feed view.Get the settings for a specific feed.Get the settings for a specific feed.getFeedPermissions
(String feedName) Get the permissions for a feed.getFeedPermissions
(String feedName, boolean excludeInheritedPermissions, String identityDescriptor, boolean includeDeletedFeeds, boolean includeIds) Get the permissions for a feed.getFeeds()
Get all feeds in an account where you have the provided role access.Get all feeds in an account where you have the provided role access.getFeedView
(String feedName, String feedViewId) Get a view by Id.getFeedViews
(String feedName) Get all views for a feed.setFeedPermissions
(String feedId, FeedPermissions feedPermissions) Update the permissions on a feed.updateFeed
(String feedId, Feed feed) Change the attributes of a feed.updateFeedView
(String feedName, String feedViewName, FeedView feedView) Update a view.Methods inherited from class org.azd.utils.AzDAsyncApi
createAsync
-
Constructor Details
-
FeedManagementApi
Pass the connection object to work with Feed Management Api- Parameters:
connection
- Connection object
-
-
Method Details
-
createFeed
public Feed createFeed(String name, String description, boolean badgesEnabled, boolean hideDeletedPackageVersions) throws AzDException Create a feed, a container for various package types.Feeds can be created in a project if the project parameter is included when instantiating the class. This can be done by injecting the instance of AzDDefaultParameters with project name. If the project parameter is omitted, the feed will not be associated with a project and will be created at the organization level.
- Specified by:
createFeed
in interfaceFeedManagementDetails
- Parameters:
name
- Provide the name of the feeddescription
- Provide the description for the feedbadgesEnabled
- Enable or disable the badge in the feed. Default to false.hideDeletedPackageVersions
- Hides the deleted package version. Default to true.- Returns:
- Feed object
Feed
- Throws:
AzDException
- Default Api Exception handler.
-
createFeedView
public FeedView createFeedView(String feedName, String name, FeedViewType feedViewType, FeedVisibility visibility) throws AzDException Create a new view on the referenced feed.The project parameter must be supplied if the feed was created in a project.
- Specified by:
createFeedView
in interfaceFeedManagementDetails
- Parameters:
feedName
- provide the name or id of the feedname
- name of the feed viewfeedViewType
- type of the feed view. Allowed values are [implicit and release]visibility
- visibility of the view. Allowed values are [aadTenant, collection, organization, private]- Returns:
- Feed view object
FeedView
- Throws:
AzDException
- Default Api Exception handler.
-
deleteFeed
Remove a feed and all its packages. The feed moves to the recycle bin and is reversible.The project parameter must be supplied if the feed was created in a project. If the feed is not associated with any project, omit the project parameter from the request.
- Specified by:
deleteFeed
in interfaceFeedManagementDetails
- Parameters:
feedId
- Name or Id of the feed.- Throws:
AzDException
- Default Api Exception handler.
-
deleteFeedView
Delete a feed view.The project parameter must be supplied if the feed was created in a project.
- Specified by:
deleteFeedView
in interfaceFeedManagementDetails
- Parameters:
feedId
- Name or Id of the feedfeedViewId
- Id of the feed view- Throws:
AzDException
- Default Api Exception handler.
-
getFeed
Get the settings for a specific feed.The project parameter must be supplied if the feed was created in a project. If the feed is not associated with any project, omit the project parameter from the request.
- Specified by:
getFeed
in interfaceFeedManagementDetails
- Parameters:
feedName
- Name of id of the feed- Returns:
- Feed
Feed
- Throws:
AzDException
- Default Api Exception handler.
-
getFeed
Get the settings for a specific feed.The project parameter must be supplied if the feed was created in a project. If the feed is not associated with any project, omit the project parameter from the request.
- Specified by:
getFeed
in interfaceFeedManagementDetails
- Parameters:
feedName
- Name of id of the feedincludeDeletedUpstreams
- Include upstreams that have been deleted in the response.- Returns:
- Feed
Feed
- Throws:
AzDException
- Default Api Exception handler.
-
getFeedPermissions
Get the permissions for a feed.The project parameter must be supplied if the feed was created in a project. If the feed is not associated with any project, omit the project parameter from the request.
- Specified by:
getFeedPermissions
in interfaceFeedManagementDetails
- Parameters:
feedName
- Name or Id of the feed.- Returns:
- Feed Permissions
FeedPermissions
- Throws:
AzDException
- Default Api Exception handler.
-
getFeedPermissions
public FeedPermissions getFeedPermissions(String feedName, boolean excludeInheritedPermissions, String identityDescriptor, boolean includeDeletedFeeds, boolean includeIds) throws AzDException Get the permissions for a feed.The project parameter must be supplied if the feed was created in a project. If the feed is not associated with any project, omit the project parameter from the request.
- Specified by:
getFeedPermissions
in interfaceFeedManagementDetails
- Parameters:
feedName
- Name or Id of the feed.excludeInheritedPermissions
- True to only return explicitly set permissions on the feed. Default is false.identityDescriptor
- Filter permissions to the provided identity.includeDeletedFeeds
- If includeDeletedFeeds is true, then feedId must be specified by name and not by Guid.includeIds
- True to include user Ids in the response. Default is false.- Returns:
- Feed Permissions
FeedPermissions
- Throws:
AzDException
- Default Api Exception handler.
-
getFeedView
Get a view by Id.The project parameter must be supplied if the feed was created in a project.
- Specified by:
getFeedView
in interfaceFeedManagementDetails
- Parameters:
feedName
- Name or Id of the feed.feedViewId
- Name or Id of the view.- Returns:
- feed view
FeedView
- Throws:
AzDException
- Default Api Exception handler.
-
getFeedViews
Get all views for a feed.The project parameter must be supplied if the feed was created in a project.
- Specified by:
getFeedViews
in interfaceFeedManagementDetails
- Parameters:
feedName
- Name or Id of the feed.- Returns:
- array feed views
FeedView
- Throws:
AzDException
- Default Api Exception handler.
-
getFeeds
Get all feeds in an account where you have the provided role access.If the project parameter is present, gets all feeds in the given project. If omitted, gets all feeds in the organization.
- Specified by:
getFeeds
in interfaceFeedManagementDetails
- Returns:
- array of feeds
Feeds
- Throws:
AzDException
- Default Api Exception handler.
-
getFeeds
public Feeds getFeeds(FeedRole feedRole, boolean includeDeletedUpstreams, boolean includeUrls) throws AzDException Get all feeds in an account where you have the provided role access.If the project parameter is present, gets all feeds in the given project. If omitted, gets all feeds in the organization.
- Specified by:
getFeeds
in interfaceFeedManagementDetails
- Parameters:
feedRole
- Filter by this role, either Administrator(4), Contributor(3), or Reader(2) level permissions.includeDeletedUpstreams
- Include upstreams that have been deleted in the response.includeUrls
- Resolve names if true- Returns:
- array of feeds
Feeds
- Throws:
AzDException
- Default Api Exception handler.
-
setFeedPermissions
public FeedPermissions setFeedPermissions(String feedId, FeedPermissions feedPermissions) throws AzDException Update the permissions on a feed.The project parameter must be supplied if the feed was created in a project. If the feed is not associated with any project, omit the project parameter from the request.
- Specified by:
setFeedPermissions
in interfaceFeedManagementDetails
- Parameters:
feedPermissions
- List of feed permissions to update the permissions for.- Returns:
- array of feed permissions
FeedPermissions
- Throws:
AzDException
- Default Api Exception handler.
-
updateFeed
Change the attributes of a feed.The project parameter must be supplied if the feed was created in a project. If the feed is not associated with any project, omit the project parameter from the request.
- Specified by:
updateFeed
in interfaceFeedManagementDetails
- Parameters:
feedId
- Name or Id of the feed.feed
- Feed object to update the settings for- Returns:
- feed
Feed
- Throws:
AzDException
- Default Api Exception handler.
-
updateFeedView
public FeedView updateFeedView(String feedName, String feedViewName, FeedView feedView) throws AzDException Update a view.The project parameter must be supplied if the feed was created in a project.
- Specified by:
updateFeedView
in interfaceFeedManagementDetails
- Parameters:
feedName
- Name or Id of the feed.feedViewName
- Name or Id of the view.feedView
- Feed view object to update the settings for.- Returns:
- the updated feed view
FeedView
- Throws:
AzDException
- Default Api Exception handler.
-