Class LinkRequest

java.lang.Object
com.gentics.contentnode.rest.model.request.LinkRequest
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MultiLinkRequest

public class LinkRequest extends Object implements Serializable
Request object for linking a template to folders or unlinking a template from folders
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Flag to delete the template(s) when unlinked from the last folder
    protected Set<String>
    Set of folder IDs (may be globalIds)
    protected Integer
    Node ID
    protected boolean
    Flag to link/unlink recursively
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create empty request
  • Method Summary

    Modifier and Type
    Method
    Description
    Set of folder IDs to handle.
    Node ID for handling channel local folders.
    boolean
    True to delete the template, if it is unlinked from the last folder.
    boolean
    True if the template shall be linked to or unlinked from the given folders recursively (including all subfolders).
    void
    setDelete(boolean delete)
    Set delete flag
    void
    setFolderIds(Set<String> folderIds)
    Set folder IDs to handle
    void
    Set the Node ID for linking to channel local folders
    void
    setRecursive(boolean recursive)
    Set whether linking shall be done recursively

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • recursive

      @DefaultValue("false") protected boolean recursive
      Flag to link/unlink recursively
    • nodeId

      protected Integer nodeId
      Node ID
    • folderIds

      protected Set<String> folderIds
      Set of folder IDs (may be globalIds)
    • delete

      @DefaultValue("false") protected boolean delete
      Flag to delete the template(s) when unlinked from the last folder
  • Constructor Details

    • LinkRequest

      public LinkRequest()
      Create empty request
  • Method Details

    • isRecursive

      public boolean isRecursive()
      True if the template shall be linked to or unlinked from the given folders recursively (including all subfolders). The default is false (not recursive)
      Returns:
      true for recursive, false if not
    • setRecursive

      public void setRecursive(boolean recursive)
      Set whether linking shall be done recursively
      Parameters:
      recursive - true for recursive, false if not
    • getFolderIds

      public Set<String> getFolderIds()
      Set of folder IDs to handle. Folder IDs may either be local or global IDs.
      Returns:
      set of folder IDs
    • setFolderIds

      public void setFolderIds(Set<String> folderIds)
      Set folder IDs to handle
      Parameters:
      folderIds - handled folder IDs
    • getNodeId

      public Integer getNodeId()
      Node ID for handling channel local folders. Note that linking templates to folders is always done for the master objects. It is not possible to have a different linking for inherited or localized templates or folders.
      Returns:
      node ID
    • setNodeId

      public void setNodeId(Integer nodeId)
      Set the Node ID for linking to channel local folders
      Parameters:
      nodeId - node ID
    • isDelete

      public boolean isDelete()
      True to delete the template, if it is unlinked from the last folder.
      Returns:
      true to delete
    • setDelete

      public void setDelete(boolean delete)
      Set delete flag
      Parameters:
      delete - delete flag