Interface NodeResource


@Path("node") public interface NodeResource
Resource for handling Nodes in GCN
  • Method Details

    • add

      @PUT @Path("/") NodeLoadResponse add(NodeSaveRequest request) throws Exception
      Create a new node. See NodeResourceImpl#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 globalid
      update - 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. See NodeResourceImpl#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 node
      waitMs - 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 by
      • id
      • name
      and sorted by
      • id
      • name
      Parameters:
      filter - filter parameters
      sorting - sorting parameters
      paging - paging parameters
      perms - perms parameters
      stagingPackageName - 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 by
      • id
      • globalId
      • name
      • code
      Parameters:
      nodeId - node id
      filter - filter parameters
      paging - 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 by
      • id
      • globalId
      • name
      • code
      and sorted by
      • id
      • globalId
      • name
      • code
      Parameters:
      nodeId - node id
      filter - filter parameters
      sorting - sorting parameters
      paging - 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 id
      languageId - 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 id
      languageId - 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 id
      languages - ordered list of languages
      Returns:
      response
      Throws:
      Exception
    • create

      @POST @Path("/create") @Deprecated NodeLoadResponse create(NodeSaveRequest request) throws Exception
      Deprecated.
      Create a new node. See NodeResourceImpl#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. See NodeResourceImpl#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 globalid
      update - 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 by
      • name
      and sorted by
      • name
      Parameters:
      nodeId - node ID
      filter - filter parameters
      sorting - sorting parameters
      paging - 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 ID
      feature - 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 ID
      feature - 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 by
      • name
      • description
      and sorted by
      • name
      • description
      Parameters:
      nodeId - Node ID (local or global)
      filter - filter parameters
      sorting - sorting parameters
      paging - paging parameters
      perms - 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 by
      • keyword
      • name
      • description
      and sorted by
      • id
      • globalId
      • keyword
      • name
      • description
      Parameters:
      nodeId - Node ID (local or global)
      filter - filter parameters
      sorting - sorting parameters
      paging - paging parameters
      perms - 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 by
      • keyword
      • name
      • description
      and sorted by
      • keyword
      • name
      • description
      Parameters:
      nodeId - Node ID (local or global)
      filter - filter parameters
      sorting - sorting parameters
      paging - paging parameters
      perms - 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 by
      • id
      • name
      • description
      and sorted by
      • id
      • name
      • description
      Parameters:
      filter - filter parameters
      sorting - sorting parameters
      paging - 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 ID
      waitMs - wait timeout in milliseconds
      request - copy request
      Returns:
      response
      Throws:
      Exception