Database Reference
In-Depth Information
All Nodes are Equal
Whenaplugintargetsanode,ittargetsallnodes.Eveniflogicallyyouhavedifferenttypes
of nodes defined within your database, such as user nodes and movie nodes, Neo4j will
make this server plugin available on all nodes. Care should be taken to define server plu-
gins that can be used across all nodes, or for some mechanism to be in place to ensure it
gets executed on only the appropriate types of nodes.
Extendingthe ServerPlugin class willensurethatthisclassispickedupasaserv-
er option when the server starts. For each extension point required, a method should be
createdthatspecifies(viathe @PluginTarget annotation )whatthediscoverypoint
type is. This will be one of Node , Relationship , or GraphDatabaseService .
Combinedwiththe @Name annotation ,thiswilldeterminewhereandunderwhatname
the additional REST endpoints are exposed in the overall REST API. A corresponding ref-
erence to the Node , Relationship , or GraphDatabaseService argument in the
method itself will also be required so that this reference can be used to perform any
functionality or logic that may be required.
The following listing shows how you could make an HTTP request to get the details for
node 0 (Adam), as well as a portion of the resulting response, including a listing of what
extensions are available.
Search WWH ::




Custom Search