|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SpaceManager
Field Summary | |
---|---|
static java.lang.String |
GLOBAL_LOGO
|
Method Summary | |
---|---|
void |
convertToPersonalSpace(Space space,
com.atlassian.user.User owner,
boolean updateLinks)
Convert a global space into a user's personal space. |
Space |
createPersonalSpace(java.lang.String name,
java.lang.String description,
com.atlassian.user.User owner)
Creates a personal space. |
Space |
createSpace(java.lang.String key,
java.lang.String name,
java.lang.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. |
java.util.List |
getAllSpaces()
Finds all spaces in Confluence, of any type. |
java.util.List |
getAuthoredSpacesByUser(java.lang.String username)
|
java.util.List |
getBlogPosts(Space space,
boolean currentOnly)
Deprecated. from 2.3 use PageManager.getBlogPosts(Space, boolean) |
java.util.List |
getEditableSpacesByType(com.atlassian.user.User user,
SpaceType type)
Return all spaces of a given type in which the user can create or edit pages |
SpaceLogo |
getLogoForGlobalcontext()
|
SpaceLogo |
getLogoForSpace(java.lang.String spaceKey)
|
java.util.List |
getMail(Space space,
boolean currentOnly)
Deprecated. from 2.3 use MailContentManager.getMail(Space, boolean) |
int |
getNumberOfBlogPosts(Space space)
Get the number of blog posts in a space. |
int |
getNumberOfMail(Space space)
Get the number of archived emails in a space. |
java.util.List |
getPages(Space space,
boolean currentOnly)
Deprecated. from 2.3 use PageManager.getPages(Space, boolean) |
java.util.List |
getPagesStartingWith(Space space,
java.lang.String s)
Deprecated. from 2.3 use PageManager.getPagesStartingWith(Space, String) |
java.util.List |
getPermittedSpaces(com.atlassian.user.User user)
Return all spaces for which the the user has VIEW permission. |
java.util.List |
getPermittedSpacesByType(com.atlassian.user.User user,
SpaceType type)
Return all spaces of a given type for which the user has VIEW permission. |
java.util.List |
getPermittedSpacesInSpaceGroup(com.atlassian.user.User user,
SpaceGroup spaceGroup)
Return all spaces within a given spaceGroup for which the user has VIEW permission |
Space |
getPersonalSpace(java.lang.String username)
Get the personal space for the user with the given username |
Space |
getPersonalSpace(com.atlassian.user.User user)
Get the personal space of the given user. |
java.lang.String |
getPersonalSpaceKey(java.lang.String username)
|
Space |
getSpace(long id)
Retrieve a space by its ID. |
Space |
getSpace(java.lang.String spaceKey)
Retrieve a space by its key. |
java.util.List |
getSpaceContent(Space space,
boolean currentOnly)
|
java.lang.String |
getSpaceFromPageId(long pageId)
Get the key for a space from its pageId in a single db call |
java.util.List |
getSpaces()
Deprecated. since 2.3 use getSpacesByType(com.atlassian.confluence.spaces.SpaceType) |
java.util.List |
getSpacesByType(SpaceType type)
|
java.util.List |
getSpacesContainingCommentsBy(java.lang.String username)
|
java.util.List |
getSpacesContainingPagesEditedBy(java.lang.String username)
Returns Page s that are either created or edited by the specified user |
java.util.List |
getSpacesCreatedAfter(java.util.Date creationDate)
|
java.util.List |
getSpacesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
Deprecated. since 2.3 this method is unreferenced, and probably doesn't do anything useful |
java.util.List |
getSpacesEditableByUser(com.atlassian.user.User user)
Return all spaces in which the the can create or edit pages. |
java.util.List |
getSpacesInSpaceGroup(SpaceGroup spaceGroup)
|
boolean |
isValidPersonalSpaceKey(java.lang.String key)
Deprecated. since 2.3 use Space.isValidPersonalSpaceKey(java.lang.String) |
boolean |
isValidSpaceKey(java.lang.String key)
Deprecated. since 2.3 use Space.isValidGlobalSpaceKey(java.lang.String) |
void |
moveHierarchy(Page topPage,
Page newParentPage,
Space newSpace,
com.atlassian.user.User user,
boolean moveChildren,
java.util.List pagesToIndex)
Deprecated. since 2.9 use PageManager.movePage(Page, Space) or PageManager.movePage(Page, Page, int) instead |
void |
removeSpace(Space space)
|
void |
removeSpacesInGroup(SpaceGroup spaceGroup)
|
void |
saveSpace(Space space)
|
void |
saveSpace(Space space,
Space originalSpace)
|
Field Detail |
---|
static final java.lang.String GLOBAL_LOGO
Method Detail |
---|
Space createSpace(java.lang.String key, java.lang.String name, java.lang.String description, com.atlassian.user.User creator)
Space createPersonalSpace(java.lang.String name, java.lang.String description, com.atlassian.user.User owner)
name
- description
- owner
-
void saveSpace(Space space)
void saveSpace(Space space, Space originalSpace)
void removeSpace(Space space)
void removeSpacesInGroup(SpaceGroup spaceGroup)
Space getSpace(long id)
id
- the ID of the space
Space getSpace(java.lang.String spaceKey)
spaceKey
- the space key of the space to retrieve
Space getPersonalSpace(java.lang.String username)
username
- the username of the user to get the personal space of
Space getPersonalSpace(com.atlassian.user.User user)
getPersonalSpace(String)
, as it behaves gracefully when the user is anonymous
(i.e. null). Where the user is not null, this method is the equivalent of
getPersonalSpace(user.getName())
.
user
- the user to get the space for. If user is null, the method will return null
java.util.List getAllSpaces()
java.util.List getSpaces()
getSpacesByType(com.atlassian.confluence.spaces.SpaceType)
java.util.List getPermittedSpaces(com.atlassian.user.User user)
user
- the user to check permissions against, or null for the anonymous user
java.util.List getPermittedSpacesByType(com.atlassian.user.User user, SpaceType type)
user
- the user to check permissions against, or null for the anonymous usertype
- the type of space to return
java.util.List getPermittedSpacesInSpaceGroup(com.atlassian.user.User user, SpaceGroup spaceGroup)
user
- the user to check permissions against, or null for the anonymous userspaceGroup
- the spaceGroup from which we query the spaces
java.util.List getSpacesEditableByUser(com.atlassian.user.User user)
user
- the user to check permissions against, or null for the anonymous user
java.util.List getEditableSpacesByType(com.atlassian.user.User user, SpaceType type)
user
- the user to check permissions against, or null for the anonymous usertype
- the type of space to return
java.util.List getSpacesContainingPagesEditedBy(java.lang.String username)
Page
s that are either created or edited by the specified user
username
- a username
Page
s that are either created or edited by the specified userjava.util.List getSpacesContainingCommentsBy(java.lang.String username)
java.util.List getAuthoredSpacesByUser(java.lang.String username)
java.util.List getSpacesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
void convertToPersonalSpace(Space space, com.atlassian.user.User owner, boolean updateLinks)
~username
, the owner will be set to the personal
space owner, and optionally all incoming links will be refactored.
space
- the space to convertowner
- the new owner of the personal spaceupdateLinks
- true if you want to update incoming links to the space.long findPageTotal(Space space)
space
- the space to count pages in
int getNumberOfBlogPosts(Space space)
space
- the space to count pages in
int getNumberOfMail(Space space)
space
- the space to count mail in
void moveHierarchy(Page topPage, Page newParentPage, Space newSpace, com.atlassian.user.User user, boolean moveChildren, java.util.List pagesToIndex)
PageManager.movePage(Page, Space)
or PageManager.movePage(Page, Page, int)
instead
This method also updates the parent-child relationships of each of the affected pages, and rebuilds the ancestor lists.
If moveChildren is true or newSpace is the same as the current space, all of topPage's children will be moved to the new location. Otherwise, the children will be moved to the root of the current space ("orphaned").
Pages the user cannot see (due to page permissions) are not moved, as a security precuation, and are instead moved to the root of the current space.
topPage
- The page to movenewParentPage
- The new parent pagenewSpace
- The new space (old space if the same)user
- The current usermoveChildren
- True if topPage's children should be moved with it, false to leave them. Always treated as true if moving within the same space.pagesToIndex
- normally an empty array list that will be updated with all the pages that need indexing (this way we can delay indexing til after the move has been complete)
java.lang.IllegalArgumentException
- if newSpace is null
java.lang.IllegalArgumentException
- if topPage is null
java.lang.IllegalArgumentException
- if newParentPage is not in newSpacejava.lang.String getSpaceFromPageId(long pageId)
pageId
- the id of the page to look for
java.util.List getSpaceContent(Space space, boolean currentOnly)
java.util.List getSpacesCreatedAfter(java.util.Date creationDate)
java.lang.String getPersonalSpaceKey(java.lang.String username)
java.util.List getSpacesByType(SpaceType type)
java.util.List getSpacesInSpaceGroup(SpaceGroup spaceGroup)
boolean isValidSpaceKey(java.lang.String key)
Space.isValidGlobalSpaceKey(java.lang.String)
boolean isValidPersonalSpaceKey(java.lang.String key)
Space.isValidPersonalSpaceKey(java.lang.String)
java.util.List getPages(Space space, boolean currentOnly)
PageManager.getPages(Space, boolean)
java.util.List getPagesStartingWith(Space space, java.lang.String s)
PageManager.getPagesStartingWith(Space, String)
java.util.List getBlogPosts(Space space, boolean currentOnly)
PageManager.getBlogPosts(Space, boolean)
java.util.List getMail(Space space, boolean currentOnly)
MailContentManager.getMail(Space, boolean)
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.SpaceLogo getLogoForSpace(java.lang.String spaceKey)
SpaceLogo getLogoForGlobalcontext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |