Copyright© 2008-2024 Sitevision AB, all rights reserved.
O
- script objectpublic interface VersionedRestApi<O>
Version note!
This is an exotic sibling interface to RestApi
that can be used to invoke the local Sitevision REST API
in a specific version - regardless of what version your code are currently executing in.
If you don't know what a version is or haven't thought much about it, you would typically use RestApi
that invokes the local REST API in current version
.
This utility can be used regardless of the REST API of the local site is enabled or not!
Performance note! RestApi
will always outperform VersionedRestApi
when executing
in the same version! Note that the method contracts of the interfaces differs. RestApi operates on Node objects and VersionedRestApi
operates on Strings (i.e. Node identifiers).
An instance of the Sitevision class implementing this interface can be obtained via
RestApiFactory.getOfflineRestApi()
or
RestApiFactory.getOnlineRestApi()
.
See RestApiFactory
for how to obtain an instance of the RestApiFactory
interface.
RestApi
,
RestApiFactory
Modifier and Type | Method and Description |
---|---|
O |
delete(String aContextNodeIdentifier,
String aOperationName)
Executes a DELETE endpoint of the REST API.
|
O |
delete(String aContextNodeIdentifier,
String aOperationName,
String aOperationNodeIdentifier)
Executes a DELETE endpoint of the REST API, targeting an instance of the context.
|
O |
delete(String aContextNodeIdentifier,
String aOperationName,
String aOperationNodeIdentifier,
O aOperationOptions)
Executes a DELETE endpoint of the REST API, targeting an instance of the context.
|
O |
get(String aContextNodeIdentifier,
String aOperationName)
Executes a GET endpoint of the REST API.
|
O |
get(String aContextNodeIdentifier,
String aOperationName,
O aOperationOptions)
Executes a GET endpoint of the REST API.
|
O |
get(String aContextNodeIdentifier,
String aOperationName,
String aOperationNodeIdentifier,
O aOperationOptions)
Executes a GET endpoint of the REST API, targeting an instance of the context.
|
int |
getVersion()
Get the version that is used by this instance.
|
O |
post(String aContextNodeIdentifier,
String aOperationName,
O aOperationOptions)
Executes a POST endpoint of the REST API.
|
O |
put(String aContextNodeIdentifier,
String aOperationName,
O aOperationOptions)
Executes a PUT endpoint of the REST API.
|
O |
put(String aContextNodeIdentifier,
String aOperationName,
String aOperationNodeIdentifier,
O aOperationOptions)
Executes a PUT endpoint of the REST API
Delegates execution to
RestApi.put(Node,String,Node,Options)
in the version specified by this instance. |
int getVersion()
O get(String aContextNodeIdentifier, String aOperationName)
Delegates execution to RestApi.get(Node,String)
in the version
specified by this instance.
aContextNodeIdentifier
- the identifier
for the endpoint context Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationName
- the endpoint operation name/methodRestApi.get(Node,String)
invocationNullPointerException
- if aContextNodeIdentifier or aOperationName is nullIllegalArgumentException
- if aContextNodeIdentifier or aOperationName is empty or blankO get(String aContextNodeIdentifier, String aOperationName, O aOperationOptions)
Delegates execution to RestApi.get(Node,String,Options)
in the version
specified by this instance.
aContextNodeIdentifier
- the identifier
for the endpoint context Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationName
- the endpoint operation name/methodaOperationOptions
- the operation data/parametersRestApi.get(Node,String,Options)
invocationNullPointerException
- if aContextNodeIdentifier or aOperationName is nullIllegalArgumentException
- if aContextNodeIdentifier or aOperationName is empty or blankO get(String aContextNodeIdentifier, String aOperationName, String aOperationNodeIdentifier, O aOperationOptions)
Delegates execution to RestApi.get(Node,String,Node,Options)
in the version
specified by this instance.
aContextNodeIdentifier
- the identifier
for the endpoint context Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationName
- the endpoint operation name/methodaOperationNodeIdentifier
- the identifier
for the endpoint operation Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationOptions
- the operation data/parametersRestApi.get(Node,String,Node,Options)
invocationNullPointerException
- if aContextNodeIdentifier, aOperationName or aOperationNodeIdentifier is nullIllegalArgumentException
- if aContextNodeIdentifier, aOperationName or aOperationNodeIdentifier is empty or blankO post(String aContextNodeIdentifier, String aOperationName, O aOperationOptions)
Delegates execution to RestApi.post(Node,String,Options)
in the version
specified by this instance.
aContextNodeIdentifier
- the identifier
for the endpoint context Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationName
- the endpoint operation name/methodaOperationOptions
- the operation data/parametersRestApi.post(Node,String,Options)
invocationNullPointerException
- if aContextNodeIdentifier or aOperationName is nullIllegalArgumentException
- if aContextNodeIdentifier or aOperationName is empty or blankO put(String aContextNodeIdentifier, String aOperationName, O aOperationOptions)
Delegates execution to RestApi.put(Node,String,Options)
in the version
specified by this instance.
aContextNodeIdentifier
- the identifier
for the endpoint context Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationName
- the endpoint operation name/methodaOperationOptions
- the operation data/parametersRestApi.put(Node,String,Options)
invocationNullPointerException
- if aContextNodeIdentifier or aOperationName is nullIllegalArgumentException
- if aContextNodeIdentifier or aOperationName is empty or blankO put(String aContextNodeIdentifier, String aOperationName, String aOperationNodeIdentifier, O aOperationOptions)
Delegates execution to RestApi.put(Node,String,Node,Options)
in the version
specified by this instance.
aContextNodeIdentifier
- the identifier
for the endpoint context Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationName
- the endpoint operation name/methodaOperationNodeIdentifier
- the identifier
for the endpoint operation Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationOptions
- the operation data/parametersRestApi.put(Node,String,Node,Options)
invocationNullPointerException
- if aContextNodeIdentifier, aOperationName or aOperationNodeIdentifier is nullIllegalArgumentException
- if aContextNodeIdentifier, aOperationName or aOperationNodeIdentifier is empty or blankO delete(String aContextNodeIdentifier, String aOperationName)
Delegates execution to RestApi.delete(Node,String)
in the version
specified by this instance.
aContextNodeIdentifier
- the identifier
for the endpoint context Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationName
- the endpoint operation name/methodRestApi.delete(Node,String)
invocationNullPointerException
- if aContextNodeIdentifier or aOperationName is nullIllegalArgumentException
- if aContextNodeIdentifier or aOperationName is empty or blankO delete(String aContextNodeIdentifier, String aOperationName, String aOperationNodeIdentifier)
Delegates execution to RestApi.delete(Node,String,Node)
in the version
specified by this instance.
aContextNodeIdentifier
- the identifier
for the endpoint context Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationName
- the endpoint operation name/methodaOperationNodeIdentifier
- the identifier
for the endpoint operation Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.RestApi.delete(Node,String,Node)
invocationNullPointerException
- if aContextNodeIdentifier, aOperationName or aOperationNodeIdentifier is nullIllegalArgumentException
- if aContextNodeIdentifier, aOperationName or aOperationNodeIdentifier is empty or blankO delete(String aContextNodeIdentifier, String aOperationName, String aOperationNodeIdentifier, O aOperationOptions)
Delegates execution to RestApi.delete(Node,String,Node,Options)
in the version
specified by this instance.
aContextNodeIdentifier
- the identifier
for the endpoint context Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationName
- the endpoint operation name/methodaOperationNodeIdentifier
- the identifier
for the endpoint operation Node.
Note that there is no guarantee that such a Node exists in the version specified by this instance.aOperationOptions
- the operation data/parametersRestApi.delete(Node,String,Node,Options)
invocationNullPointerException
- if aContextNodeIdentifier, aOperationName or aOperationNodeIdentifier is nullIllegalArgumentException
- if aContextNodeIdentifier, aOperationName or aOperationNodeIdentifier is empty or blankSitevision - Portal and Content Management Made Easy
Sitevision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2024 Sitevision AB, all rights reserved.