@ApplicationScoped public class CopyManagerImpl extends Object implements CopyManager
Constructor and Description |
---|
CopyManagerImpl() |
Modifier and Type | Method and Description |
---|---|
PanelInstance |
copy(PanelInstance panelInstance,
WorkspaceImpl workspace)
Copies this panel instance to another Workspace.
|
Panel |
copy(Panel panel,
Section section,
LayoutRegion region)
Copies this panel to another section.
|
Panel |
copy(Panel panel,
Section section,
LayoutRegion region,
PanelInstance instance)
Copies this panel to another section.
|
Section |
copy(Section section,
WorkspaceImpl workspace,
SectionCopyOption sco)
Copies this section and all panels inside to another workspace.
|
WorkspaceImpl |
copy(WorkspaceImpl workspace)
Copies a Workspace.
|
WorkspaceImpl |
copy(WorkspaceImpl workspace,
String id)
Copies a Workspace.
|
protected void |
copyHomePages(Workspace workspace,
Workspace workspaceClone) |
protected void |
copyPermissions(Object resource,
Object resourceCopy,
Class<? extends Permission> permissionClass,
Workspace targetWorkspace)
Copy permissions define for a given resource and assigns created copies to another resource.
|
protected void |
copyPermissions(PanelInstance panelInstance,
PanelInstance panelInstanceCopy)
Clones Panel permissions.
|
protected void |
copyPermissions(Section section,
Section sectionCopy)
Clones Section permissions.
|
protected void |
copyPermissions(WorkspaceImpl workspace,
WorkspaceImpl workspaceCopy)
Clones Workspace permissions.
|
protected void |
copyResources(PanelInstance panel,
PanelInstance panelClone) |
protected void |
copyResources(Panel panel,
Panel panelClone) |
protected void |
copyResources(Section section,
Section sectionClone) |
protected void |
copyResources(Workspace workspace,
Workspace workspaceClone) |
public PanelInstance copy(PanelInstance panelInstance, WorkspaceImpl workspace) throws Exception
CopyManager
copy
in interface CopyManager
panelInstance
- PanelInstance to copy.workspace
- Workspace to copy this panelInstance to.Exception
public Panel copy(Panel panel, Section section, LayoutRegion region) throws Exception
CopyManager
copy
in interface CopyManager
panel
- Panel to copy.section
- section to copy panel to.region
- region to copy panel to.Exception
public Panel copy(Panel panel, Section section, LayoutRegion region, PanelInstance instance) throws Exception
CopyManager
copy
in interface CopyManager
panel
- Panel to copy.section
- section to copy panel to.region
- region to copy panel to.instance
- Instance the panel must have. Normally, it is the same, but can be different if the panel's instance is also being copied.Exception
public Section copy(Section section, WorkspaceImpl workspace, SectionCopyOption sco) throws Exception
CopyManager
copy
in interface CopyManager
section
- Source section to be copied.workspace
- Destination Workspace for this section.sco
- Copy options. May be null, wich means 'do default copy'.Exception
public WorkspaceImpl copy(WorkspaceImpl workspace, String id) throws Exception
CopyManager
copy
in interface CopyManager
workspace
- Workspace to copyid
- Id to assign to new Workspace.Exception
- If any exception occurspublic WorkspaceImpl copy(WorkspaceImpl workspace) throws Exception
CopyManager
copy
in interface CopyManager
workspace
- Workspace to copyException
protected void copyHomePages(Workspace workspace, Workspace workspaceClone) throws org.hibernate.HibernateException
org.hibernate.HibernateException
protected void copyPermissions(WorkspaceImpl workspace, WorkspaceImpl workspaceCopy)
workspace
- Workspace whose permissions will be readworkspaceCopy
- Workspace whose permissions will be updated with the other onesprotected void copyPermissions(PanelInstance panelInstance, PanelInstance panelInstanceCopy)
panelInstance
- Panel whose permissions will be readpanelInstanceCopy
- Panel whose permissions will be updated with the other onesprotected void copyPermissions(Section section, Section sectionCopy)
section
- Section whose permissions will be readsectionCopy
- Section whose permissions will be updated with the other onesprotected void copyPermissions(Object resource, Object resourceCopy, Class<? extends Permission> permissionClass, Workspace targetWorkspace) throws Exception
resource
- The resource which permissions are going to be copied.resourceCopy
- The resource that is going to receive the copied permissions.permissionClass
- The copy is restricted to the given permission class.targetWorkspace
- The workspace where copied resource will be stored.Exception
protected void copyResources(Workspace workspace, Workspace workspaceClone) throws Exception
Exception
protected void copyResources(Section section, Section sectionClone) throws Exception
Exception
protected void copyResources(Panel panel, Panel panelClone) throws Exception
Exception
protected void copyResources(PanelInstance panel, PanelInstance panelClone) throws Exception
Exception
Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.