Interface FilePlanService
-
- All Known Implementing Classes:
FilePlanServiceImpl
@AlfrescoPublicApi public interface FilePlanService
File plan service interface.- Since:
- 2.1
- Author:
- Roy Wetherall
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_RM_SITE_ID
Default RM site id.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NodeRef
createFilePlan(NodeRef parent, String name)
Creates a file plan with the default type.NodeRef
createFilePlan(NodeRef parent, String name, Map<QName,Serializable> properties)
Creates a file plan with the default type, specifying properties.NodeRef
createFilePlan(NodeRef parent, String name, QName type)
Creates a file plan as a child of the given parent node, with the name provided.NodeRef
createFilePlan(NodeRef parent, String name, QName type, Map<QName,Serializable> properties)
Specifies the properties to be set on the created file plan.NodeRef
createHoldContainer(NodeRef filePlan)
NodeRef
createRecordCategory(NodeRef parent, String name)
Creates a record category of type rma:recordCategoryNodeRef
createRecordCategory(NodeRef parent, String name, Map<QName,Serializable> properties)
NodeRef
createRecordCategory(NodeRef parent, String name, QName type)
Create a record category.NodeRef
createRecordCategory(NodeRef parent, String name, QName type, Map<QName,Serializable> properties)
NodeRef
createTransferContainer(NodeRef filePlan)
NodeRef
createUnfiledContainer(NodeRef filePlan)
Creates, and returns, a unfiled container for a given file plan.boolean
existsUnfiledContainer(NodeRef filePlan)
Indicates whether the unfiled container exists for a given file plan or not.List<NodeRef>
getAllContained(NodeRef recordCategory)
Only return the immediate children.List<NodeRef>
getAllContained(NodeRef recordCategory, boolean deep)
Get all the items contained within a container.List<NodeRef>
getContainedRecordCategories(NodeRef recordCategory)
Only return immediate children.List<NodeRef>
getContainedRecordCategories(NodeRef recordCategory, boolean deep)
Get all the record categories within a record category.List<NodeRef>
getContainedRecordFolders(NodeRef container)
Only return immediate children.List<NodeRef>
getContainedRecordFolders(NodeRef container, boolean deep)
Get all the record folders contained within a containerNodeRef
getFilePlan(NodeRef nodeRef)
Gets the file plan the node is in.NodeRef
getFilePlanBySiteId(String siteId)
Gets a file plan by site id.FilePlanComponentKind
getFilePlanComponentKind(NodeRef nodeRef)
Returns the 'kind' of file plan component the node reference is.FilePlanComponentKind
getFilePlanComponentKindFromType(QName type)
Returns the file plan component 'kind' that relates to the passed content type.Set<NodeRef>
getFilePlans()
Gets all the file plan nodes.Set<NodeRef>
getFilePlans(StoreRef storeRef)
Getse all the file plan nodes in a store.NodeRef
getHoldContainer(NodeRef filePlan)
Gets the hold container for a given file plan.List<NodeRef>
getNodeRefPath(NodeRef nodeRef)
Gets the NodeRef sequence from theroot
down to the fileplan component given.NodeRef
getTransferContainer(NodeRef filePlan)
NodeRef
getUnfiledContainer(NodeRef filePlan)
Gets the unfiled container for a given file plan.boolean
isFilePlan(NodeRef nodeRef)
Indicates whether the given node is file plan node or not.boolean
isFilePlanComponent(NodeRef nodeRef)
Indicates whether the given node is a file plan component or not.boolean
isFilePlanContainer(NodeRef nodeRef)
Indicates whether the given node is a file plan container or not.boolean
isRecordCategory(NodeRef nodeRef)
Indicates whether the given node is a record category or not.
-
-
-
Field Detail
-
DEFAULT_RM_SITE_ID
static final String DEFAULT_RM_SITE_ID
Default RM site id. Can be used withgetFilePlanBySiteId(String)
to get the file plan node.- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
-
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 referencename
- file plan nametype
- 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 referencename
- file plan nametype
- type, must be rma:filePlan or sub-type ofproperties
- file plan properties- Returns:
- NodeRef file plan node reference
- See Also:
createFilePlan(NodeRef, String, QName)
-
createFilePlan
NodeRef createFilePlan(NodeRef parent, String name)
Creates a file plan with the default type.- Parameters:
parent
- parent node referencename
- file plan name- Returns:
- NodeRef file plan node reference
- See Also:
createFilePlan(NodeRef, String, QName)
-
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 referencename
- file plan nameproperties
- file plan properties- Returns:
- NodeRef file plan node reference
- See Also:
createFilePlan(NodeRef, String, QName)
-
getNodeRefPath
List<NodeRef> getNodeRefPath(NodeRef nodeRef)
Gets the NodeRef sequence from theroot
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.
-
getAllContained
List<NodeRef> getAllContained(NodeRef recordCategory)
Only return the immediate children.
-
getContainedRecordCategories
List<NodeRef> getContainedRecordCategories(NodeRef recordCategory, boolean deep)
Get all the record categories within a record category.
-
getContainedRecordCategories
List<NodeRef> getContainedRecordCategories(NodeRef recordCategory)
Only return immediate children.
-
getContainedRecordFolders
List<NodeRef> getContainedRecordFolders(NodeRef container, boolean deep)
Get all the record folders contained within a container
-
getContainedRecordFolders
List<NodeRef> getContainedRecordFolders(NodeRef container)
Only return immediate children.
-
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 categorytype
- 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
-
-