Class UpdateStreamApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.stream.request.UpdateStreamApiRequest
- All Implemented Interfaces:
VoidExecutableApiRequest
Zulip API request builder for updating a stream.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateStreamApiRequest
(ZulipHttpClient client, long streamId) Constructs aDeleteStreamApiRequest
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes the Zulip API request for updating a stream.withCanAddSubscribersGroup
(UserGroupSetting userGroupSetting) Sets the users who have permission to add others to this stream.withCanAdministerChannelGroup
(UserGroupSetting userGroupSetting) Set the users who have permission to administer this stream.withCanDeleteAnyMessageGroup
(UserGroupSetting userGroupSetting) Set the users who have permission to delete any message in the stream.withCanDeleteOwnMessageGroup
(UserGroupSetting userGroupSetting) Set the users who have permission to delete they have sent to the stream.withCanMoveMessagesOutOfChannelGroup
(UserGroupSetting userGroupSetting) Set the users who have permission to move messages out of this stream.withCanMoveMessagesWithinChannelGroup
(UserGroupSetting userGroupSetting) Set the users who have permission to move messages within this stream.withCanRemoveSubscribersGroup
(UserGroupSetting userGroupSetting) Sets the users who have permission to unsubscribe others from this stream.withCanResolveTopicsGroup
(UserGroupSetting userGroupSetting) Set the users who have permission to resolve topics in this stream.withCanSendMessageGroup
(UserGroupSetting userGroupSetting) Set the users who have permission to post in this stream.withCanSubscribeGroup
(UserGroupSetting userGroupSetting) Sets the users who have permission to subscribe themselves to this stream.withDefaultStream
(boolean defaultStream) Sets whether any newly created streams will be added as default streams for new users joining the organization.withDescription
(String description) Sets the updated stream description.withFolderId
(int folderId) Sets the folder this stream belongs to.withHistoryPublicToSubscribers
(boolean historyPublicToSubscribers) Sets whether the stream history is public to new subscribers.withIsArchived
(boolean isArchived) Sets whether the stream is archived.withIsPrivate
(boolean isPrivate) Sets whether the stream is private.withMessageRetention
(int messageRetentionDays) Sets the updated number of days that message history should be retained.withMessageRetention
(RetentionPolicy messageRetentionPolicy) Sets the updated message retention policy of a stream.Sets the updated stream name.withTopicPolicy
(TopicPolicy topicPolicy) Sets whether named topics and the empty topic are enabled in this channel.withWebPublic
(boolean webPublic) Sets whether the stream is a web-public stream.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
DESCRIPTION
- See Also:
-
NEW_NAME
- See Also:
-
IS_PRIVATE
- See Also:
-
IS_WEB_PUBLIC
- See Also:
-
HISTORY_PUBLIC_TO_SUBSCRIBERS
- See Also:
-
IS_DEFAULT_STREAM
- See Also:
-
MESSAGE_RETENTION_DAYS
- See Also:
-
IS_ARCHIVED
- See Also:
-
FOLDER_ID
- See Also:
-
TOPICS_POLICY
- See Also:
-
CAN_ADD_SUBSCRIBERS_GROUP
- See Also:
-
CAN_REMOVE_SUBSCRIBERS_GROUP
- See Also:
-
CAN_ADMINISTER_CHANNEL_GROUP
- See Also:
-
CAN_DELETE_ANY_MESSAGE_GROUP
- See Also:
-
CAN_DELETE_OWN_MESSAGE_GROUP
- See Also:
-
CAN_MOVE_MESSAGES_OUT_OF_CHANNEL_GROUP
- See Also:
-
CAN_MOVE_MESSAGES_WITHIN_CHANNEL_GROUP
- See Also:
-
CAN_SEND_MESSAGE_GROUP
- See Also:
-
CAN_SUBSCRIBE_GROUP
- See Also:
-
CAN_RESOLVE_TOPICS_GROUP
- See Also:
-
-
Constructor Details
-
UpdateStreamApiRequest
Constructs aDeleteStreamApiRequest
.- Parameters:
client
- The Zulip HTTP clientstreamId
- The id of the stream to update
-
-
Method Details
-
withDescription
Sets the updated stream description.- Parameters:
description
- The description of the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withName
Sets the updated stream name.- Parameters:
name
- The name of the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withIsPrivate
Sets whether the stream is private.- Parameters:
isPrivate
-true
if the stream should be private.false
if the stream should be public- Returns:
- This
UpdateStreamApiRequest
instance
-
withDefaultStream
Sets whether any newly created streams will be added as default streams for new users joining the organization.- Parameters:
defaultStream
-true
results in any newly created streams as the default.false
results in any newly created streams being the default- Returns:
- This
SubscribeStreamsApiRequest
instance
-
withWebPublic
Sets whether the stream is a web-public stream.- Parameters:
webPublic
-true
results in any newly created streams created as web public.false
results in created streams being non web-public- Returns:
- This
UpdateStreamApiRequest
instance
-
withMessageRetention
Sets the updated number of days that message history should be retained.- Parameters:
messageRetentionDays
- The number of days for which message history should be retained- Returns:
- This
UpdateStreamApiRequest
instance
-
withIsArchived
Sets whether the stream is archived.- Parameters:
isArchived
-true
to archive the stream.false
to unarchive the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withFolderId
Sets the folder this stream belongs to.- Parameters:
folderId
- the id of the folder this stream belongs to- Returns:
- This
UpdateStreamApiRequest
instance
-
withTopicPolicy
Sets whether named topics and the empty topic are enabled in this channel. https://zulip.com/api/update-stream#parameter-topics_policy- Parameters:
topicPolicy
- TheTopicPolicy
- Returns:
- This
UpdateStreamApiRequest
instance
-
withMessageRetention
Sets the updated message retention policy of a stream.- Parameters:
messageRetentionPolicy
- TheRetentionPolicy
that should apply to the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withHistoryPublicToSubscribers
Sets whether the stream history is public to new subscribers.- Parameters:
historyPublicToSubscribers
-true
if stream history should be public to new subscribers.false
if stream history should not be public to new subscribers- Returns:
- This
UpdateStreamApiRequest
instance
-
withCanRemoveSubscribersGroup
Sets the users who have permission to unsubscribe others from this stream.- Parameters:
userGroupSetting
- TheUserGroupSetting
determining which members are allowed to unsubscribe others from the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withCanAddSubscribersGroup
Sets the users who have permission to add others to this stream.- Parameters:
userGroupSetting
- TheUserGroupSetting
determining which members are allowed to subscribe others to the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withCanAdministerChannelGroup
Set the users who have permission to administer this stream.- Parameters:
userGroupSetting
- TheUserGroupSetting
determining which members are allowed to subscribe others to the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withCanDeleteAnyMessageGroup
Set the users who have permission to delete any message in the stream.- Parameters:
userGroupSetting
- TheUserGroupSetting
determining the users who have permission to delete any message in the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withCanDeleteOwnMessageGroup
Set the users who have permission to delete they have sent to the stream.- Parameters:
userGroupSetting
- TheUserGroupSetting
determining the users who have permission to delete they have sent to the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withCanMoveMessagesOutOfChannelGroup
public UpdateStreamApiRequest withCanMoveMessagesOutOfChannelGroup(UserGroupSetting userGroupSetting) Set the users who have permission to move messages out of this stream.- Parameters:
userGroupSetting
- TheUserGroupSetting
determining the users who have permission to move messages out of this stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withCanMoveMessagesWithinChannelGroup
public UpdateStreamApiRequest withCanMoveMessagesWithinChannelGroup(UserGroupSetting userGroupSetting) Set the users who have permission to move messages within this stream.- Parameters:
userGroupSetting
- TheUserGroupSetting
determining the users who have permission to move messages within this stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withCanSendMessageGroup
Set the users who have permission to post in this stream.- Parameters:
userGroupSetting
- TheUserGroupSetting
determining which members are allowed to subscribe others to the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withCanSubscribeGroup
Sets the users who have permission to subscribe themselves to this stream.- Parameters:
userGroupSetting
- TheUserGroupSetting
determining which members are allowed to subscribe others to the stream- Returns:
- This
UpdateStreamApiRequest
instance
-
withCanResolveTopicsGroup
Set the users who have permission to resolve topics in this stream.- Parameters:
userGroupSetting
- TheUserGroupSetting
determining the users who have permission resolve topics in this stream- Returns:
- This
UpdateStreamApiRequest
instance
-
execute
Executes the Zulip API request for updating a stream.- Specified by:
execute
in interfaceVoidExecutableApiRequest
- Throws:
ZulipClientException
- if the request was not successful
-