Interface NodeResource
-
@Path("node") public interface NodeResource
Resource for handling Nodes in GCN
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description GenericResponse
activateFeature(String nodeId, NodeFeature feature)
Activate the feature for the nodeGenericResponse
activateFeatures(String nodeId, NodeFeatureRequest request)
Deprecated.NodeLoadResponse
add(NodeSaveRequest request)
Create a new node.GenericResponse
addConstruct(String nodeId, String constructId)
Add a construct to a node.GenericResponse
addLanguage(String nodeId, String languageId)
Add language to nodeGenericResponse
addObjectProperty(String nodeId, String opId)
Add an object property to a node.GenericResponse
addTemplate(String nodeId, String templateId)
Add a template to a node.FeatureModelList
availableFeatures(FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging)
Get list of available node features.
The result can be filtered byid
name
description
and sorted byid
name
description
LanguageList
availableLanguages(String nodeId, FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging)
Get list of languages, which can be assigned to the node.
The result can be filtered byid
globalId
name
code
and sorted byid
globalId
name
code
GenericResponse
copy(String nodeId, long waitMs, NodeCopyRequest request)
Copy the given node.NodeLoadResponse
create(NodeSaveRequest request)
Deprecated.GenericResponse
deactivateFeature(String nodeId, NodeFeature feature)
Deactivate the feature for the nodeGenericResponse
deactivateFeatures(String nodeId, NodeFeatureRequest request)
Deprecated.GenericResponse
delete(String nodeId, long waitMs)
Delete the given nodeFeatureList
features(String nodeId, FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging)
Get list of features activated for the node.
The result can be filtered byname
and sorted byname
NodeLoadResponse
get(String nodeId, boolean update)
Load a single nodePagedConstructListResponse
getConstructs(String nodeId, FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms)
Get the constructs assigned to this node.
The result can be filtered bykeyword
name
description
and sorted byid
globalId
keyword
name
description
NodeFeatureResponse
getFeatures(String nodeId)
Deprecated.PagedObjectPropertyListResponse
getObjectProperties(String nodeId, FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms)
Get the object properties assigned to this node.
The result can be filtered bykeyword
name
description
and sorted bykeyword
name
description
TemplateLoadResponse
getTemplate(String nodeId, String templateId)
Get the template, if it is assigned to the nodePagedTemplateListResponse
getTemplates(String nodeId, FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms)
Get the templates assigned to this node.LanguageListResponse
languages(String nodeId)
Deprecated.LanguageList
languages(String nodeId, FilterParameterBean filter, PagingParameterBean paging)
Get list of languages in the node.NodeList
list(FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, PermsParameterBean perms, String stagingPackageName)
List nodes.
The result can be filtered byid
name
and sorted byid
name
NodeLoadResponse
load(String nodeId, boolean update)
Deprecated.GenericResponse
removeConstruct(String nodeId, String constructId)
Remove a construct from a node.GenericResponse
removeLanguage(String nodeId, String languageId)
Remove language from nodeGenericResponse
removeObjectProperty(String nodeId, String opId)
Remove an object property from a node.GenericResponse
removeTemplate(String nodeId, String templateId)
Remove a template from a node.GenericResponse
save(String nodeId, NodeSaveRequest request)
Deprecated.GenericResponse
setFeatures(String nodeId, NodeFeatureRequest request)
Deprecated.LanguageList
setLanguages(String nodeId, List<ContentLanguage> languages)
Set ordered list of languagesNodeSettingsResponse
settings(String nodeId)
Load settings specific to the specified node.GenericResponse
update(String nodeId, NodeSaveRequest request)
Saves the values specified in the request to the node.
-
-
-
Method Detail
-
add
@PUT @Path("/") NodeLoadResponse add(NodeSaveRequest request) throws Exception
Create a new node. SeeNodeResourceImpl#checkCreateRequest
for a detailed list of constraints on the given request. In short:- the node and hostname must be provided
- no other node with the same hostname and (binary) publish directory may exist
- if the Aloha editor is to be used, utf8 must be enabled
- Parameters:
request
- The request containing a REST model of the node to be created.- Returns:
- A node load response containing the values of the newly created node on success, or a response code indicating any errors on failure.
- Throws:
Exception
-
get
@GET @Path("/{id}") NodeLoadResponse get(@PathParam("id") String nodeId, @DefaultValue("false") @QueryParam("update") boolean update) throws Exception
Load a single node- Parameters:
nodeId
- id of the node to load. This can be either the localid or a globalidupdate
- true when the folder is fetched for updating. Currently, nodes cannot be locked in the backend, but it is still recommended to set this parameter to true when the node shall be modified.- Returns:
- response containing the node to load
- Throws:
Exception
-
update
@POST @Path("/{id}") GenericResponse update(@PathParam("id") String nodeId, NodeSaveRequest request) throws Exception
Saves the values specified in the request to the node. SeeNodeResourceImpl#checkRequestConsistency
for a detailed list of constraints on the request. In short:- any folder id that is given must be valid
- no other node with the same hostname and (binary) publish directory may exist
- if the Aloha editor is to be used, utf8 must be enabled
- Parameters:
id
- The id of the node to save.request
- The request containing the fields to be updated in the node.- Returns:
- A generic response indicating the success or failure of the operation.
- Throws:
Exception
-
delete
@DELETE @Path("/{id}") GenericResponse delete(@PathParam("id") String nodeId, @QueryParam("wait") @DefaultValue("0") long waitMs) throws Exception
Delete the given node- Parameters:
nodeId
- id of the nodewaitMs
- wait timeout in milliseconds- Returns:
- response
- Throws:
Exception
-
list
@GET NodeList list(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms, @QueryParam("package") String stagingPackageName) throws Exception
List nodes.
The result can be filtered byid
name
id
name
- Parameters:
filter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- perms parametersstagingPackageName
- if given, check the node status against the staging package- Returns:
- node list
- Throws:
Exception
- in case of errors
-
languages
@GET @Path("/{id}/languages") LanguageList languages(@PathParam("id") String nodeId, @BeanParam FilterParameterBean filter, @BeanParam PagingParameterBean paging) throws Exception
Get list of languages in the node. The result can be filtered byid
globalId
name
code
- Parameters:
nodeId
- node idfilter
- filter parameterspaging
- paging parameters- Returns:
- ordered list of languages
- Throws:
Exception
-
availableLanguages
@GET @Path("/{id}/availableLanguages") LanguageList availableLanguages(@PathParam("id") String nodeId, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging) throws Exception
Get list of languages, which can be assigned to the node.
The result can be filtered byid
globalId
name
code
id
globalId
name
code
- Parameters:
nodeId
- node idfilter
- filter parameterssorting
- sorting parameterspaging
- paging parameters- Returns:
- list of available languages
- Throws:
Exception
-
addLanguage
@PUT @Path("/{id}/languages/{languageId}") GenericResponse addLanguage(@PathParam("id") String nodeId, @PathParam("languageId") String languageId) throws Exception
Add language to node- Parameters:
nodeId
- node idlanguageId
- language id or language code- Returns:
- response
- Throws:
Exception
-
removeLanguage
@DELETE @Path("/{id}/languages/{languageId}") GenericResponse removeLanguage(@PathParam("id") String nodeId, @PathParam("languageId") String languageId) throws Exception
Remove language from node- Parameters:
nodeId
- node idlanguageId
- language id or language code- Returns:
- response
- Throws:
Exception
-
setLanguages
@POST @Path("/{id}/languages") LanguageList setLanguages(@PathParam("id") String nodeId, List<ContentLanguage> languages) throws Exception
Set ordered list of languages- Parameters:
nodeId
- node idlanguages
- ordered list of languages- Returns:
- response
- Throws:
Exception
-
create
@POST @Path("/create") @Deprecated NodeLoadResponse create(NodeSaveRequest request) throws Exception
Deprecated.Create a new node. SeeNodeResourceImpl#checkCreateRequest
for a detailed list of constraints on the given request. In short:- the node and hostname must be provided
- no other node with the same hostname and (binary) publish directory may exist
- if the Aloha editor is to be used, utf8 must be enabled
- Parameters:
request
- The request containing a REST model of the node to be created.- Returns:
- A node load response containing the values of the newly created node on success, or a response code indicating any errors on failure.
- Throws:
Exception
-
save
@POST @Path("/save/{id}") @Deprecated GenericResponse save(@PathParam("id") String nodeId, NodeSaveRequest request) throws Exception
Deprecated.Saves the values specified in the request to the node. SeeNodeResourceImpl#checkRequestConsistency
for a detailed list of constraints on the request. In short:- any folder id that is given must be valid
- no other node with the same hostname and (binary) publish directory may exist
- if the Aloha editor is to be used, utf8 must be enabled
- Parameters:
id
- The id of the node to save.request
- The request containing the fields to be updated in the node.- Returns:
- A generic response indicating the success or failure of the operation.
- Throws:
Exception
-
load
@GET @Path("/load/{id}") @Deprecated NodeLoadResponse load(@PathParam("id") String nodeId, @DefaultValue("false") @QueryParam("update") boolean update) throws Exception
Deprecated.Load a single node- Parameters:
nodeId
- id of the node to load. This can be either the localid or a globalidupdate
- true when the folder is fetched for updating. Currently, nodes cannot be locked in the backend, but it is still recommended to set this parameter to true when the node shall be modified.- Returns:
- response containing the node to load
- Throws:
Exception
-
languages
@GET @Path("/getLanguages/{id}") @Deprecated LanguageListResponse languages(@PathParam("id") String nodeId) throws Exception
Deprecated.Get the ordered list of languages of the node- Parameters:
nodeId
- node id- Returns:
- ordered list of languages
- Throws:
Exception
-
features
@GET @Path("/{id}/features") FeatureList features(@PathParam("id") String nodeId, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging) throws Exception
Get list of features activated for the node.
The result can be filtered byname
name
- Parameters:
nodeId
- node IDfilter
- filter parameterssorting
- sorting parameterspaging
- paging parameters- Returns:
- list of activated features
- Throws:
Exception
-
activateFeature
@PUT @Path("/{id}/features/{feature}") GenericResponse activateFeature(@PathParam("id") String nodeId, @PathParam("feature") NodeFeature feature) throws Exception
Activate the feature for the node- Parameters:
nodeId
- node IDfeature
- feature to activate- Returns:
- response
- Throws:
Exception
-
deactivateFeature
@DELETE @Path("/{id}/features/{feature}") GenericResponse deactivateFeature(@PathParam("id") String nodeId, @PathParam("feature") NodeFeature feature) throws Exception
Deactivate the feature for the node- Parameters:
nodeId
- node IDfeature
- feature to activate- Returns:
- response
- Throws:
Exception
-
getFeatures
@GET @Path("/features/{id}") @Deprecated NodeFeatureResponse getFeatures(@PathParam("id") String nodeId) throws Exception
Deprecated.Load the activated features- Parameters:
nodeId
- id of the node- Returns:
- response containing the activated features
- Throws:
Exception
-
activateFeatures
@POST @Path("/features/activate/{id}") @Deprecated GenericResponse activateFeatures(@PathParam("id") String nodeId, NodeFeatureRequest request) throws Exception
Deprecated.Activate the given list of features (features not listed will not be changed)- Parameters:
nodeId
- id of the node. This can be either the localid or the globalid- Returns:
- generic response
- Throws:
Exception
-
deactivateFeatures
@POST @Path("/features/deactivate/{id}") @Deprecated GenericResponse deactivateFeatures(@PathParam("id") String nodeId, NodeFeatureRequest request) throws Exception
Deprecated.Deactivate the given list of features (features not listed will not be changed)- Parameters:
nodeId
- id of the node. This can be either the localid or the globalid- Returns:
- generic response
- Throws:
Exception
-
setFeatures
@POST @Path("/features/set/{id}") @Deprecated GenericResponse setFeatures(@PathParam("id") String nodeId, NodeFeatureRequest request) throws Exception
Deprecated.Set the given list of features. Exactly the listed features will be activated, all other will be deactivated- Parameters:
nodeId
- id of the node. This can be either the localid or the globalid- Returns:
- generic response
- Throws:
Exception
-
getTemplates
@GET @Path("/{nodeId}/templates") PagedTemplateListResponse getTemplates(@PathParam("nodeId") String nodeId, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
Get the templates assigned to this node. The result can be filtered byname
description
name
description
- Parameters:
nodeId
- Node ID (local or global)filter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- permissions parameters- Returns:
- Response containing the templates assigned to this node
- Throws:
Exception
-
getTemplate
@GET @Path("/{nodeId}/templates/{templateId}") TemplateLoadResponse getTemplate(@PathParam("nodeId") String nodeId, @PathParam("templateId") String templateId) throws Exception
Get the template, if it is assigned to the node- Parameters:
nodeId
- Node ID (local or global)templateId
- Template ID (local or global)- Returns:
- template load response
- Throws:
Exception
-
addTemplate
@PUT @Path("/{nodeId}/templates/{templateId}") GenericResponse addTemplate(@PathParam("nodeId") String nodeId, @PathParam("templateId") String templateId) throws Exception
Add a template to a node. This will just assign the template to the node, but not link it to any folders.- Parameters:
nodeId
- Node ID (local or global)templateId
- Template ID (local or global)- Returns:
- Generic response
- Throws:
Exception
-
removeTemplate
@DELETE @Path("/{nodeId}/templates/{templateId}") GenericResponse removeTemplate(@PathParam("nodeId") String nodeId, @PathParam("templateId") String templateId) throws Exception
Remove a template from a node. This will also unlink the template from all folders of the node- Parameters:
nodeId
- Node ID (local or global)templateId
- Template ID (local or global)- Returns:
- Generic response
- Throws:
Exception
-
getConstructs
@GET @Path("/{nodeId}/constructs") PagedConstructListResponse getConstructs(@PathParam("nodeId") String nodeId, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
Get the constructs assigned to this node.
The result can be filtered bykeyword
name
description
id
globalId
keyword
name
description
- Parameters:
nodeId
- Node ID (local or global)filter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- permissions parameters- Returns:
- Response containing the constructs assigned to this node
- Throws:
Exception
-
addConstruct
@PUT @Path("/{nodeId}/constructs/{constructId}") GenericResponse addConstruct(@PathParam("nodeId") String nodeId, @PathParam("constructId") String constructId) throws Exception
Add a construct to a node.- Parameters:
nodeId
- Node ID (local or global)constructId
- Construct ID (local or global)- Returns:
- Generic response
- Throws:
Exception
-
removeConstruct
@DELETE @Path("/{nodeId}/constructs/{constructId}") GenericResponse removeConstruct(@PathParam("nodeId") String nodeId, @PathParam("constructId") String constructId) throws Exception
Remove a construct from a node.- Parameters:
nodeId
- Node ID (local or global)constructId
- Construct ID (local or global)- Returns:
- Generic response
- Throws:
Exception
-
getObjectProperties
@GET @Path("/{nodeId}/objectproperties") PagedObjectPropertyListResponse getObjectProperties(@PathParam("nodeId") String nodeId, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
Get the object properties assigned to this node.
The result can be filtered bykeyword
name
description
keyword
name
description
- Parameters:
nodeId
- Node ID (local or global)filter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- permissions parameters- Returns:
- Response containing the object properties assigned to this node
- Throws:
Exception
-
addObjectProperty
@PUT @Path("/{nodeId}/objectproperties/{objectPropertyId}") GenericResponse addObjectProperty(@PathParam("nodeId") String nodeId, @PathParam("objectPropertyId") String opId) throws Exception
Add an object property to a node.- Parameters:
nodeId
- Node ID (local or global)objectPropertyId
- Property ID- Returns:
- Generic response
- Throws:
Exception
-
removeObjectProperty
@DELETE @Path("/{nodeId}/objectproperties/{objectPropertyId}") GenericResponse removeObjectProperty(@PathParam("nodeId") String nodeId, @PathParam("objectPropertyId") String opId) throws Exception
Remove an object property from a node.- Parameters:
nodeId
- Node ID (local or global)opId
- Construct ID (local or global)- Returns:
- Generic response
- Throws:
Exception
-
settings
@GET @Path("/{nodeId}/settings") NodeSettingsResponse settings(@PathParam("nodeId") String nodeId) throws Exception
Load settings specific to the specified node. To get the settings in$NODE_SETTINGS_GLOBAL
are loaded and then the values from$NODE_SETTINGS[nodeId]
are added.- Parameters:
nodeId
- Node ID (local or global)- Returns:
- The conigured settings for this node in JSON format
- Throws:
Exception
- On errors
-
availableFeatures
@GET @Path("/features") FeatureModelList availableFeatures(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging) throws Exception
Get list of available node features.
The result can be filtered byid
name
description
id
name
description
- Parameters:
filter
- filter parameterssorting
- sorting parameterspaging
- paging parameters- Returns:
- list response
- Throws:
Exception
-
copy
@POST @Path("/{nodeId}/copy") GenericResponse copy(@PathParam("nodeId") String nodeId, @QueryParam("wait") @DefaultValue("0") long waitMs, NodeCopyRequest request) throws Exception
Copy the given node.- Parameters:
nodeId
- node IDwaitMs
- wait timeout in millisecondsrequest
- copy request- Returns:
- response
- Throws:
Exception
-
-