Copyright© 2008-2026 Sitevision AB, all rights reserved.
O - script object@Requireable(value="RestAppInvokerFactory") public interface RestAppInvokerFactory<O>
Below is an example of how to get a RestAppInvoker instance using the path (of the headless custom module).
var restAppInvokerFactory = require('RestAppInvokerFactory'),
restAppInvoker = restAppInvokerFactory.fromPath('/rest-api/my-rest-app');
if (restAppInvoker) {
// Use the RESTApp invoker...
}
Below is an example of how to get a RestAppInvoker instance using a Node. Note that the Node must be of type
sv:restApp, sv:headlessCustomModule or sv:marketplaceHeadlessCustomModule.
var restAppInvokerFactory = require('RestAppInvokerFactory'),
restAppInvoker = restAppInvokerFactory.fromNode(aNode);
if (restAppInvoker) {
// Use the RESTApp invoker...
}
Below is an example of how to get a RestAppInvoker instance using a Node identifier. Note that the identifier must be for a Node of type
sv:restApp, sv:headlessCustomModule or sv:marketplaceHeadlessCustomModule
(i.e. an identifier prefixed "361.", "188." or "211.").
var restAppInvokerFactory = require('RestAppInvokerFactory'),
restAppInvoker = restAppInvokerFactory.fromIdentifier(aIdentifier);
if (restAppInvoker) {
// Use the RESTApp invoker...
}
See RestAppInvoker for more code examples.
RestAppInvoker| Modifier and Type | Method and Description |
|---|---|
RestAppInvoker<O> |
fromIdentifier(String aIdentifier)
Creates a RestAppInvoker via the Identifier of a RESTApp or a Headless custom module.
|
RestAppInvoker<O> |
fromNode(Node aNode)
Creates a RestAppInvoker via a RESTApp Node or a Headless custom module Node.
|
RestAppInvoker<O> |
fromPath(String aPath)
Creates a RestAppInvoker via the Path of a Headless custom module.
|
RestAppInvoker<O> fromPath(String aPath)
aPath - the path of the Headless custom module (sv:headlessCustomModule or sv:marketplaceHeadlessCustomModule)RestAppInvoker<O> fromNode(Node aNode)
aNode - the RESTApp (sv:restApp) or the Headless custom module (sv:headlessCustomModule or sv:marketplaceHeadlessCustomModule)RestAppInvoker<O> fromIdentifier(String aIdentifier)
aIdentifier - the identifier of the RESTApp (sv:restApp) or the Headless custom module
(sv:headlessCustomModule or sv:marketplaceHeadlessCustomModule), i.e. an identifier
prefixed with "361.", "188." or "211.".Sitevision - Content Management Made Easy
Sitevision is an advanced Java enterprise portal product that implements Java Content Repository (JSR 283).
Copyright© 2008-2026 Sitevision AB, all rights reserved.