Class ConfluenceRestClientContentStatesConsumerApi
java.lang.Object
io.github.primelib.confluence4j.rest.v1.client.ConfluenceRestClientContentStatesConsumerApi
@Generated("io.github.primelib.primecodegen")
public class ConfluenceRestClientContentStatesConsumerApi
extends Object
ConfluenceRestClientContentStatesConsumerApi
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionDeleteContentByIDStateV1 Removes the content state of a content and publishes a new version.GetContentByIDStateAvailableV1 Gets available content states for content.GetContentByIDStateV1 Get content state Gets the current content state of the draft or current version of content.GetContentStatesV1 Get Custom Content States Get custom content states that authenticated user has created.GetSpaceBySpaceKeyStateContentV1 Get content in space with given content state Returns all content that has the provided content state in a space.GetSpaceBySpaceKeyStateSettingsV1 Get content state settings for space Get object describing whether content states are allowed at all, if custom content states or space content states are restricted, and a list of space content states allowed for the space if they are not restricted.GetSpaceBySpaceKeyStateV1 Get space suggested content states Get content states that are suggested in the space.PutContentByIDStateV1 Set the content state of a content and publishes a new version of the content.
-
Constructor Details
-
ConfluenceRestClientContentStatesConsumerApi
-
-
Method Details
-
GetContentByIDStateV1
public ContentStateResponse GetContentByIDStateV1(Consumer<GetContentByIDStateV1OperationSpec> spec) GetContentByIDStateV1 Get content state Gets the current content state of the draft or current version of content. To specify the draft version, set the parameter status to draft, otherwise archived or current will get the relevant published state. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.- Parameters:
spec- a consumer that creates the payload for this operation. Supports the following properties:- id: The id of the content whose content state is of interest.
- status: Set status to one of [current,draft,archived]. Default value is current.
-
PutContentByIDStateV1
public ContentStateResponse PutContentByIDStateV1(Consumer<PutContentByIDStateV1OperationSpec> spec) PutContentByIDStateV1 Set the content state of a content and publishes a new version of the content. Sets the content state of the content specified and creates a new version (publishes the content without changing the body) of the content with the new state. You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id will be used. If the name and color passed in already exist under the current user's existing custom states, the existing state will be reused. If custom states are disabled in the space of the content (which can be determined by getting the content state space settings of the content's space) then this set will fail. You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is required in the body of this request. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.- Parameters:
spec- a consumer that creates the payload for this operation. Supports the following properties:- id: The Id of the content whose content state is to be set.
- status: Status of content onto which state will be placed. If draft, then draft state will change. If current, state will be placed onto a new version of the content with same body as previous version.
- payload: Content state fields for state. Pass in id for an existing state, or new name and color for best matching existing state, or new state if allowed in space.
-
DeleteContentByIDStateV1
public ContentStateResponse DeleteContentByIDStateV1(Consumer<DeleteContentByIDStateV1OperationSpec> spec) DeleteContentByIDStateV1 Removes the content state of a content and publishes a new version. Removes the content state of the content specified and creates a new version (publishes the content without changing the body) of the content with the new status. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.- Parameters:
spec- a consumer that creates the payload for this operation. Supports the following properties:- id: The Id of the content whose content state is to be set.
- status: status of content state from which to delete state. Can be draft or archived
-
GetContentByIDStateAvailableV1
public AvailableContentStates GetContentByIDStateAvailableV1(Consumer<GetContentByIDStateAvailableV1OperationSpec> spec) GetContentByIDStateAvailableV1 Gets available content states for content. Gets content states that are available for the content to be set as. Will return all enabled Space Content States. Will only return most the 3 most recently published custom content states to match UI editor list. To get all custom content states, use the /content-states endpoint. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.- Parameters:
spec- a consumer that creates the payload for this operation. Supports the following properties:- id: id of content to get available states for
-
GetContentStatesV1
GetContentStatesV1 Get Custom Content States Get custom content states that authenticated user has created. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication. -
GetSpaceBySpaceKeyStateV1
public List<ContentState> GetSpaceBySpaceKeyStateV1(Consumer<GetSpaceBySpaceKeyStateV1OperationSpec> spec) GetSpaceBySpaceKeyStateV1 Get space suggested content states Get content states that are suggested in the space. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.- Parameters:
spec- a consumer that creates the payload for this operation. Supports the following properties:- spaceKey: The key of the space to be queried for its content state settings.
-
GetSpaceBySpaceKeyStateSettingsV1
public ContentStateSettings GetSpaceBySpaceKeyStateSettingsV1(Consumer<GetSpaceBySpaceKeyStateSettingsV1OperationSpec> spec) GetSpaceBySpaceKeyStateSettingsV1 Get content state settings for space Get object describing whether content states are allowed at all, if custom content states or space content states are restricted, and a list of space content states allowed for the space if they are not restricted. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.- Parameters:
spec- a consumer that creates the payload for this operation. Supports the following properties:- spaceKey: The key of the space to be queried for its content state settings.
-
GetSpaceBySpaceKeyStateContentV1
public ContentArray GetSpaceBySpaceKeyStateContentV1(Consumer<GetSpaceBySpaceKeyStateContentV1OperationSpec> spec) GetSpaceBySpaceKeyStateContentV1 Get content in space with given content state Returns all content that has the provided content state in a space. If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the query limit parameter will be restricted to a maximum value of 25. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.- Parameters:
spec- a consumer that creates the payload for this operation. Supports the following properties:- spaceKey: The key of the space to be queried for its content state settings.
- stateId: The id of the content state to filter content by
- expand: A multi-value parameter indicating which properties of the content to expand. Options include: space, version, history, children, etc. Ex: space,version
- limit: Maximum number of results to return
- start: Number of result to start returning. (0 indexed)
-