@ApplicationScoped public class WorkspacesManager extends Object
Modifier and Type | Field and Description |
---|---|
protected EnvelopesManager |
envelopesManager |
protected LayoutsManager |
layoutsManager |
protected SkinsManager |
skinsManager |
Constructor and Description |
---|
WorkspacesManager() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(WorkspaceListener listener)
Adds a listener for all queues
|
void |
addListener(WorkspaceListener listener,
String eventId)
Adds a listener to the queue for events with given id
|
void |
addNewWorkspace(WorkspaceImpl newWorkspace)
Adds a workspace to the whole system
|
void |
delete(Workspace workspace)
Removes a workspace from the system
|
void |
deleteUselessPanelInstances(String workspaceId) |
void |
deleteUselessPanelsAndInstances(String workspaceId) |
protected void |
fireWorkspaceCreated(Workspace p)
Fires the workspace created event to all listeners
|
protected void |
fireWorkspaceRemoved(Workspace p)
Fires the workspace removed event to all listeners
|
protected void |
fireWorkspaceUpdated(Workspace p)
Fires the workspace updated event to all listeners
|
void |
fireWorkspaceWizardFinished(Workspace src,
Workspace clone) |
String |
generateWorkspaceId()
Generate a unique workspace identifier
|
Set<String> |
getAllWorkspacesIdentifiers() |
Set<String> |
getAvailableWorkspacesIds()
Deprecated.
Workspaces manager shouldn't be aware of current user status.
|
Workspace |
getDefaultWorkspace() |
List<WorkspaceListener> |
getListeners(String eventId)
Return listeners that should be notified of given event ID.
|
Set<WorkspaceListener> |
getUniqueListeners(String eventId)
Return listeners that should be notified of given event ID.
|
Workspace |
getWorkspace(String id) |
Workspace |
getWorkspaceByUrl(String url) |
WorkspaceImpl[] |
getWorkspaces()
Return all workspaces
|
void |
removeInstance(PanelInstance instance) |
void |
removeListener(WorkspaceListener listener)
Removes Listener from all queues
|
void |
removeListener(WorkspaceListener listener,
String eventId)
Removes a Listener from given queue
|
void |
store(Workspace workspace) |
@Inject protected SkinsManager skinsManager
@Inject protected EnvelopesManager envelopesManager
@Inject protected LayoutsManager layoutsManager
public String generateWorkspaceId() throws Exception
Exception
public void addNewWorkspace(WorkspaceImpl newWorkspace) throws Exception
Exception
public void delete(Workspace workspace) throws Exception
Exception
public WorkspaceImpl[] getWorkspaces()
public Set<String> getAllWorkspacesIdentifiers() throws Exception
Exception
public Set<String> getAvailableWorkspacesIds() throws Exception
Exception
public Workspace getDefaultWorkspace()
public void addListener(WorkspaceListener listener)
listener
- EventListener to addpublic void addListener(WorkspaceListener listener, String eventId)
listener
- EventListener to addeventId
- Event id the listener is interested in.public void removeListener(WorkspaceListener listener)
listener
- listener EventListener to removepublic void removeListener(WorkspaceListener listener, String eventId)
listener
- listener EventListener to removeeventId
- Event id queue to remove listener from.public List<WorkspaceListener> getListeners(String eventId)
eventId
- public Set<WorkspaceListener> getUniqueListeners(String eventId)
protected void fireWorkspaceCreated(Workspace p)
p
- The workspace created.protected void fireWorkspaceRemoved(Workspace p)
p
- The workspace removed.protected void fireWorkspaceUpdated(Workspace p)
p
- The workspace updated.public void deleteUselessPanelsAndInstances(String workspaceId) throws Exception
Exception
public void deleteUselessPanelInstances(String workspaceId) throws Exception
Exception
public void removeInstance(PanelInstance instance) throws Exception
Exception
Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.