Class ItStateManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContentNotification
(ConfluenceUser user, ContentEntityObject contentEntityObject) void
addGlobalPermissionToGroup
(String permission, String groupname) void
addGlobalPermissionToUser
(String permission, ConfluenceUser user) void
addGroupToGroup
(com.atlassian.crowd.embedded.api.Group childGroup, com.atlassian.crowd.embedded.api.Group parentGroup) void
addUserToGroup
(ConfluenceUser user, com.atlassian.crowd.embedded.api.Group group) void
com.atlassian.crowd.embedded.api.Group
createGroup
(String groupName) void
deletePage
(Page page, ConfluenceUser user) void
void
<T> T
doInTransaction
(org.springframework.transaction.support.TransactionCallback<T> callback) void
Enables global anonymous access to Confluence, seeConfluenceAccessManager
void
Enables global unlicensed access to Confluence, seeConfluenceAccessManager
void
enableNestedGroups
(boolean enable) void
<T extends AbstractPage>
TforceNewVersion
(T page) Saves a new version of a page, with no change to the page content.Optional<com.atlassian.crowd.embedded.api.Group>
void
GrantsSpacePermission.USE_CONFLUENCE_PERMISSION
to a specific user, granting them licensed access to Confluence.makeAdminUser
(String username, String name) Creates a user and puts it in the confluence-administrators group, which results in superuser permissions.Creates a user with no special permissions or group memberships.void
modifyPage
(Page originalPage) void
void
void
void
void
void
void
void
void
void
removeAllUsersExcept
(Set<ConfluenceUser> usersToKeep) void
removeUserFromGroup
(ConfluenceUser user, com.atlassian.crowd.embedded.api.Group group) storeAndGetAliasedKey
(String alias) com.atlassian.crowd.model.application.Application
storeAndGetApplication
(String applicationName) com.atlassian.crowd.model.application.Application
storeAndGetApplication
(String applicationName, com.atlassian.crowd.model.application.ApplicationType applicationType) storeAndGetNotification
(Space space) storeAndGetPageAttachment
(ContentEntityObject container) storeAndGetPageAttachment
(ContentEntityObject container, String attachmentName) storeAndGetPageAttachmentVersion
(ContentEntityObject container, String attachmentName, Attachment originalAttachment) storeAndGetSecrets
(String key, String value) storeAndGetTestBlogPost
(Space blogPostSpace) storeAndGetTestBlogPost
(Space blogPostSpace, String title) storeAndGetTestBlogPost
(Space space, String title, String status) storeAndGetTestBlogPost
(Space space, String title, String status, ConfluenceUser author) storeAndGetTestBlogsTx
(Space testSpace, int count) Creates blogs in a new transaction.storeAndGetTestChildCommentsTx
(ContentEntityObject container, Comment parent, int count) Creates unresolved child comments in a new transaction.storeAndGetTestChildPage
(Space pageSpace, Page parentPage, String title) storeAndGetTestChildPage
(Space pageSpace, Page parentPage, String title, String contentStatus, Page originalPage) storeAndGetTestChildPagesTx
(Page parent, int count) Creates child pages in a new transaction.storeAndGetTestInlineCommentsTx
(ContentEntityObject container, int count) Creates unresolved inline comments in a new transaction.storeAndGetTestPage
(Space pageSpace) storeAndGetTestPage
(Space pageSpace, String title) storeAndGetTestPage
(Space pageSpace, String title, String contentStatus, Page originalPage) storeAndGetTestPage
(Space pageSpace, String title, String contentStatus, Page originalPage, ConfluenceUser author) storeAndGetTestPagesTx
(Space testSpace, int count) Creates pages in a new transaction.storeAndGetTestPagesWithBodyOfSizeInMBTx
(Space testSpace, int count, int bodyStringSizeInMB) Creates pages with body size mentioned in a new transaction.storeAndGetTestResolvedCommentListTx
(Page container, int count) Creates resolved (page-level or inline) comments in a new transaction.storeAndGetTestSpace
(String spaceName) storeAndGetTestSpace
(String spaceName, SpaceType spaceType) void
storeCrowdSyncToken
(ConfluenceUser user, String token) trackAliasedKey
(ConfluenceTrustedApplication storedApp) trackNotification
(Notification notification) trackSecrets
(String key) trackSpace
(Space space) trackUser
(ConfluenceUser user) boolean
update
(Attachment attachment) <T extends AbstractPage>
voidupdate
(T page, T original) Updates a page to save a new version.
-
Field Details
-
TEST_PAGE_TITLE
- See Also:
-
TEST_BLOGPOST_TITLE
- See Also:
-
TEST_SPACE_KEY
- See Also:
-
TEST_ATTACHMENT_NAME
- See Also:
-
TEST_PAGE_BODY
- See Also:
-
EDITOR_FORMAT_CHEESE_MACRO
- See Also:
-
STORAGE_FORMAT_CHEESE_MACRO
- See Also:
-
BYTES_PER_MB
public static final int BYTES_PER_MB- See Also:
-
-
Constructor Details
-
ItStateManager
public ItStateManager()
-
-
Method Details
-
removeAllTrackedObjects
public void removeAllTrackedObjects() -
getSpacePermissionManager
-
getSpaceManager
-
getTrashManager
-
getCommentManager
-
getPageManager
-
getContentService
-
getAsymmetricKeyFactory
-
getTrustedApplicationsManager
-
getAttachmentManager
-
getLabelManager
-
getFavouriteManager
-
getFollowManager
-
storeAndGetTestPage
-
addContentNotification
-
storeAndGetTestPage
-
storeAndGetTestPage
-
storeAndGetTestPage
-
storeAndGetTestPage
-
modifyPage
-
deletePage
-
storeAndGetTestChildPage
-
storeAndGetTestChildPage
-
storeAndGetTestBlogPost
-
storeAndGetTestBlogPost
-
storeAndGetTestBlogPost
public BlogPost storeAndGetTestBlogPost(Space space, String title, String status, ConfluenceUser author) -
storeAndGetTestBlogPost
-
storeAndGetTestBlogPost
-
storeAndGetTestComment
-
storeAndGetTestSpace
-
storeAndGetTestSpace
-
storeAndGetTestSpace
-
storeAndGetTestContent
- Throws:
ServiceException
-
storeAndGetTestPagesTx
Creates pages in a new transaction.Uses a transaction boundary so that subsequent calls can ensure the content exists in the DB, not just in the cache. This allows us to use other nested transactions, read-only transactions and so on while working with the data created here.
- Parameters:
testSpace
- the space that will contain the pagescount
- the number of pages to create- Returns:
- a list of pages
-
storeAndGetTestPagesWithBodyOfSizeInMBTx
public List<Page> storeAndGetTestPagesWithBodyOfSizeInMBTx(Space testSpace, int count, int bodyStringSizeInMB) Creates pages with body size mentioned in a new transaction.Uses a transaction boundary so that subsequent calls can ensure the content exists in the DB, not just in the cache. This allows us to use other nested transactions, read-only transactions and so on while working with the data created here.
- Parameters:
testSpace
- the space that will contain the pagescount
- the number of pages to create- Returns:
- a list of pages
-
storeAndGetTestBlogsTx
Creates blogs in a new transaction.Uses a transaction boundary so that subsequent calls can ensure the content exists in the DB, not just in the cache. This allows us to use other nested transactions, read-only transactions and so on while working with the data created here.
- Parameters:
testSpace
- the space that will contain the blogscount
- the number of blogs to create- Returns:
- a list of blogs
-
storeAndGetTestChildPagesTx
Creates child pages in a new transaction.Uses a transaction boundary so that subsequent calls can ensure the content exists in the DB, not just in the cache. This allows us to use other nested transactions, read-only transactions and so on while working with the data created here.
- Parameters:
parent
- the parent of the pages to createcount
- the number of pages to create- Returns:
- a list of child pages
-
storeAndGetTestChildCommentsTx
public List<Comment> storeAndGetTestChildCommentsTx(ContentEntityObject container, Comment parent, int count) Creates unresolved child comments in a new transaction.Uses a transaction boundary so that subsequent calls can ensure the content exists in the DB, not just in the cache. This allows us to use other nested transactions, read-only transactions and so on while working with the data created here.
- Parameters:
container
- the content that will contain the commentsparent
- the parent comment of comments to create. Can be null, meaning the comments should be top-level.count
- the number of comments to create- Returns:
- a list of child comments
-
storeAndGetTestInlineCommentsTx
Creates unresolved inline comments in a new transaction.Uses a transaction boundary so that subsequent calls can ensure the content exists in the DB, not just in the cache. This allows us to use other nested transactions, read-only transactions and so on while working with the data created here.
- Parameters:
container
- the content that will contain the commentscount
- the number of comments to create- Returns:
- a list of inline comments
-
storeAndGetTestResolvedCommentListTx
Creates resolved (page-level or inline) comments in a new transaction.Uses a transaction boundary so that subsequent calls can ensure the content exists in the DB, not just in the cache. This allows us to use other nested transactions, read-only transactions and so on while working with the data created here.
- Parameters:
container
- the content that will contain the commentscount
- the number of comments to create- Returns:
- a list of resolved comments
-
storeAndGetPageAttachment
-
storeAndGetPageAttachment
-
storeAndGetPageAttachmentVersion
public Attachment storeAndGetPageAttachmentVersion(ContentEntityObject container, String attachmentName, Attachment originalAttachment) -
create
-
update
Updates a page to save a new version. -
forceNewVersion
Saves a new version of a page, with no change to the page content. -
update
- Throws:
IOException
-
removeAllUsersExcept
-
removeAllSpaces
public void removeAllSpaces() -
removeAllPropertySets
public void removeAllPropertySets() -
removeAllTrackedNotifications
public void removeAllTrackedNotifications() -
removeAllLabels
public void removeAllLabels() -
removeAllNotifications
public void removeAllNotifications() -
removeAllLikes
public void removeAllLikes() -
removeAllPersonalInformation
public void removeAllPersonalInformation() -
trackSpace
-
trackUser
-
trackNotification
-
trackAliasedKey
-
trackSecrets
-
makeAdminUser
-
makeAdminUser
Creates a user and puts it in the confluence-administrators group, which results in superuser permissions. -
makeUser
Creates a user with no special permissions or group memberships. -
getGroup
-
createGroup
-
addUserToGroup
-
addGroupToGroup
public void addGroupToGroup(com.atlassian.crowd.embedded.api.Group childGroup, com.atlassian.crowd.embedded.api.Group parentGroup) - See Also:
-
enableNestedGroups
public void enableNestedGroups(boolean enable) -
removeUserFromGroup
-
addGlobalPermissionToGroup
-
addGlobalPermissionToUser
-
enableGlobalUnlicensedAuthenticatedAccess
public void enableGlobalUnlicensedAuthenticatedAccess()Enables global unlicensed access to Confluence, seeConfluenceAccessManager
-
disableGlobalUnlicenedAuthenticatedAccess
public void disableGlobalUnlicenedAuthenticatedAccess() -
enableUnlicensedAuthenticatedAccessForSpace
-
enableGlobalAnonymousAccess
public void enableGlobalAnonymousAccess()Enables global anonymous access to Confluence, seeConfluenceAccessManager
-
disableGlobalAnonymousAccess
public void disableGlobalAnonymousAccess() -
grantUseConfluencePermission
GrantsSpacePermission.USE_CONFLUENCE_PERMISSION
to a specific user, granting them licensed access to Confluence. -
doInTransaction
public <T> T doInTransaction(org.springframework.transaction.support.TransactionCallback<T> callback) -
storeAndGetAliasedKey
-
storeAndGetApplication
public com.atlassian.crowd.model.application.Application storeAndGetApplication(String applicationName, com.atlassian.crowd.model.application.ApplicationType applicationType) -
storeAndGetApplication
public com.atlassian.crowd.model.application.Application storeAndGetApplication(String applicationName) -
storeAndGetNotification
-
storeAndGetNotification
-
storeAndGetSecrets
-
removeAllTrackedSecrets
public void removeAllTrackedSecrets() -
storeCrowdSyncToken
-
trash
-