com.jalios.jcms.workspace
Class WorkspaceManager

java.lang.Object
  extended by com.jalios.jcms.workspace.WorkspaceManager

public class WorkspaceManager
extends Object

Version:
$Revision: 33963 $
Author:
Jean-Philippe Encausse

Field Summary
static String REVISION
           
 
Constructor Summary
WorkspaceManager()
           
 
Method Summary
protected static void createDuplicateCategories(WorkspaceWizardContext context)
          Duplicate all categories specified for the given WizardContext.
protected static void createGroups(WorkspaceWizardContext context)
          Duplicate all groups specified for the given WizardContext.
protected static void createPortals(WorkspaceWizardContext context)
          Duplicate all portals specified for the given WizardContext.
protected static boolean createWorkspace(WorkspaceWizardContext context)
          Creates the workspace instance from the given model
static WorkspaceWizardContext deepDuplicate(Workspace model, Member author, String prefix, String title)
          Deep duplicate the Workspace model using given configuration for duplication.
static WorkspaceWizardContext deepDuplicate(Workspace model, Member author, String prefix, String title, boolean collaborativeSpace)
          Deep duplicate the Workspace model using given configuration for duplication.
static WorkspaceWizardContext deepDuplicate(Workspace model, Member author, String prefix, String wstitle, String wsemail, List adminList, Collection typeCollec, Category[] categories, Group[] groups, PortalInterface[] portals, Workspace parent, boolean collaborativeSpace)
          Deep duplicate the Workspace model using given configuration for duplication.
static WorkspaceWizardContext deepDuplicate(Workspace model, Member author, String prefix, String wstitle, String wsemail, List adminList, Collection typeCollec, Collection catCollec, Collection groupCollec, Collection portalCollec, boolean collaborativeSpace)
          Deep duplicate the Workspace model using given configuration for duplication.
static WorkspaceWizardContext deepDuplicate(Workspace model, Member author, String prefix, String wstitle, String wsemail, List adminList, Collection typeCollec, Collection catCollec, Collection groupCollec, Collection portalCollec, Workspace parent, boolean collaborativeSpace)
          Deep duplicate the Workspace model using given configuration for duplication.
static WorkspaceWizardContext deepDuplicate(Workspace model, Member author, String prefix, String title, Workspace parent)
          Deep duplicate the Workspace model using given configuration for duplication.
static WorkspaceWizardContext deepDuplicate(Workspace model, Member author, String prefix, String title, Workspace parent, boolean collaborativeSpace)
          Deep duplicate the Workspace model using given configuration for duplication.
static WorkspaceWizardContext deepDuplicate(WorkspaceWizardContext context)
          Deep duplicate the Workspace model referenced by given WorkspaceWizardContext using context configuration for duplication.
static int getCollaborativeSpaceCount()
          Returns the counts of workspaces used as CollaborativeSpaces.
static int getNonCollaborativeWorkspaceCount()
          Returns the count of worspaces which are not used as CollaborativeSpaces.
protected static void updateWorkspace(WorkspaceWizardContext context)
          Update duplicated Workspace Duplicate WSTypeEntry Duplicate WKRoles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

WorkspaceManager

public WorkspaceManager()
Method Detail

deepDuplicate

public static WorkspaceWizardContext deepDuplicate(Workspace model,
                                                   Member author,
                                                   String prefix,
                                                   String title)
Deep duplicate the Workspace model using given configuration for duplication. Then returns the context with correctly filled binding maps.

Parameters:
model - the Workspace to duplicate
author - the author of all duplication
prefix - the prefix to use on all duplicated items
Returns:
WorkspaceWizardContext the filled context

deepDuplicate

public static WorkspaceWizardContext deepDuplicate(Workspace model,
                                                   Member author,
                                                   String prefix,
                                                   String title,
                                                   boolean collaborativeSpace)
Deep duplicate the Workspace model using given configuration for duplication. Then returns the context with correctly filled binding maps.

Parameters:
model - the Workspace to duplicate
author - the author of all duplication
prefix - the prefix to use on all duplicated items
collaborativeSpace - tell if the duplication is to create a collaborative space
Returns:
WorkspaceWizardContext the filled context

deepDuplicate

public static WorkspaceWizardContext deepDuplicate(Workspace model,
                                                   Member author,
                                                   String prefix,
                                                   String wstitle,
                                                   String wsemail,
                                                   List adminList,
                                                   Collection typeCollec,
                                                   Collection catCollec,
                                                   Collection groupCollec,
                                                   Collection portalCollec,
                                                   boolean collaborativeSpace)
Deep duplicate the Workspace model using given configuration for duplication. Then returns the context with correctly filled binding maps.

Parameters:
model - the Workspace to duplicate
author - the author of all duplication
prefix - the prefix to use on all duplicated items
wstitle - the workspace title
wsemail - the workspace email
adminList - a List of workspace administrators
typeCollec - a Set of classes to define WSTypeEntry to retrieve from model
catCollec - Workspace root categories to duplicate
groupCollec - to duplicate
portalCollec - to duplicate
Returns:
WorkspaceWizardContext the filled context

deepDuplicate

public static WorkspaceWizardContext deepDuplicate(Workspace model,
                                                   Member author,
                                                   String prefix,
                                                   String title,
                                                   Workspace parent)
Deep duplicate the Workspace model using given configuration for duplication. Then returns the context with correctly filled binding maps.

