public class ObjectAssociationManager extends Object
Modifier and Type | Method and Description |
---|---|
void |
addObject(Graph graph,
String key,
Object obj)
Allow to associate objects with a graph to retrieve them later.
|
void |
fireUserUpdate(Graph<?,?> graph,
String oldKey,
String newKey)
Signal that a data user has been updated (removed or renamed)
|
void |
fireUserUpdate(Graph<?,?> graph,
String prefix,
String oldKey,
String newKey)
Signal that a data user has been updated (removed or renamed)
|
ServiceClassInfo[] |
getDataManagerInfo(Class graphType) |
static ObjectAssociationManager |
getInstance() |
Collection<Map.Entry<Class,List<GraphAssociatedObjectManager>>> |
getManagedClasses()
Give access to the list of classes for which object managers are registered
|
Object |
getObject(Graph graph,
String key,
boolean create)
Allow to associate objects with a graph to retrieve them later.
|
GraphAssociatedObjectManager |
getObjectManager(Class graph_class,
String key)
Give access to the Object manager in charge of the given object
|
GraphAssociatedObjectManager |
getObjectManager(String key)
Give access to the Object manager in charge of the given object
|
List<GraphAssociatedObjectManager> |
getObjectManagerList()
Give access to the list of registered object managers that are not associated with a graph class
|
List<GraphAssociatedObjectManager> |
getObjectManagerList(Class graph_class)
Give access to the list of registered object managers for the given graph class
|
void |
removeAllObjects(Graph graph)
Remove all references from associated objects
|
void |
removeObject(Graph graph,
String key)
remove an object previously associated to a graph with
addObject(Object, Object) . |
public static ObjectAssociationManager getInstance()
public void fireUserUpdate(Graph<?,?> graph, String prefix, String oldKey, String newKey)
graph
- graph to which the user was associatedprefix
- prefix to add before the IDs, can be nulloldKey
- old ID under which the user was knownnewKey
- new ID, or null if it was removedpublic void fireUserUpdate(Graph<?,?> graph, String oldKey, String newKey)
graph
- graph to which the user was associatedoldKey
- old ID under which the user was knownnewKey
- new ID, or null if it was removedpublic List<GraphAssociatedObjectManager> getObjectManagerList()
public Collection<Map.Entry<Class,List<GraphAssociatedObjectManager>>> getManagedClasses()
public List<GraphAssociatedObjectManager> getObjectManagerList(Class graph_class)
public GraphAssociatedObjectManager getObjectManager(String key)
public GraphAssociatedObjectManager getObjectManager(Class graph_class, String key)
public Object getObject(Graph graph, String key, boolean create)
addObject(key, obj)
) makes it easy.key
- create
- if true, a non-defined object will be createdaddObject(Graph, String, Object)
public void addObject(Graph graph, String key, Object obj)
key
- obj
- getObject(Graph, String, boolean)
,
removeObject(Graph, String)
public void removeObject(Graph graph, String key)
addObject(Object, Object)
.key
- getObject(Graph, String, boolean)
,
addObject(Graph, String, Object)
public void removeAllObjects(Graph graph)
graph
- public ServiceClassInfo[] getDataManagerInfo(Class graphType)
Copyright © 2005–2020. All rights reserved.