|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl
com.xpn.xwiki.plugin.workspacesmanager.WorkspacesManagerExtension
public class WorkspacesManagerExtension
SpaceManager extension for Workspaces manager plugin
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
LOG
|
protected static java.util.Map |
roles
|
protected static java.lang.String |
WORKSPACE_EVENT_SPACE_CREATION_KEY
|
protected static java.lang.String |
WORKSPACE_PREFERENCES_SHEET
|
protected static java.lang.String |
WORKSPACE_ROLE_READER_CODE
|
protected static java.lang.String |
WORKSPACE_ROLE_READER_GROUP
|
protected static java.lang.String |
WORKSPACE_ROLE_READER_LEVELS
|
protected static java.lang.String |
WORKSPACE_ROLE_WRITER_CODE
|
protected static java.lang.String |
WORKSPACE_ROLE_WRITER_GROUP
|
protected static java.lang.String |
WORKSPACE_ROLE_WRITER_LEVELS
|
protected static java.lang.String |
WORKSPACE_SPACE_CLASS_NAME
|
protected static java.lang.String |
WORKSPACE_SPACE_TYPE
|
static java.lang.String |
XWIKI_SPACE_SEPARATOR
|
static java.lang.String |
XWIKI_WORKSPACE_APPSEPARATOR
|
Fields inherited from class com.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl |
---|
sm |
Constructor Summary | |
---|---|
WorkspacesManagerExtension()
|
Method Summary | |
---|---|
protected void |
addApplicationToSpace(java.lang.String appName,
java.lang.String spaceName,
com.xpn.xwiki.XWikiContext context)
Install an application in the space, by copying or linking documents. |
java.lang.String |
getAdminGroupName(java.lang.String spaceName)
|
java.lang.String |
getMemberGroupName(java.lang.String spaceName)
|
java.lang.String |
getRoleGroupName(java.lang.String spaceName,
java.lang.String roleName)
|
java.lang.String |
getSpaceTypeName()
|
protected com.xpn.xwiki.objects.classes.BaseClass |
getWorkspaceSpaceClass(com.xpn.xwiki.XWikiContext context)
Returns the Workspace BaseClass , updating its definition if needed. |
java.lang.String |
getWorkspaceSpaceClassName()
|
void |
init(com.xpn.xwiki.plugin.spacemanager.api.SpaceManager manager,
com.xpn.xwiki.XWikiContext context)
|
void |
makeSpacePrivate(java.lang.String spaceName,
com.xpn.xwiki.XWikiContext context)
Save the rights of a workspace to make it private : deny view right to XWiki.XWikiAllGroup and XWiki.XWikiGuest |
void |
makeSpacePublic(java.lang.String spaceName,
com.xpn.xwiki.XWikiContext context)
Save the rights of a workspace to make it private : deny view right to XWiki.XWikiGuest but allow view right to XWiki.XWikiAllGroup so that authenticated users can access the Workspace. |
void |
postCreateSpace(java.lang.String spaceName,
com.xpn.xwiki.XWikiContext context)
Operations executed after the actual Space creation. |
void |
postDeleteSpace(java.lang.String spaceName,
boolean deleteData,
com.xpn.xwiki.XWikiContext context)
After space deletion by the spacemanager plugin (see SpaceManager.deleteSpace(String, boolean, XWikiContext) ,
delete inherited spaces documents (Applications spaces documents) of the workspace. |
protected void |
prepareWorkspaceContent(java.lang.String spaceName,
com.xpn.xwiki.XWikiContext context)
Prepare a newly created Workspace by adding some document for it. |
void |
virtualInit(com.xpn.xwiki.plugin.spacemanager.api.SpaceManager manager,
com.xpn.xwiki.XWikiContext context)
|
Methods inherited from class com.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl |
---|
getSpaceClassName, getSpaceUserProfilePageName, getSpaceWikiName, getSpaceWikiName, hasCustomMapping, preCreateSpace, preDeleteSpace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XWIKI_SPACE_SEPARATOR
public static final java.lang.String XWIKI_WORKSPACE_APPSEPARATOR
protected static final java.lang.String WORKSPACE_SPACE_TYPE
protected static final java.lang.String WORKSPACE_SPACE_CLASS_NAME
protected static final java.lang.String WORKSPACE_ROLE_READER_CODE
protected static final java.lang.String WORKSPACE_ROLE_READER_LEVELS
protected static final java.lang.String WORKSPACE_ROLE_READER_GROUP
protected static final java.lang.String WORKSPACE_ROLE_WRITER_CODE
protected static final java.lang.String WORKSPACE_ROLE_WRITER_LEVELS
protected static final java.lang.String WORKSPACE_ROLE_WRITER_GROUP
protected static final java.lang.String WORKSPACE_PREFERENCES_SHEET
protected static final java.lang.String WORKSPACE_EVENT_SPACE_CREATION_KEY
protected static final org.apache.commons.logging.Log LOG
protected static java.util.Map roles
Constructor Detail |
---|
public WorkspacesManagerExtension()
Method Detail |
---|
public void init(com.xpn.xwiki.plugin.spacemanager.api.SpaceManager manager, com.xpn.xwiki.XWikiContext context) throws com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerException
init
in interface com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerExtension
init
in class com.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl
com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerException
public void virtualInit(com.xpn.xwiki.plugin.spacemanager.api.SpaceManager manager, com.xpn.xwiki.XWikiContext context) throws com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerException
virtualInit
in interface com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerExtension
virtualInit
in class com.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl
com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerException
public java.lang.String getSpaceTypeName()
getSpaceTypeName
in interface com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerExtension
getSpaceTypeName
in class com.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl
public java.lang.String getWorkspaceSpaceClassName()
public java.lang.String getMemberGroupName(java.lang.String spaceName)
getMemberGroupName
in interface com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerExtension
getMemberGroupName
in class com.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl
public java.lang.String getAdminGroupName(java.lang.String spaceName)
getAdminGroupName
in interface com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerExtension
getAdminGroupName
in class com.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl
protected com.xpn.xwiki.objects.classes.BaseClass getWorkspaceSpaceClass(com.xpn.xwiki.XWikiContext context) throws com.xpn.xwiki.XWikiException
BaseClass
, updating its definition if needed.
com.xpn.xwiki.XWikiException
public java.lang.String getRoleGroupName(java.lang.String spaceName, java.lang.String roleName)
getRoleGroupName
in interface com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerExtension
getRoleGroupName
in class com.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl
public void postCreateSpace(java.lang.String spaceName, com.xpn.xwiki.XWikiContext context) throws com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerException
Space
creation. For a workspace, consist in
intializing the space rights, according to its visivility, private or public, and publish the
first story of its activity stream .
postCreateSpace
in interface com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerExtension
postCreateSpace
in class com.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl
com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerException
public void postDeleteSpace(java.lang.String spaceName, boolean deleteData, com.xpn.xwiki.XWikiContext context)
SpaceManager.deleteSpace(String, boolean, XWikiContext)
,
delete inherited spaces documents (Applications spaces documents) of the workspace.
postDeleteSpace
in interface com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerExtension
postDeleteSpace
in class com.xpn.xwiki.plugin.spacemanager.impl.SpaceManagerExtensionImpl
spaceName
- the name of the root space (web) of the workspace for which to delete
application data. This is the name present in the 'parent' field of the
XWikiPreferences object of the application spaces (webs).if
- true, will delete the application documents, will do nothing otherwise.protected void prepareWorkspaceContent(java.lang.String spaceName, com.xpn.xwiki.XWikiContext context) throws com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerException
com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerException
public void makeSpacePrivate(java.lang.String spaceName, com.xpn.xwiki.XWikiContext context) throws WorkspacesManagerException
WorkspacesManagerException
public void makeSpacePublic(java.lang.String spaceName, com.xpn.xwiki.XWikiContext context) throws WorkspacesManagerException
WorkspacesManagerException
protected void addApplicationToSpace(java.lang.String appName, java.lang.String spaceName, com.xpn.xwiki.XWikiContext context) throws com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerException
ApplicationManagerPlugin
and save their
content locally in a wiki space (web) composed of the space wiki name and the application
name. Also make the application web inherits its rights from the space root space (web).
appName
- the name of the application to installspaceName
- the wiki name of the space to install the application in
com.xpn.xwiki.plugin.spacemanager.api.SpaceManagerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |