Interface HoldService

  • All Known Implementing Classes:
    HoldServiceImpl

    @AlfrescoPublicApi
    public interface HoldService
    Hold service interface.
    Since:
    2.2
    Author:
    Tuna Aksoy
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addToHold​(org.alfresco.service.cmr.repository.NodeRef hold, List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
      Adds the items to the the given hold
      void addToHold​(org.alfresco.service.cmr.repository.NodeRef hold, org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Adds the item to the given hold
      void addToHolds​(List<org.alfresco.service.cmr.repository.NodeRef> holds, List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
      Adds the given items to the given list of holds
      void addToHolds​(List<org.alfresco.service.cmr.repository.NodeRef> holds, org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Adds the item to the given list of holds
      org.alfresco.service.cmr.repository.NodeRef createHold​(org.alfresco.service.cmr.repository.NodeRef filePlan, String name, String reason, String description)
      Creates a hold with the given name, reason and description for the given file plan
      void deleteHold​(org.alfresco.service.cmr.repository.NodeRef hold)
      Deletes the hold
      List<org.alfresco.service.cmr.repository.NodeRef> getHeld​(org.alfresco.service.cmr.repository.NodeRef hold)
      Gets the list of item node references which are in the given hold
      org.alfresco.service.cmr.repository.NodeRef getHold​(org.alfresco.service.cmr.repository.NodeRef filePlan, String name)
      Gets the node reference for the hold with the given name in the given file plan
      String getHoldReason​(org.alfresco.service.cmr.repository.NodeRef hold)
      Gets the hold reason for the given hold node reference
      List<org.alfresco.service.cmr.repository.NodeRef> getHolds​(org.alfresco.service.cmr.repository.NodeRef filePlan)
      Gets the list of all the holds within the holds container in the given file plan
      List<org.alfresco.service.cmr.repository.NodeRef> heldBy​(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean includedInHold)
      Gets the list of all the holds within the holds container for the given node reference
      boolean isHold​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Indicates whether the passed node reference is a hold.
      void removeFromAllHolds​(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
      Removes the given list of NodeRefs from all the holds
      void removeFromAllHolds​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Removes the given NodeRef from all the holds
      void removeFromHold​(org.alfresco.service.cmr.repository.NodeRef hold, List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
      Removes the given items from the given hold
      void removeFromHold​(org.alfresco.service.cmr.repository.NodeRef hold, org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Removes the record from the given hold
      void removeFromHolds​(List<org.alfresco.service.cmr.repository.NodeRef> holds, List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
      Removes the items from the given holds
      void removeFromHolds​(List<org.alfresco.service.cmr.repository.NodeRef> holds, org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Removes the item from the given list of hold
      void setHoldReason​(org.alfresco.service.cmr.repository.NodeRef hold, String reason)
      Sets the hold reason
    • Method Detail

      • isHold

        boolean isHold​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Indicates whether the passed node reference is a hold. A hold is a container for a group of frozen object and contains the freeze reason.
        Parameters:
        nodeRef - hold node reference
        Returns:
        boolean true if hold, false otherwise
      • getHolds

        List<org.alfresco.service.cmr.repository.NodeRef> getHolds​(org.alfresco.service.cmr.repository.NodeRef filePlan)
        Gets the list of all the holds within the holds container in the given file plan
        Parameters:
        filePlan - The NodeRef of the file plan
        Returns:
        List of hold node references
      • getHold

        org.alfresco.service.cmr.repository.NodeRef getHold​(org.alfresco.service.cmr.repository.NodeRef filePlan,
                                                            String name)
        Gets the node reference for the hold with the given name in the given file plan
        Parameters:
        name - String The name of the hold
        Returns:
        NodeRef of the hold with the given name
      • heldBy

        List<org.alfresco.service.cmr.repository.NodeRef> heldBy​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                                                 boolean includedInHold)
        Gets the list of all the holds within the holds container for the given node reference
        Parameters:
        nodeRef - The NodeRef of the record / record folder /active content
        includedInHold - true to retrieve the list of hold node references which will include the node reference false to get a list of node references which will not have the given node reference
        Returns:
        List of hold node references
      • getHeld

        List<org.alfresco.service.cmr.repository.NodeRef> getHeld​(org.alfresco.service.cmr.repository.NodeRef hold)
        Gets the list of item node references which are in the given hold
        Parameters:
        hold - NodeRef of the hold
        Returns:
        Lost of item NodeRefs which are in the given hold
      • createHold

        org.alfresco.service.cmr.repository.NodeRef createHold​(org.alfresco.service.cmr.repository.NodeRef filePlan,
                                                               String name,
                                                               String reason,
                                                               String description)
        Creates a hold with the given name, reason and description for the given file plan
        Parameters:
        filePlan - The NodeRef of the file plan
        name - String The name of the hold
        reason - String The reason of the hold
        description - String The description of the hold
        Returns:
        The NodeRef of the created hold
      • getHoldReason

        String getHoldReason​(org.alfresco.service.cmr.repository.NodeRef hold)
        Gets the hold reason for the given hold node reference
        Parameters:
        hold - The NodeRef of the hold
        Returns:
        String The reason of the hold
      • setHoldReason

        void setHoldReason​(org.alfresco.service.cmr.repository.NodeRef hold,
                           String reason)
        Sets the hold reason
        Parameters:
        hold - The NodeRef of the hold
        reason - String The reason for the hold
      • deleteHold

        void deleteHold​(org.alfresco.service.cmr.repository.NodeRef hold)
        Deletes the hold
        Parameters:
        hold - The NodeRef of the hold
      • addToHold

        void addToHold​(org.alfresco.service.cmr.repository.NodeRef hold,
                       org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Adds the item to the given hold
        Parameters:
        hold - The NodeRef of the hold
        nodeRef - The NodeRef of the record / record folder / active content which will be added to the given hold
      • addToHold

        void addToHold​(org.alfresco.service.cmr.repository.NodeRef hold,
                       List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
        Adds the items to the the given hold
        Parameters:
        hold - The NodeRef of the hold to which the items will be added
        nodeRefs - The item NodeRefs which will be added to the hold
      • addToHolds

        void addToHolds​(List<org.alfresco.service.cmr.repository.NodeRef> holds,
                        org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Adds the item to the given list of holds
        Parameters:
        holds - The list of NodeRefs of the holds
        nodeRef - The NodeRef of the record / record folder / active content which will be added to the given holds
      • addToHolds

        void addToHolds​(List<org.alfresco.service.cmr.repository.NodeRef> holds,
                        List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
        Adds the given items to the given list of holds
        Parameters:
        holds - List of holds to which the given items will be added
        nodeRefs - The list of items which will be added to the given holds
      • removeFromHold

        void removeFromHold​(org.alfresco.service.cmr.repository.NodeRef hold,
                            org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Removes the record from the given hold
        Parameters:
        hold - The NodeRef of the hold
        nodeRef - The NodeRef of the record / record folder which will be removed from the given hold
      • removeFromHold

        void removeFromHold​(org.alfresco.service.cmr.repository.NodeRef hold,
                            List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
        Removes the given items from the given hold
        Parameters:
        hold - The hold NodeRef from which the given items will be removed
        nodeRefs - The list of items which will be removed from the given holds
      • removeFromHolds

        void removeFromHolds​(List<org.alfresco.service.cmr.repository.NodeRef> holds,
                             org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Removes the item from the given list of hold
        Parameters:
        holds - The list NodeRefs of the holds
        nodeRef - The NodeRef of the record / record folder which will be removed from the given holds
      • removeFromHolds

        void removeFromHolds​(List<org.alfresco.service.cmr.repository.NodeRef> holds,
                             List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
        Removes the items from the given holds
        Parameters:
        holds - List of hold NodeRefs from which the items will be removed
        nodeRefs - List of item NodeRefs which will be removed from the given holds
      • removeFromAllHolds

        void removeFromAllHolds​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Removes the given NodeRef from all the holds
        Parameters:
        nodeRef - The NodeRef of item which will be removed from all the holds
      • removeFromAllHolds

        void removeFromAllHolds​(List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
        Removes the given list of NodeRefs from all the holds
        Parameters:
        nodeRefs - The list of item NodeRefs which will be removed from all the holds