@Service(value=UserContextProvider.class) @Reference(name="globalMenuItemsProvider", cardinality=OPTIONAL_MULTIPLE, policy=DYNAMIC, referenceInterface=GlobalMenuItemsProvider.class) public class ContextualMenuGenerator extends Object implements UserContextProvider
Constructor and Description |
---|
ContextualMenuGenerator() |
Modifier and Type | Method and Description |
---|---|
GraphNode |
addUserContext(GraphNode node)
Returns a
GraphNode containing user context information in
addition to the information already existing in the provided
GraphNode . |
protected void |
bindGlobalMenuItemsProvider(GlobalMenuItemsProvider provider) |
protected void |
unbindGlobalMenuItemsProvider(GlobalMenuItemsProvider provider) |
public GraphNode addUserContext(GraphNode node)
UserContextProvider
GraphNode
containing user context information in
addition to the information already existing in the provided
GraphNode
.
The information previously existing in the provided GraphNode
are not changed by this method.
The method may add the context information directly to the provided
GraphNode
or create a new GraphNode
instance,
in the latter the returned GraphNode must be modifiable.
In both cases the resulting GraphNode
is returned by the
method.addUserContext
in interface UserContextProvider
protected void bindGlobalMenuItemsProvider(GlobalMenuItemsProvider provider)
protected void unbindGlobalMenuItemsProvider(GlobalMenuItemsProvider provider)
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.