Parameters:
model - the Workspace to duplicate
author - the author of all duplication
prefix - the prefix to use on all duplicated items
parent - the parent workspace
Returns:
WorkspaceWizardContext the filled context

deepDuplicate

public static WorkspaceWizardContext deepDuplicate(Workspace model,
                                                   Member author,
                                                   String prefix,
                                                   String title,
                                                   Workspace parent,
                                                   boolean collaborativeSpace)
Deep duplicate the Workspace model using given configuration for duplication. Then returns the context with correctly filled binding maps.

Parameters:
model - the Workspace to duplicate
author - the author of all duplication
prefix - the prefix to use on all duplicated items
parent - the parent workspace
collaborativeSpace - tell if the duplication is to create a collaborative space
Returns:
WorkspaceWizardContext the filled context

deepDuplicate

public static WorkspaceWizardContext deepDuplicate(Workspace model,
                                                   Member author,
                                                   String prefix,
                                                   String wstitle,
                                                   String wsemail,
                                                   List adminList,
                                                   Collection typeCollec,
                                                   Collection catCollec,
                                                   Collection groupCollec,
                                                   Collection portalCollec,
                                                   Workspace parent,
                                                   boolean collaborativeSpace)
Deep duplicate the Workspace model using given configuration for duplication. Then returns the context with correctly filled binding maps.

Parameters:
model - the Workspace to duplicate
author - the author of all duplication
prefix - the prefix to use on all duplicated items
wstitle - the workspace title
wsemail - the workspace email
adminList - a List of workspace administrators
typeCollec - a Set of classes to define WSTypeEntry to retrieve from model
catCollec - Workspace root categories to duplicate
groupCollec - to duplicate
parent - the parent workspace
portalCollec - to duplicate
Returns:
WorkspaceWizardContext the filled context

deepDuplicate

public static WorkspaceWizardContext deepDuplicate(Workspace model,
                                                   Member author,
                                                   String prefix,
                                                   String wstitle,
                                                   String wsemail,
                                                   List adminList,
                                                   Collection typeCollec,
                                                   Category[] categories,
                                                   Group[] groups,
                                                   PortalInterface[] portals,
                                                   Workspace parent,
                                                   boolean collaborativeSpace)
Deep duplicate the Workspace model using given configuration for duplication. Then returns the context with correctly filled binding maps.

Parameters:
model - the Workspace to duplicate
author - the author of all duplication
prefix - the prefix to use on all duplicated items
wstitle - the workspace title
wsemail - the workspace email
adminList - a List of workspace administrators
typeCollec - a Set of classes to define WSTypeEntry to retrieve from model
categories - Workspace root categories to duplicate
groups - to duplicate
portals - to duplicate
Returns:
WorkspaceWizardContext the filled context

deepDuplicate

public static WorkspaceWizardContext deepDuplicate(WorkspaceWizardContext context)
Deep duplicate the Workspace model referenced by given WorkspaceWizardContext using context configuration for duplication. Then returns the context with correctly filled binding maps. 1. Create Workspace (Check create) 2.1 Create Category (no checks) => Map with previous categories 2.2 Update Workspace with categories (1) 3.1 Create Groups (no checks) => Link with workspace (1) and Map with previous groups 3.2 Update Groups (no checks) => Link with parents group (3.1) 3.3 Update Category (no checks) => Link with groups (3.1) for rights 4.1 Create PortalElement (no checks) => Map with previous portal element, workspace (1), groups (3.1), categories (1) 4.2 Recursive duplicate (no checks) 5.1 Create WSTypeEntry (no checks) => Link with categories (2), groups (3.1) 5.2 Create WKRole (not stored) => Link with groups (3.1) 5.3 Update Workspace (no checks) => Link with (5.1) and (5.2)

Parameters:
context - the WorkspaceWizardContext
Returns:
WorkspaceWizardContext the filled context

createDuplicateCategories

protected static void createDuplicateCategories(WorkspaceWizardContext context)
Duplicate all categories specified for the given WizardContext. Fills the WizardContext Category Map to retrieve binding old/new category

Parameters:
context - the WizardContext

createWorkspace

protected static boolean createWorkspace(WorkspaceWizardContext context)
Creates the workspace instance from the given model

Parameters:
context - the WizardContext

createGroups

protected static void createGroups(WorkspaceWizardContext context)
Duplicate all groups specified for the given WizardContext. Fills the WizardContext Group Map to retrieve binding old/new groups

Parameters:
context - the WizardContext

createPortals

protected static void createPortals(WorkspaceWizardContext context)
Duplicate all portals specified for the given WizardContext. Fills the WizardContext Portal Map to retrieve binding old/new portals

Parameters:
context - the WizardContext

updateWorkspace

protected static void updateWorkspace(WorkspaceWizardContext context)
Update duplicated Workspace

Parameters:
context - the WizardContext

getNonCollaborativeWorkspaceCount

public static int getNonCollaborativeWorkspaceCount()
Returns the count of worspaces which are not used as CollaborativeSpaces.

Returns:
the count of worspaces which are not used as CollaborativeSpace.
Since:
jcms-6.0.0

getCollaborativeSpaceCount

public static int getCollaborativeSpaceCount()
Returns the counts of workspaces used as CollaborativeSpaces.

Returns:
the counts of workspaces used as CollaborativeSpaces.
Since:
jcms-6.0.0


Copyright © 2001-2010 Jalios SA. All Rights Reserved.