Interface FilePlanService

All Known Implementing Classes:
FilePlanServiceImpl

@AlfrescoPublicApi public interface FilePlanService
File plan service interface.
Since:
2.1
Author:
Roy Wetherall
  • Field Details

  • Method Details

    • isFilePlanComponent

      boolean isFilePlanComponent(NodeRef nodeRef)
      Indicates whether the given node is a file plan component or not.
      Parameters:
      nodeRef - node reference
      Returns:
      boolean true if a file plan component, false otherwise
    • getFilePlanComponentKind

      FilePlanComponentKind getFilePlanComponentKind(NodeRef nodeRef)
      Returns the 'kind' of file plan component the node reference is.

      Returns null if the given node reference is not a file plan component.

      Parameters:
      nodeRef - node reference
      Returns:
      FilePlanComponentKind the kind of file plan component the node is
    • getFilePlanComponentKindFromType

      FilePlanComponentKind getFilePlanComponentKindFromType(QName type)
      Returns the file plan component 'kind' that relates to the passed content type.

      Returns null if the type does not relate to a file plan component.

      Parameters:
      type - qualified name of content type
      Returns:
      FilePlanComponentKind the kind relating to the passed type
    • isFilePlan

      boolean isFilePlan(NodeRef nodeRef)
      Indicates whether the given node is file plan node or not.
      Parameters:
      nodeRef - node reference
      Returns:
      boolean true if node is a file plan node
    • getFilePlans

      Set<NodeRef> getFilePlans()
      Gets all the file plan nodes. Looks in the SpacesStore by default.
      Returns:
      Set set of file plan nodes
    • getFilePlans

      Set<NodeRef> getFilePlans(StoreRef storeRef)
      Getse all the file plan nodes in a store.
      Parameters:
      storeRef - store reference
      Returns:
      Set set of file plan nodes
    • getFilePlan

      NodeRef getFilePlan(NodeRef nodeRef)
      Gets the file plan the node is in.
      Returns:
      NodeRef file node reference, null if none
    • getFilePlanBySiteId

      NodeRef getFilePlanBySiteId(String siteId)
      Gets a file plan by site id. Assumes the site is a RM site and that the file plan node, ie the document library container, has been already created. Otherwise returns null.
      Parameters:
      siteId - records management site id
      Returns:
      NodeRef file plan, null if can't be found
    • existsUnfiledContainer

      boolean existsUnfiledContainer(NodeRef filePlan)
      Indicates whether the unfiled container exists for a given file plan or not.
      Parameters:
      filePlan - file plan
      Returns:
      boolean true if unfiled container exists, false otherwise
    • getUnfiledContainer

      NodeRef getUnfiledContainer(NodeRef filePlan)
      Gets the unfiled container for a given file plan. Returns null if none.
      Parameters:
      filePlan - file plan
      Returns:
      NodeRef unfiled container, null if none
    • createUnfiledContainer

      NodeRef createUnfiledContainer(NodeRef filePlan)
      Creates, and returns, a unfiled container for a given file plan.
      Parameters:
      filePlan - file plan
      Returns:
      NodeRef unfiled container
    • getHoldContainer

      NodeRef getHoldContainer(NodeRef filePlan)
      Gets the hold container for a given file plan. Returns null if none.
      Parameters:
      filePlan -
      Returns:
    • createHoldContainer

      NodeRef createHoldContainer(NodeRef filePlan)
      Parameters:
      filePlan -
      Returns:
    • getTransferContainer

      NodeRef getTransferContainer(NodeRef filePlan)
      Parameters:
      filePlan -
      Returns:
    • createTransferContainer

      NodeRef createTransferContainer(NodeRef filePlan)
      Parameters:
      filePlan -
      Returns:
    • createFilePlan

      NodeRef createFilePlan(NodeRef parent, String name, QName type)
      Creates a file plan as a child of the given parent node, with the name provided.
      Parameters:
      parent - parent node reference
      name - file plan name
      type - type, must be rma:filePlan or sub-type of
      Returns:
      NodeRef file plan node reference
    • createFilePlan

      NodeRef createFilePlan(NodeRef parent, String name, QName type, Map<QName,Serializable> properties)
      Specifies the properties to be set on the created file plan.
      Parameters:
      parent - parent node reference
      name - file plan name
      type - type, must be rma:filePlan or sub-type of
      properties - file plan properties
      Returns:
      NodeRef file plan node reference
      See Also:
    • createFilePlan

      NodeRef createFilePlan(NodeRef parent, String name)
      Creates a file plan with the default type.
      Parameters:
      parent - parent node reference
      name - file plan name
      Returns:
      NodeRef file plan node reference
      See Also:
    • createFilePlan

      NodeRef createFilePlan(NodeRef parent, String name, Map<QName,Serializable> properties)
      Creates a file plan with the default type, specifying properties.
      Parameters:
      parent - parent node reference
      name - file plan name
      properties - file plan properties
      Returns:
      NodeRef file plan node reference
      See Also:
    • getNodeRefPath

      List<NodeRef> getNodeRefPath(NodeRef nodeRef)
      Gets the NodeRef sequence from the root down to the fileplan component given. The array will start with the NodeRef of the root and end with the name of the fileplan component node given.
      Parameters:
      nodeRef - a fileplan component
      Returns:
      Returns a NodeRef path starting with the file plan
    • isFilePlanContainer

      boolean isFilePlanContainer(NodeRef nodeRef)
      Indicates whether the given node is a file plan container or not.

      This includes file plan and record category nodes.

      Parameters:
      nodeRef - node reference
      Returns:
      boolean true if node is a file plan container, false otherwise.
    • isRecordCategory

      boolean isRecordCategory(NodeRef nodeRef)
      Indicates whether the given node is a record category or not.
      Parameters:
      nodeRef - node reference
      Returns:
      boolean true if records category, false otherwise
    • getAllContained

      List<NodeRef> getAllContained(NodeRef recordCategory, boolean deep)
      Get all the items contained within a container. This will include record folders and other record categories.
      Parameters:
      recordCategory - record category node reference
      deep - if true then return all children including sub-categories and their children in turn, if false then just return the immediate children
      Returns:
      List<NodeRef> list of contained node references
    • getAllContained

      List<NodeRef> getAllContained(NodeRef recordCategory)
      Only return the immediate children.
      Parameters:
      recordCategory - record category node reference
      Returns:
      List<NodeRef> list of contained node references
    • getContainedRecordCategories

      List<NodeRef> getContainedRecordCategories(NodeRef recordCategory, boolean deep)
      Get all the record categories within a record category.
      Parameters:
      recordCategory - record category node reference
      deep - if true then return all children including sub-categories and their children in turn, if false then just return the immediate children
      Returns:
      List<NodeRef> list of container node references
    • getContainedRecordCategories

      List<NodeRef> getContainedRecordCategories(NodeRef recordCategory)
      Only return immediate children.
      Parameters:
      recordCategory - container node reference
      Returns:
      List<NodeRef> list of container node references
    • getContainedRecordFolders

      List<NodeRef> getContainedRecordFolders(NodeRef container, boolean deep)
      Get all the record folders contained within a container
      Parameters:
      container - container node reference
      deep - if true then return all children including sub-containers and their children in turn, if false then just return the immediate children
      Returns:
      List<NodeRef> list of record folder node references
    • getContainedRecordFolders

      List<NodeRef> getContainedRecordFolders(NodeRef container)
      Only return immediate children.
      Parameters:
      container - container node reference
      Returns:
      List<NodeRef> list of record folder node references
    • createRecordCategory

      NodeRef createRecordCategory(NodeRef parent, String name, QName type)
      Create a record category.
      Parameters:
      parent - parent node reference, must be a record category or file plan.
      name - name of the new record category
      type - type of container to create, must be a sub-type of rm:recordCategory
      Returns:
      NodeRef node reference of the created record category
    • createRecordCategory

      NodeRef createRecordCategory(NodeRef parent, String name, QName type, Map<QName,Serializable> properties)
      Parameters:
      parent -
      name -
      type -
      properties -
      Returns:
    • createRecordCategory

      NodeRef createRecordCategory(NodeRef parent, String name)
      Creates a record category of type rma:recordCategory
      Parameters:
      parent - parent node reference, must be a record category or file plan.
      name - name of the record category
      Returns:
      NodeRef node reference of the created record category
    • createRecordCategory

      NodeRef createRecordCategory(NodeRef parent, String name, Map<QName,Serializable> properties)
      Parameters:
      parent -
      name -
      properties -
      Returns: