|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Field Summary | |
static String |
PERSONAL_SPACEKEY_IDENTIFIER
Deprecated. since 2.3 use Space.PERSONAL_SPACEKEY_IDENTIFIER |
Method Summary | |
void |
convertToPersonalSpace(Space space,
User owner,
boolean updateLinks)
Convert a global space into a user's personal space. |
Space |
createPersonalSpace(String name,
String description,
User owner)
Creates a personal space. |
Space |
createSpace(String key,
String name,
String description,
User creator)
|
long |
findPageTotal(Space space)
Get the number of pages in a space. |
List |
getAllSpaces()
Finds all spaces in Confluence, of any type. |
List |
getAuthoredSpacesByUser(String username)
|
List |
getBlogPosts(Space space,
boolean currentOnly)
Deprecated. from 2.3 use PageManager.getBlogPosts(Space, boolean) |
List |
getEditableSpacesByType(User user,
SpaceType type)
Return all spaces of a given type in which the user can create or edit pages |
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. |
List |
getPages(Space space,
boolean currentOnly)
Deprecated. from 2.3 use PageManager.getPages(Space, boolean) |
List |
getPagesStartingWith(Space space,
String s)
Deprecated. from 2.3 use PageManager.getPagesStartingWith(Space, String) |
List |
getPermittedSpaces(User user)
Return all spaces for which the the user has VIEW permission. |
List |
getPermittedSpacesByType(User user,
SpaceType type)
Return all spaces of a given type for which the user has VIEW permission. |
List |
getPermittedSpacesInSpaceGroup(User user,
SpaceGroup spaceGroup)
Return all spaces within a given spaceGroup for which the user has VIEW permission |
Space |
getPersonalSpace(String username)
Get the personal space for the user with the given username |
Space |
getPersonalSpace(User user)
Get the personal space of the given user. |
String |
getPersonalSpaceKey(String username)
|
Space |
getSpace(long id)
Retrieve a space by its ID. |
Space |
getSpace(String spaceKey)
Retrieve a space by its key. |
List |
getSpaceContent(Space space,
boolean currentOnly)
|
String |
getSpaceFromPageId(long pageId)
Get the key for a space from its pageId in a single db call |
List |
getSpaces()
Deprecated. since 2.3 use getSpacesByType(com.atlassian.confluence.spaces.SpaceType) |
List |
getSpacesByType(SpaceType type)
|
List |
getSpacesContainingCommentsBy(String username)
|
List |
getSpacesContainingPagesEditedBy(String username)
|
List |
getSpacesCreatedAfter(Date creationDate)
|
List |
getSpacesCreatedOrUpdatedSinceDate(Date previousLoginDate)
Deprecated. since 2.3 this method is unreferenced, and probably doesn't do anything useful |
List |
getSpacesEditableByUser(User user)
Return all spaces in which the the can create or edit pages. |
List |
getSpacesInSpaceGroup(SpaceGroup spaceGroup)
|
boolean |
isValidPersonalSpaceKey(String key)
Deprecated. since 2.3 use Space.isValidPersonalSpaceKey(java.lang.String) |
boolean |
isValidSpaceKey(String key)
Deprecated. since 2.3 use Space.isValidGlobalSpaceKey(java.lang.String) |
void |
moveHierarchy(Page topPage,
Page newParentPage,
Space newSpace,
User user,
boolean moveChildren,
List pagesToIndex)
Moves a page and its hierarchy to a new parent page, space, or both. |
void |
removeSpace(Space space)
|
void |
removeSpacesInGroup(SpaceGroup spaceGroup)
|
void |
saveSpace(Space space)
|
void |
saveSpace(Space space,
Space originalSpace)
|
Field Detail |
public static final String PERSONAL_SPACEKEY_IDENTIFIER
Method Detail |
public Space createSpace(String key, String name, String description, User creator)
public Space createPersonalSpace(String name, String description, User owner)
name
- description
- owner
-
public void saveSpace(Space space)
public void saveSpace(Space space, Space originalSpace)
public void removeSpace(Space space)
public void removeSpacesInGroup(SpaceGroup spaceGroup)
public Space getSpace(long id)
id
- the ID of the space
public Space getSpace(String spaceKey)
spaceKey
- the space key of the space to retrieve
public Space getPersonalSpace(String username)
username
- the username of the user to get the personal space of
public Space getPersonalSpace(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
public List getAllSpaces()
public List getSpaces()
getSpacesByType(com.atlassian.confluence.spaces.SpaceType)
public List getPermittedSpaces(User user)
user
- the user to check permissions against, or null for the anonymous user
public List getPermittedSpacesByType(User user, SpaceType type)
user
- the user to check permissions against, or null for the anonymous usertype
- the type of space to return
public List getPermittedSpacesInSpaceGroup(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
public List getSpacesEditableByUser(User user)
user
- the user to check permissions against, or null for the anonymous user
public List getEditableSpacesByType(User user, SpaceType type)
user
- the user to check permissions against, or null for the anonymous usertype
- the type of space to return
public List getSpacesContainingPagesEditedBy(String username)
public List getSpacesContainingCommentsBy(String username)
public List getAuthoredSpacesByUser(String username)
public List getSpacesCreatedOrUpdatedSinceDate(Date previousLoginDate)
public void convertToPersonalSpace(Space space, 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.public long findPageTotal(Space space)
space
- the space to count pages in
public int getNumberOfBlogPosts(Space space)
space
- the space to count pages in
public int getNumberOfMail(Space space)
space
- the space to count mail in
public void moveHierarchy(Page topPage, Page newParentPage, Space newSpace, User user, boolean moveChildren, List pagesToIndex)
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)
IllegalArgumentException
- if newSpace is null
IllegalArgumentException
- if topPage is null
IllegalArgumentException
- if newParentPage is not in newSpacepublic String getSpaceFromPageId(long pageId)
pageId
- the id of the page to look for
public List getSpaceContent(Space space, boolean currentOnly)
public List getSpacesCreatedAfter(Date creationDate)
public String getPersonalSpaceKey(String username)
public List getSpacesByType(SpaceType type)
public List getSpacesInSpaceGroup(SpaceGroup spaceGroup)
public boolean isValidSpaceKey(String key)
Space.isValidGlobalSpaceKey(java.lang.String)
public boolean isValidPersonalSpaceKey(String key)
Space.isValidPersonalSpaceKey(java.lang.String)
public List getPages(Space space, boolean currentOnly)
PageManager.getPages(Space, boolean)
public List getPagesStartingWith(Space space, String s)
PageManager.getPagesStartingWith(Space, String)
public List getBlogPosts(Space space, boolean currentOnly)
PageManager.getBlogPosts(Space, boolean)
public List getMail(Space space, boolean currentOnly)
MailContentManager.getMail(Space, boolean)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |