Package org.alfresco.repo.model
Class Repository
java.lang.Object
org.alfresco.repo.model.Repository
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class Repository
extends Object
implements org.springframework.context.ApplicationContextAware
Provision of Repository Context
- Author:
- davidc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindNodeRef(String referenceType, String[] reference) Helper to convert a Web Script Request URL to a Node RefGets the Company Home.Gets the currently fully authenticated person, Excludes any overlay authentication set by runasGets the Guest Home.Gets the currently authenticated person Includes any overlay authentication set by runasGets the root home of the company home storeGets the Shared Home.getUserHome(NodeRef person) Gets the user home of the currently authenticated personprotected voidInitialise Repository ContextvoidonApplicationEvent(org.springframework.context.ApplicationEvent event) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetCompanyHomePath(String companyHomePath) Sets the Company Home PathvoidsetCompanyHomeStore(String companyHomeStore) Sets the Company Home StorevoidsetFileFolderService(FileFolderService fileFolderService) Sets the file folder servicevoidsetGuestHomePath(String guestHomePath) voidsetNamespaceService(NamespaceService namespaceService) Sets the namespace servicevoidsetNodeService(NodeService nodeService) Sets the node servicevoidsetPersonService(PersonService personService) Sets the person servicevoidsetSearchService(SearchService searchService) Sets the search servicevoidsetSharedHomePath(String sharedHomePath) Sets the Shared Home PathvoidsetSingletonCache(SimpleCache<String, NodeRef> singletonCache) voidsetTransactionHelper(RetryingTransactionHelper retryingTransactionHelper) Sets helper that provides transaction callbacks
-
Constructor Details
-
Repository
public Repository()
-
-
Method Details
-
setCompanyHomeStore
Sets the Company Home Store- Parameters:
companyHomeStore- String
-
setCompanyHomePath
Sets the Company Home Path- Parameters:
companyHomePath- String
-
setSingletonCache
-
setGuestHomePath
-
setTransactionHelper
Sets helper that provides transaction callbacks -
setNamespaceService
Sets the namespace service -
setSearchService
Sets the search service -
setNodeService
Sets the node service -
setFileFolderService
Sets the file folder service -
setPersonService
Sets the person service -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event) -
initContext
protected void initContext()Initialise Repository Context -
getRootHome
Gets the root home of the company home store- Returns:
- root node ref
-
getCompanyHome
Gets the Company Home. Note this is tenant-aware if the correct Cache is supplied.- Returns:
- company home node ref
-
getGuestHome
Gets the Guest Home. Note this is tenant-aware if the correct Cache is supplied.- Returns:
- guest home node ref
-
getPerson
Gets the currently authenticated person Includes any overlay authentication set by runas- Returns:
- person node ref
-
getFullyAuthenticatedPerson
Gets the currently fully authenticated person, Excludes any overlay authentication set by runas- Returns:
- person node ref
-
getUserHome
Gets the user home of the currently authenticated person- Parameters:
person- person- Returns:
- user home of person
-
findNodeRef
Helper to convert a Web Script Request URL to a Node Ref 1) Node - {store_type}/{store_id}/{node_id}
Resolve to node via its Node Reference.
2) Path - {store_type}/{store_id}/{path}
Resolve to node via its display path.
3) QName - {store_type}/{store_id}/{child_qname_path} TODO: Implement
Resolve to node via its child qname path.- Parameters:
referenceType- one of node, path or qname- Returns:
- reference array of reference segments (as described above for each reference type)
-