|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.spaces.DefaultSpaceManager
public class DefaultSpaceManager
| Field Summary | |
|---|---|
static String |
DEFAULT_HOMEPAGE_TITLE
Deprecated. As of Confluence 2.10 use InitialSpaceContentListener.DEFAULT_HOMEPAGE_TITLE |
static String |
DEFAULT_INDEX_CONTENT
|
static String |
DEFAULT_INDEX_TITLE
|
| Fields inherited from interface com.atlassian.confluence.spaces.SpaceManager |
|---|
GLOBAL_LOGO |
| Constructor Summary | |
|---|---|
DefaultSpaceManager()
|
|
| Method Summary | |
|---|---|
Space |
createPersonalSpace(String name,
String description,
com.atlassian.user.User owner)
Creates a personal space. |
Space |
createPrivatePersonalSpace(String name,
String description,
com.atlassian.user.User owner)
Create a personal Space for which only the creator has any permissions |
Space |
createPrivateSpace(String key,
String name,
String description,
com.atlassian.user.User creator)
Creates a Space for which only the creator has any permissions |
Space |
createSpace(Space space)
Deprecated since 4.3. |
Space |
createSpace(String key,
String name,
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. |
List<Space> |
getAllSpaces()
Finds all spaces in Confluence, of any type, sorted alphabetically by space name. |
List<Space> |
getAllSpaces(SpacesQuery query)
Get a list of spaces specified by the SpacesQuery. |
AttachmentManager |
getAttachmentManager()
|
List |
getAuthoredSpacesByUser(String username)
|
List |
getEditableSpacesByType(com.atlassian.user.User user,
SpaceType type)
Deprecated. since 3.1 use getSpaces(SpacesQuery) instead |
SpaceLogo |
getLogoForGlobalcontext()
|
SpaceLogo |
getLogoForSpace(String spaceKey)
|
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<Space> |
getPermittedSpaces(com.atlassian.user.User user)
Deprecated. since 3.1 use getSpaces(SpacesQuery) instead |
List<Space> |
getPermittedSpacesByType(com.atlassian.user.User user,
SpaceType type)
Deprecated. since 3.1 use getSpaces(SpacesQuery) instead |
List |
getPermittedSpacesInSpaceGroup(com.atlassian.user.User user,
SpaceGroup spaceGroup)
Deprecated. since 3.1 use getSpaces(SpacesQuery) instead |
Space |
getPersonalSpace(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. |
String |
getPersonalSpaceKey(String username)
|
SettingsManager |
getSettingsManager()
|
Space |
getSpace(long id)
Retrieve a space by its ID. |
Space |
getSpace(String exactKey)
Retrieve a space by its key. |
String |
getSpaceFromPageId(long pageId)
Get the key for a space from its pageId in a single db call |
ListBuilder<Space> |
getSpaces(SpacesQuery query)
Get a list of spaces specified by the SpacesQuery limited by the offset and maxResults. |
List<Space> |
getSpacesByType(SpaceType type)
Deprecated. since 3.1 use getSpaces(SpacesQuery) instead |
List |
getSpacesContainingCommentsBy(String username)
|
List |
getSpacesContainingPagesEditedBy(String username)
Returns Pages that are either created or edited by the specified user |
List<Space> |
getSpacesCreatedAfter(Date creationDate)
|
List<Space> |
getSpacesEditableByUser(com.atlassian.user.User user)
Deprecated. since 3.1 use getSpaces(SpacesQuery) instead |
List<Space> |
getSpacesInSpaceGroup(SpaceGroup spaceGroup)
Deprecated. since 3.1 use getSpaces(SpacesQuery) instead |
boolean |
isValidPersonalSpaceKey(String key)
Deprecated. since 2.3 use Space.isValidPersonalSpaceKey(String) instead |
boolean |
isValidSpaceKey(String key)
Deprecated. since 2.3 use Space.isValidGlobalSpaceKey(String) instead |
Boolean |
removeSpace(Space space)
|
Boolean |
removeSpace(String spaceKey,
com.atlassian.core.util.ProgressMeter progressMeter)
Removes a space with a given spaceKey (case sensitive). |
void |
removeSpacesInGroup(SpaceGroup spaceGroup)
|
void |
saveSpace(Space space)
|
void |
saveSpace(Space space,
Space originalSpace)
|
void |
setAttachmentManager(AttachmentManager attachmentManager)
|
void |
setEventManager(com.atlassian.event.EventManager eventManager)
|
void |
setI18NBeanFactory(I18NBeanFactory i18NBeanFactory)
|
void |
setIndexer(ConfluenceIndexer indexer)
|
void |
setIndexManager(ConfluenceIndexManager indexManager)
|
void |
setLabelManager(LabelManager labelManager)
|
void |
setNotificationManager(NotificationManager notificationManager)
|
void |
setSettingsManager(SettingsManager settingsManager)
|
void |
setSpaceDao(SpaceDao spaceDao)
|
void |
setSpaceDescriptionManager(SpaceDescriptionManager spaceDescriptionManager)
|
void |
setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static final String DEFAULT_HOMEPAGE_TITLE
InitialSpaceContentListener.DEFAULT_HOMEPAGE_TITLEpublic static final String DEFAULT_INDEX_TITLE
public static final String DEFAULT_INDEX_CONTENT
| Constructor Detail |
|---|
public DefaultSpaceManager()
| Method Detail |
|---|
public void setSpaceDao(SpaceDao spaceDao)
@Deprecated public boolean isValidSpaceKey(String key)
Space.isValidGlobalSpaceKey(String) instead
@Deprecated public boolean isValidPersonalSpaceKey(String key)
Space.isValidPersonalSpaceKey(String) instead
public void setSpaceDescriptionManager(SpaceDescriptionManager spaceDescriptionManager)
public void setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
public Space getSpace(long id)
SpaceManager
getSpace in interface SpaceManagerid - the ID of the space
public Space getSpace(String exactKey)
SpaceManager
getSpace in interface SpaceManagerexactKey - the space key of the space to retrieve
public Space getPersonalSpace(String username)
SpaceManager
getPersonalSpace in interface SpaceManagerusername - the username of the user to get the personal space of
public void setIndexer(ConfluenceIndexer indexer)
public Boolean removeSpace(Space space)
removeSpace in interface SpaceManager
public Boolean removeSpace(String spaceKey,
com.atlassian.core.util.ProgressMeter progressMeter)
SpaceManager
removeSpace in interface SpaceManagerspaceKey - the key of the space to removeprogressMeter - will be updated with status messages and percentage completed. Not Null.
public void removeSpacesInGroup(SpaceGroup spaceGroup)
removeSpacesInGroup in interface SpaceManagerpublic void saveSpace(Space space)
saveSpace in interface SpaceManager
public void saveSpace(Space space,
Space originalSpace)
saveSpace in interface SpaceManagerpublic List<Space> getAllSpaces()
SpaceManager
getAllSpaces in interface SpaceManager@Deprecated public List<Space> getSpacesByType(SpaceType type)
getSpaces(SpacesQuery) instead
getSpacesByType in interface SpaceManager@Deprecated public List<Space> getSpacesInSpaceGroup(SpaceGroup spaceGroup)
getSpaces(SpacesQuery) instead
getSpacesInSpaceGroup in interface SpaceManager@Deprecated public List<Space> getPermittedSpaces(com.atlassian.user.User user)
getSpaces(SpacesQuery) instead
SpaceManager
getPermittedSpaces in interface SpaceManageruser - the user to check permissions against, or null for the anonymous user
@Deprecated
public List<Space> getPermittedSpacesByType(com.atlassian.user.User user,
SpaceType type)
getSpaces(SpacesQuery) instead
SpaceManager
getPermittedSpacesByType in interface SpaceManageruser - the user to check permissions against, or null for the anonymous usertype - the type of space to return
@Deprecated
public List getPermittedSpacesInSpaceGroup(com.atlassian.user.User user,
SpaceGroup spaceGroup)
getSpaces(SpacesQuery) instead
SpaceManager
getPermittedSpacesInSpaceGroup in interface SpaceManageruser - the user to check permissions against, or null for the anonymous userspaceGroup - the spaceGroup from which we query the spaces
@Deprecated
public List getEditableSpacesByType(com.atlassian.user.User user,
SpaceType type)
getSpaces(SpacesQuery) instead
SpaceManager
getEditableSpacesByType in interface SpaceManageruser - the user to check permissions against, or null for the anonymous usertype - the type of space to return
@Deprecated public List<Space> getSpacesEditableByUser(com.atlassian.user.User user)
getSpaces(SpacesQuery) instead
SpaceManager
getSpacesEditableByUser in interface SpaceManageruser - the user to check permissions against, or null for the anonymous user
public List getAuthoredSpacesByUser(String username)
getAuthoredSpacesByUser in interface SpaceManagerpublic List getSpacesContainingPagesEditedBy(String username)
SpaceManagerPages that are either created or edited by the specified user
getSpacesContainingPagesEditedBy in interface SpaceManagerusername - a username
Pages that are either created or edited by the specified userpublic List getSpacesContainingCommentsBy(String username)
getSpacesContainingCommentsBy in interface SpaceManager
public Space createSpace(String key,
String name,
String description,
com.atlassian.user.User creator)
createSpace in interface SpaceManager
public Space createPrivateSpace(String key,
String name,
String description,
com.atlassian.user.User creator)
SpaceManager
createPrivateSpace in interface SpaceManager
public Space createPersonalSpace(String name,
String description,
com.atlassian.user.User owner)
SpaceManager
createPersonalSpace in interface SpaceManager
public Space createPrivatePersonalSpace(String name,
String description,
com.atlassian.user.User owner)
SpaceManager
createPrivatePersonalSpace in interface SpaceManagerpublic Space createSpace(Space space)
createSpace in interface SpaceManagerspace -
public Space getPersonalSpace(com.atlassian.user.User user)
SpaceManagerSpaceManager.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()).
getPersonalSpace in interface SpaceManageruser - the user to get the space for. If user is null, the method will return null
public long findPageTotal(Space space)
SpaceManager
findPageTotal in interface SpaceManagerspace - the space to count pages in
public void setEventManager(com.atlassian.event.EventManager eventManager)
public int getNumberOfBlogPosts(Space space)
SpaceManager
getNumberOfBlogPosts in interface SpaceManagerspace - the space to count pages in
public int getNumberOfMail(Space space)
SpaceManager
getNumberOfMail in interface SpaceManagerspace - the space to count mail in
public String getSpaceFromPageId(long pageId)
SpaceManager
getSpaceFromPageId in interface SpaceManagerpageId - the id of the page to look for
public void ensureSpaceDescriptionExists(Space space)
SpaceManagerThis is required for CONF-4080, because labels on a Space are attached to a Space Description.
ensureSpaceDescriptionExists in interface SpaceManagerspace - an existing space. Not null.public List<Space> getSpacesCreatedAfter(Date creationDate)
getSpacesCreatedAfter in interface SpaceManagerpublic void setNotificationManager(NotificationManager notificationManager)
public void setLabelManager(LabelManager labelManager)
public String getPersonalSpaceKey(String username)
getPersonalSpaceKey in interface SpaceManagerpublic void setIndexManager(ConfluenceIndexManager indexManager)
public AttachmentManager getAttachmentManager()
public void setAttachmentManager(AttachmentManager attachmentManager)
public SettingsManager getSettingsManager()
public void setSettingsManager(SettingsManager settingsManager)
public void setI18NBeanFactory(I18NBeanFactory i18NBeanFactory)
public SpaceLogo getLogoForSpace(String spaceKey)
getLogoForSpace in interface SpaceManagerpublic SpaceLogo getLogoForGlobalcontext()
getLogoForGlobalcontext in interface SpaceManagerpublic ListBuilder<Space> getSpaces(SpacesQuery query)
SpaceManagerSpacesQuery limited by the offset and maxResults.
getSpaces in interface SpaceManagerpublic List<Space> getAllSpaces(SpacesQuery query)
SpaceManagerSpacesQuery. 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
SpaceManager.getSpaces(SpacesQuery) to retrieve pages of results instead.
getAllSpaces in interface SpaceManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||