@ParametersAreNonnullByDefault
@Transactional
public interface SpaceManager
Modifier and Type | Field and Description |
---|---|
static String |
GLOBAL_LOGO |
Modifier and Type | Method and Description |
---|---|
void |
archiveSpace(Space space)
Archive the space.
|
@NonNull Space |
createPersonalSpace(String name,
@Nullable String description,
com.atlassian.user.User owner)
Creates a personal space.
|
@NonNull Space |
createPrivatePersonalSpace(String name,
@Nullable String description,
com.atlassian.user.User owner)
Create a personal Space for which only the creator has any permissions
|
@NonNull Space |
createPrivateSpace(String key,
String name,
@Nullable String description,
com.atlassian.user.User creator)
Creates a Space for which only the creator has any permissions
|
@NonNull Space |
createSpace(Space space)
Deprecated.
since 6.10.0, use {#link #createSpace(String key, String name, String description, User creator)}
|
@NonNull Space |
createSpace(String key,
String name,
@Nullable String description,
com.atlassian.user.User creator) |
void |
ensureSpaceDescriptionExists(Space space)
If the given Space does not have a description, creates one for it, and saves it.
|
long |
findPageTotal(Space space)
Get the number of pages in a space.
|
@NonNull Collection<String> |
getAllSpaceKeys(SpaceStatus status)
Get the space keys of all spaces with the given status.
|
@NonNull List<Space> |
getAllSpaces()
Deprecated.
since 7.3.0, use
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal in core where applicable |
@NonNull List<Space> |
getAllSpaces(SpacesQuery query)
Deprecated.
since 7.3.0, use
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal in core where applicable |
@NonNull List |
getAuthoredSpacesByUser(String username) |
@NonNull SpaceLogo |
getLogoForGlobalcontext() |
@NonNull SpaceLogo |
getLogoForSpace(@Nullable String spaceKey) |
int |
getNumberOfBlogPosts(Space space)
Get the number of blog posts in a space.
|
@Nullable Space |
getPersonalSpace(@Nullable ConfluenceUser user)
Deprecated.
since 7.3.0, use
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal in core where applicable |
@Nullable Space |
getSpace(long id)
Deprecated.
since 7.3.0, use
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal in core where applicable |
@Nullable Space |
getSpace(@Nullable String spaceKey)
Deprecated.
since 7.3.0, use
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal in core where applicable |
@NonNull List<com.atlassian.user.User> |
getSpaceAdmins(Space spaces)
Returns a list of administrators for a given space, sorted by full name
|
@NonNull List<com.atlassian.user.User> |
getSpaceAdmins(Space spaces,
int limit)
Returns a list of administrators for a given space, sorted by full name, up to the size limit
|
@Nullable String |
getSpaceFromPageId(long pageId)
Get the key for a space from its pageId in a single db call
|
@NonNull ListBuilder<Space> |
getSpaces(SpacesQuery query)
Deprecated.
since 7.3.0, use
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal in core where applicable |
@NonNull List |
getSpacesContainingCommentsBy(String username) |
@NonNull List |
getSpacesContainingPagesEditedBy(String username)
Returns
Page s that are either created or edited by the specified user |
@NonNull List<Space> |
getSpacesCreatedAfter(Date creationDate) |
@NonNull Boolean |
removeSpace(Space space)
Removes a space with a given space.
|
@NonNull Boolean |
removeSpace(String spaceKey)
Removes a space with a given spaceKey (case sensitive).
|
@NonNull Boolean |
removeSpace(String spaceKey,
com.atlassian.core.util.ProgressMeter progressMeter)
Removes a space with a given spaceKey (case sensitive).
|
void |
removeSpacesInGroup(SpaceGroup spaceGroup)
Deprecated.
since 5.9.
|
void |
saveSpace(Space space) |
void |
saveSpace(Space space,
Space originalSpace) |
void |
unarchiveSpace(Space space)
Un-archive the space.
|
static final String GLOBAL_LOGO
@NonNull Space createSpace(String key, String name, @Nullable String description, com.atlassian.user.User creator)
@NonNull Space createPersonalSpace(String name, @Nullable String description, com.atlassian.user.User owner)
@NonNull Space createPrivatePersonalSpace(String name, @Nullable String description, com.atlassian.user.User owner)
@Deprecated @NonNull Space createSpace(Space space)
@NonNull Space createPrivateSpace(String key, String name, @Nullable String description, com.atlassian.user.User creator)
void saveSpace(Space space)
@Transactional(propagation=REQUIRES_NEW) @NonNull Boolean removeSpace(Space space)
Delegates to removeSpace(String, com.atlassian.core.util.ProgressMeter)
.
space
- the key of the space to remove@Transactional(propagation=REQUIRES_NEW) @NonNull Boolean removeSpace(String spaceKey)
Delegates to removeSpace(String, com.atlassian.core.util.ProgressMeter)
.
spaceKey
- the key of the space to remove@Transactional(propagation=REQUIRES_NEW) @NonNull Boolean removeSpace(String spaceKey, com.atlassian.core.util.ProgressMeter progressMeter)
spaceKey
- the key of the space to removeprogressMeter
- will be updated with status messages and percentage completed. Not Null.@Deprecated @Transactional(propagation=REQUIRES_NEW) void removeSpacesInGroup(SpaceGroup spaceGroup)
SpaceGroup
and related classes like
SpaceGroupManager
and
SpaceGroupComparator
will be removed.
Please do not use them.
@Deprecated @Transactional(readOnly=true) @Nullable Space getSpace(long id)
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal
in core where applicableid
- the ID of the space@Deprecated @Transactional(readOnly=true) @Nullable Space getSpace(@Nullable String spaceKey)
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal
in core where applicablespaceKey
- the space key of the space to retrieve@Deprecated @Transactional(readOnly=true) @Nullable Space getPersonalSpace(@Nullable ConfluenceUser user)
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal
in core where applicableuser
- the user to get the space for. If user is null, the method will return null@Deprecated @Transactional(readOnly=true) @NonNull List<Space> getAllSpaces()
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal
in core where applicable@Transactional(readOnly=true) @NonNull List getSpacesContainingPagesEditedBy(String username)
Page
s that are either created or edited by the specified userusername
- a usernamePage
s that are either created or edited by the specified user@Transactional(readOnly=true) @NonNull List getSpacesContainingCommentsBy(String username)
@Transactional(readOnly=true) @NonNull List getAuthoredSpacesByUser(String username)
@Transactional(readOnly=true) long findPageTotal(Space space)
space
- the space to count pages in@Transactional(readOnly=true) int getNumberOfBlogPosts(Space space)
space
- the space to count pages in@Transactional(readOnly=true) @Nullable String getSpaceFromPageId(long pageId)
pageId
- the id of the page to look for@Transactional(readOnly=true) @NonNull List<Space> getSpacesCreatedAfter(Date creationDate)
void ensureSpaceDescriptionExists(Space space)
This is required for CONF-4080, because labels on a Space are attached to a Space Description.
space
- an existing space. Not null.@Transactional(readOnly=true) @NonNull SpaceLogo getLogoForSpace(@Nullable String spaceKey)
@Transactional(readOnly=true) @NonNull SpaceLogo getLogoForGlobalcontext()
@Deprecated @Transactional(readOnly=true) @NonNull ListBuilder<Space> getSpaces(SpacesQuery query)
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal
in core where applicableSpacesQuery
limited by the offset and maxResults.@Deprecated @Transactional(readOnly=true) @NonNull List<Space> getAllSpaces(SpacesQuery query)
SpaceService.find(Expansion...)
in plugins and SpaceManagerInternal
in core where applicableSpacesQuery
. Any code that calls this method is a potential
performance problem. The method may be deprecated and removed in a future version of Confluence. Use
getSpaces(SpacesQuery)
to retrieve pages of results instead.@Transactional(readOnly=true) @NonNull List<com.atlassian.user.User> getSpaceAdmins(Space spaces)
@Transactional(readOnly=true) @NonNull List<com.atlassian.user.User> getSpaceAdmins(Space spaces, int limit)
void archiveSpace(Space space)
space
- the space to archive.void unarchiveSpace(Space space)
space
- the space to archive.@Transactional(readOnly=true) @NonNull Collection<String> getAllSpaceKeys(SpaceStatus status)
status
- the status to search forCopyright © 2003–2023 Atlassian. All rights reserved.
View cookie preferences