Interface DispositionService

  • All Known Implementing Classes:
    DispositionServiceImpl

    public interface DispositionService
    Disposition service interface.
    Since:
    2.0
    Author:
    Roy Wetherall
    • Method Detail

      • registerDispositionProperty

        void registerDispositionProperty​(DispositionProperty dispositionProperty)
        Register a disposition property.
        Parameters:
        dispositionProperty - disposition property
      • getDispositionProperties

        Collection<DispositionProperty> getDispositionProperties​(boolean isRecordLevel,
                                                                 String dispositionAction)
        Returns the list of disposition period properties that apply given the context provided.
        Returns:
        filtered list of disposition period properties
      • getDispositionSchedule

        DispositionSchedule getDispositionSchedule​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Get the disposition schedule for a given record management node. Traverses the hierarchy to find the first disposition schedule in the primary hierarchy.
        Parameters:
        nodeRef - node reference to record category, record folder or record
        Returns:
        DispositionSchedule disposition schedule
      • getAssociatedDispositionSchedule

        DispositionSchedule getAssociatedDispositionSchedule​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Get the disposition schedule directly associated with the node specified. Returns null if none.
        Parameters:
        nodeRef - node reference
        Returns:
        DispositionSchedule disposition schedule directly associated with the node reference, null if none
      • getAssociatedRecordsManagementContainer

        org.alfresco.service.cmr.repository.NodeRef getAssociatedRecordsManagementContainer​(DispositionSchedule dispositionSchedule)
        Gets the records management container that is directly associated with the disposition schedule.
        Parameters:
        dispositionSchedule - disposition schedule
        Returns:
        NodeRef node reference of the associated container
      • hasDisposableItems

        boolean hasDisposableItems​(DispositionSchedule dispositionSchdule)
        Indicates whether a disposition schedule has any disposable items under its management
        Parameters:
        dispositionSchdule - disposition schedule
        Returns:
        boolean true if there are disposable items being managed by, false otherwise
      • getDisposableItems

        List<org.alfresco.service.cmr.repository.NodeRef> getDisposableItems​(DispositionSchedule dispositionSchedule)
        Gets a list of all the disposable items (records, record folders) that are under the control of the disposition schedule.
        Parameters:
        dispositionSchedule - disposition schedule
        Returns:
        List <NodeRef> list of disposable items
      • isDisposableItem

        boolean isDisposableItem​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Indicates whether the node is a disposable item or not (ie is under the control of a disposition schedule)
        Parameters:
        nodeRef - node reference
        Returns:
        boolean true if node is a disposable item, false otherwise
      • createDispositionSchedule

        DispositionSchedule createDispositionSchedule​(org.alfresco.service.cmr.repository.NodeRef recordCategory,
                                                      Map<org.alfresco.service.namespace.QName,​Serializable> props)
        Creates a disposition schedule on the given record category.
        Parameters:
        recordCategory -
        props -
        Returns:
        DispositionSchedule
      • addDispositionActionDefinition

        DispositionActionDefinition addDispositionActionDefinition​(DispositionSchedule schedule,
                                                                   Map<org.alfresco.service.namespace.QName,​Serializable> actionDefinitionParams)
        Adds a new disposition action definition to the given disposition schedule.
        Parameters:
        schedule - The DispositionSchedule to add to
        actionDefinitionParams - Map of parameters to use to create the action definition
      • removeDispositionActionDefinition

        void removeDispositionActionDefinition​(DispositionSchedule schedule,
                                               DispositionActionDefinition actionDefinition)
        Removes the given disposition action definition from the given disposition schedule.
        Parameters:
        schedule - The DispositionSchedule to remove from
        actionDefinition - The DispositionActionDefinition to remove
      • updateDispositionActionDefinition

        DispositionActionDefinition updateDispositionActionDefinition​(DispositionActionDefinition actionDefinition,
                                                                      Map<org.alfresco.service.namespace.QName,​Serializable> actionDefinitionParams)
        Updates the given disposition action definition belonging to the given disposition schedule.
        Parameters:
        actionDefinition - The DispositionActionDefinition to update
        actionDefinitionParams - Map of parameters to use to update the action definition
        Returns:
        The updated DispositionActionDefinition
      • isNextDispositionActionEligible

        boolean isNextDispositionActionEligible​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Indicates whether the next disposition action is eligible or not.
        Parameters:
        nodeRef - node reference to disposable item
        Returns:
        boolean true if next disposition action is eligible, false otherwise
      • getNextDispositionAction

        DispositionAction getNextDispositionAction​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Gets the next disposition action for a given node
        Parameters:
        nodeRef - node reference to disposable item
        Returns:
        DispositionAction next disposition action, null if none
      • getCompletedDispositionActions

        List<DispositionAction> getCompletedDispositionActions​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Gets a list of all the completed disposition action in the order they occured.
        Parameters:
        nodeRef - record/record folder
        Returns:
        List list of completed disposition actions
      • getLastCompletedDispostionAction

        DispositionAction getLastCompletedDispostionAction​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Helper method to get the last completed disposition action. Returns null if there is none.
        Parameters:
        nodeRef - record/record folder
        Returns:
        DispositionAction last completed disposition action, null if none
      • isDisposableItemCutoff

        boolean isDisposableItemCutoff​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Indicates whether the disposable item (records, record folders) is cutoff or not.
        Parameters:
        nodeRef - node reference
        Returns:
        boolean true if the disposable item is cutoff, false otherwise
        Since:
        2.0
      • cutoffDisposableItem

        void cutoffDisposableItem​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Marks the disposable item (record or record folder) as cut off, calculating the cut off date
        Parameters:
        nodeRef - node reference
        Since:
        2.2
      • updateNextDispositionAction

        void updateNextDispositionAction​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Updates the next disposition action
        Parameters:
        nodeRef - node reference
      • updateNextDispositionAction

        void updateNextDispositionAction​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                         DispositionSchedule dispositionSchedule)
        Updates the next disposition action
        Parameters:
        nodeRef - node reference
        dispositionSchedule - the schedule to be applied
      • refreshDispositionAction

        void refreshDispositionAction​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Refreshes the disposition action details of the given node.
        Parameters:
        nodeRef - node reference
      • getDispositionActionDate

        Date getDispositionActionDate​(org.alfresco.service.cmr.repository.NodeRef record,
                                      org.alfresco.service.cmr.repository.NodeRef dispositionSchedule,
                                      String dispositionActionName)
        Gets date of the disposition action for the given disposition schedule with the given action name
        Parameters:
        record -
        dispositionSchedule - nodeRef
        dispositionActionName -
        Returns:
        date
      • calculateAsOfDate

        Date calculateAsOfDate​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                               DispositionActionDefinition dispositionActionDefinition)
        Compute the "disposition as of" date (if necessary) for a disposition action and a node.
        Parameters:
        nodeRef - The node which the schedule applies to.
        dispositionActionDefinition - The definition of the disposition action.
        Returns:
        The new "disposition as of" date.
      • getOriginDispositionSchedule

        DispositionSchedule getOriginDispositionSchedule​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Gets the origin disposition schedule for the record, not the calculated one in case of multiple dispositions applied to record
        Parameters:
        nodeRef - record
        Returns:
        the initial disposition
      • recalculateNextDispositionStep

        void recalculateNextDispositionStep​(org.alfresco.service.cmr.repository.NodeRef record)
        Updates disposition action step when linking or unlinking the given record to/from a record folder
        Parameters:
        record -