org.alfresco.repo.model
Class Repository

java.lang.Object
  extended by org.alfresco.repo.model.Repository
All Implemented Interfaces:
java.util.EventListener, org.alfresco.repo.tenant.TenantDeployer, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

public class Repository
extends java.lang.Object
implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener, org.alfresco.repo.tenant.TenantDeployer

Provision of Repository Context


Constructor Summary
Repository()
           
 
Method Summary
 void destroy()
           
 org.alfresco.service.cmr.repository.NodeRef findNodeRef(java.lang.String referenceType, java.lang.String[] reference)
          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.
 org.alfresco.service.cmr.repository.NodeRef getCompanyHome()
          Gets the Company Home
 org.alfresco.service.cmr.repository.NodeRef getPerson()
          Gets the currently authenticated person
 org.alfresco.service.cmr.repository.NodeRef getRootHome()
          Gets the root home of the company home store
 org.alfresco.service.cmr.repository.NodeRef getUserHome(org.alfresco.service.cmr.repository.NodeRef person)
          Gets the user home of the currently authenticated person
 void init()
           
protected  void initContext()
          Initialise Repository Context
 void onApplicationEvent(org.springframework.context.ApplicationEvent event)
           
 void onDisableTenant()
           
 void onEnableTenant()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setAvmService(AVMService avmService)
          Sets the AVM service
 void setCompanyHomePath(java.lang.String companyHomePath)
          Sets the Company Home Path
 void setCompanyHomeStore(java.lang.String companyHomeStore)
          Sets the Company Home Store
 void setFileFolderService(FileFolderService fileFolderService)
          Sets the file folder service
 void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
          Sets the namespace service
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
          Sets the node service
 void setPersonService(PersonService personService)
          Sets the person service
 void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
          Sets the search service
 void setTenantAdminService(TenantAdminService tenantAdminService)
          Sets the tenant admin service
 void setTransactionHelper(RetryingTransactionHelper retryingTransactionHelper)
          Sets helper that provides transaction callbacks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Repository

public Repository()
Method Detail

setCompanyHomeStore

public void setCompanyHomeStore(java.lang.String companyHomeStore)
Sets the Company Home Store

Parameters:
companyHomeStore -

setCompanyHomePath

public void setCompanyHomePath(java.lang.String companyHomePath)
Sets the Company Home Path

Parameters:
companyHomePath -

setTransactionHelper

public void setTransactionHelper(RetryingTransactionHelper retryingTransactionHelper)
Sets helper that provides transaction callbacks


setNamespaceService

public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
Sets the namespace service


setSearchService

public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Sets the search service


setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Sets the node service


setFileFolderService

public void setFileFolderService(FileFolderService fileFolderService)
Sets the file folder service


setPersonService

public void setPersonService(PersonService personService)
Sets the person service


setTenantAdminService

public void setTenantAdminService(TenantAdminService tenantAdminService)
Sets the tenant admin service


setAvmService

public void setAvmService(AVMService avmService)
Sets the AVM service


setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

onApplicationEvent

public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener

initContext

protected void initContext()
Initialise Repository Context


getRootHome

public org.alfresco.service.cmr.repository.NodeRef getRootHome()
Gets the root home of the company home store

Returns:
root node ref

getCompanyHome

public org.alfresco.service.cmr.repository.NodeRef getCompanyHome()
Gets the Company Home

Returns:
company home node ref

getPerson

public org.alfresco.service.cmr.repository.NodeRef getPerson()
Gets the currently authenticated person

Returns:
person node ref

getUserHome

public org.alfresco.service.cmr.repository.NodeRef getUserHome(org.alfresco.service.cmr.repository.NodeRef person)
Gets the user home of the currently authenticated person

Parameters:
person - person
Returns:
user home of person

findNodeRef

public org.alfresco.service.cmr.repository.NodeRef findNodeRef(java.lang.String referenceType,
                                                               java.lang.String[] reference)
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) AVM Path - {store_id}/{path} Resolve to AVM node via its display path 4) QName - {store_type}/{store_id}/{child_qname_path} TODO: Implement Resolve to node via its child qname path.

Parameters:
referenceType - one of node, path, avmpath or qname
Returns:
reference array of reference segments (as described above for each reference type)

onEnableTenant

public void onEnableTenant()
Specified by:
onEnableTenant in interface org.alfresco.repo.tenant.TenantDeployer

onDisableTenant

public void onDisableTenant()
Specified by:
onDisableTenant in interface org.alfresco.repo.tenant.TenantDeployer

init

public void init()
Specified by:
init in interface org.alfresco.repo.tenant.TenantDeployer

destroy

public void destroy()
Specified by:
destroy in interface org.alfresco.repo.tenant.TenantDeployer


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.