Package com.jalios.jcms.workspace
Class WizardContext
- java.lang.Object
-
- com.jalios.jcms.workspace.WizardContext
-
- Direct Known Subclasses:
WorkspaceWizardContext
public class WizardContext extends java.lang.Object
This class is a convenient structure to handle all data used during a deep duplicate made by a Wizard.- The Publication/Group/Category Map contains binding of all/new object
- The Extra Map is a convenient Map used to store custom stuff
- The Data Set must contains all created objects used for rollback, ...
- Since:
- jcms-5.7.3
- Author:
- Jean-Philippe Encausse
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
append
protected Member
author
protected java.util.Map<Category,Category>
catMap
static java.lang.String
CONTEXT_WIZARD
protected ControllerStatus
cs
protected java.util.Map
ctxt
protected java.util.Map
extraMap
protected boolean
failed
protected java.util.Map<Group,Group>
groupMap
protected java.lang.String
prefix
protected java.util.Map<Publication,Publication>
pubMap
protected java.util.List
trackList
protected Workspace
workspace
-
Constructor Summary
Constructors Constructor Description WizardContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getAppendPrefix()
Returns a String representing the new objects prefixMember
getAuthor()
Returns Member that performs all operationjava.util.Map<Category,Category>
getCategoryMap()
Returns a map of old/new Categoriesjava.util.Map
getDataControllerContext()
Returns a Map containing WizardContext itself used by DataController to check it is a WizardActionjava.util.Map
getExtraMap()
Returns a map used to store extra infos during wizard processControllerStatus
getFailStatus()
Returns the ControllerStatus provided with failure or nulljava.util.Map<Group,Group>
getGroupMap()
Returns a map of old/new Groupsjava.lang.String
getPrefix()
Returns a String representing the new objects prefixjava.util.Map<Publication,Publication>
getPublicationMap()
Returns a map of old/new duplicated objectsjava.util.List
getTrackedData()
Returns a set of all created dataWorkspace
getWorkspace()
Returns the workspace of duplicated publicationsboolean
hasFailed()
Returns true if the wizard proces has failed for any reason.void
setAppendPrefix(boolean append)
Indicate if the prefix replace the title or append to the titlevoid
setAuthor(Member author)
Sets the Member that performs all operationvoid
setCategoryMap(java.util.Map<Category,Category> catMap)
Sets a map of old/new Categoriesvoid
setFailed(boolean failed, ControllerStatus cs)
void
setGroupMap(java.util.Map<Group,Group> groupMap)
Sets a map of old/new Groupsvoid
setPrefix(java.lang.String prefix)
Sets new objects prefixvoid
setWorkspace(Workspace workspace)
Sets the Workspace used by duplicated objectsvoid
trackCreatedData(Data data)
Store a new created data in the DataLsit
-
-
-
Field Detail
-
CONTEXT_WIZARD
public static final java.lang.String CONTEXT_WIZARD
- See Also:
- Constant Field Values
-
workspace
protected Workspace workspace
-
pubMap
protected java.util.Map<Publication,Publication> pubMap
-
extraMap
protected java.util.Map extraMap
-
trackList
protected java.util.List trackList
-
author
protected Member author
-
prefix
protected java.lang.String prefix
-
append
protected boolean append
-
ctxt
protected java.util.Map ctxt
-
failed
protected boolean failed
-
cs
protected ControllerStatus cs
-
-
Method Detail
-
hasFailed
public boolean hasFailed()
Returns true if the wizard proces has failed for any reason.- Returns:
- true if the wizard proces has failed for any reason.
-
getFailStatus
public ControllerStatus getFailStatus()
Returns the ControllerStatus provided with failure or null- Returns:
- ControllerStatus
-
setFailed
public void setFailed(boolean failed, ControllerStatus cs)
- Parameters:
failed
-cs
-
-
getDataControllerContext
public java.util.Map getDataControllerContext()
Returns a Map containing WizardContext itself used by DataController to check it is a WizardAction- Returns:
- Map contains the WizardContext
-
getWorkspace
public Workspace getWorkspace()
Returns the workspace of duplicated publications- Returns:
- Workspace a workspace
- Since:
- jcms-5.7.3
-
getGroupMap
public java.util.Map<Group,Group> getGroupMap()
Returns a map of old/new Groups- Returns:
- Map of old Group vs new Group
- Since:
- jcms-5.7.3
-
getExtraMap
public java.util.Map getExtraMap()
Returns a map used to store extra infos during wizard process- Returns:
- Map of Objects
- Since:
- jcms-5.7.3
-
getCategoryMap
public java.util.Map<Category,Category> getCategoryMap()
Returns a map of old/new Categories- Returns:
- Map of old Category vs new Category
- Since:
- jcms-5.7.3
-
getPublicationMap
public java.util.Map<Publication,Publication> getPublicationMap()
Returns a map of old/new duplicated objects- Returns:
- Map of Objects
- Since:
- jcms-5.7.3
-
getTrackedData
public java.util.List getTrackedData()
Returns a set of all created data- Returns:
- Map of Data
- Since:
- jcms-5.7.3
-
trackCreatedData
public void trackCreatedData(Data data)
Store a new created data in the DataLsit- Parameters:
data
- Data newly created- Since:
- jcms-5.7.3
-
getAuthor
public Member getAuthor()
Returns Member that performs all operation- Returns:
- Member performing operation
- Since:
- jcms-5.7.3
-
getPrefix
public java.lang.String getPrefix()
Returns a String representing the new objects prefix- Returns:
- String the prefix
- Since:
- jcms-5.7.3
-
getAppendPrefix
public boolean getAppendPrefix()
Returns a String representing the new objects prefix- Returns:
- boolean true to append prefix
- Since:
- jcms-5.7.5
-
setWorkspace
public void setWorkspace(Workspace workspace)
Sets the Workspace used by duplicated objects- Parameters:
workspace
- the new workspace- Since:
- jcms-5.7.3
-
setGroupMap
public void setGroupMap(java.util.Map<Group,Group> groupMap)
Sets a map of old/new Groups- Parameters:
groupMap
- Map of old Group vs new Group- Since:
- jcms-5.7.3
-
setCategoryMap
public void setCategoryMap(java.util.Map<Category,Category> catMap)
Sets a map of old/new Categories- Parameters:
catMap
- Map of old Category vs new Category- Since:
- jcms-5.7.3
-
setAuthor
public void setAuthor(Member author)
Sets the Member that performs all operation- Parameters:
author
- Member performing operation- Since:
- jcms-5.7.3
-
setPrefix
public void setPrefix(java.lang.String prefix)
Sets new objects prefix- Parameters:
prefix
- String the prefix- Since:
- jcms-5.7.3
-
setAppendPrefix
public void setAppendPrefix(boolean append)
Indicate if the prefix replace the title or append to the title- Parameters:
append
- boolean true to append- Since:
- jcms-5.7.5
-
-