Package org.exoplatform.forum.common.jcr
Class KSDataLocation
java.lang.Object
org.exoplatform.forum.common.jcr.KSDataLocation
This class is meant to be the starting for any data storage access in KS.
Provides all JCR pathes usable in KS JCR data storage.
A
Relies on
Provides all JCR pathes usable in KS JCR data storage.
A
JCRSessionManager accessible by getSessionManager() is configured on the appropriate repository and workspace.Relies on
NodeHierarchyCreator to initialize the structure and provide pathes aliases.- Version:
- $Revision$
- Author:
- Patrice Lamarque
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceLocation names for KS data storage -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKSDataLocation(String workspace) KSDataLocation(String workspace, org.exoplatform.services.jcr.RepositoryService repositoryService) Mainly used for testsKSDataLocation(org.exoplatform.container.xml.InitParams params, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator creator, org.exoplatform.services.jcr.RepositoryService repositoryService) Creates a newKSDataLocationand initializes pathes. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGet a jcr path by location name.org.exoplatform.services.jcr.RepositoryServicegetUserSubscriptionLocation(String userId) Return the location of forum subscriptions for a given uservoidsetLocation(DataLocationPlugin plugin) Change the storage location.voidsetSessionManager(SessionManager manager) toString()
-
Field Details
-
WORKSPACE_PARAM
Parameter name use to designate the name of the workspace in the repository where the data is stored. Should be passed in constructor'sInitParams- See Also:
-
DEFAULT_REPOSITORY_NAME
Default repository name used if none is specified- See Also:
-
DEFAULT_WORKSPACE_NAME
Default workspace name used if none is specified- See Also:
-
-
Constructor Details
-
KSDataLocation
public KSDataLocation(org.exoplatform.container.xml.InitParams params, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator creator, org.exoplatform.services.jcr.RepositoryService repositoryService) Creates a newKSDataLocationand initializes pathes.- Parameters:
params-WORKSPACE_PARAMis expected as value-paramcreator- used to resolve path names. It is also declared here to ensure that the data structure has been initalized before.
-
KSDataLocation
public KSDataLocation(String workspace, org.exoplatform.services.jcr.RepositoryService repositoryService) Mainly used for tests- Parameters:
workspace-
-
KSDataLocation
-
-
Method Details
-
setLocation
Change the storage location. Note that pathes are not reset- Parameters:
plugin- plugin defining repository and workspace location for the data storage
-
getPath
Get a jcr path by location name.- Parameters:
locationName- name of the location such a defined inKSDataLocation.Locations- Returns:
- jcr path corresponding the alias name in
NodeHierarchyCreator. If the creator was not set, returns the locationName. The path returned is relative to root (no leading '/')
-
getRepository
-
getRepositoryService
public org.exoplatform.services.jcr.RepositoryService getRepositoryService() -
getWorkspace
-
getSessionManager
-
setSessionManager
-
getForumHomeLocation
- Returns:
- root path for Forum data
-
getForumDataLocation
- Returns:
- root path for forum user data
-
getForumSystemLocation
- Returns:
- root path for Forum internal data
-
getBanIPLocation
- Returns:
- root path for global bans
-
getStatisticsLocation
- Returns:
- root path for all statistics
-
getAdministrationLocation
- Returns:
- root path for forum settings
-
getUserProfilesLocation
- Returns:
- root path for forum user profiles
-
getForumCategoriesLocation
- Returns:
- root path for forum categories
-
getTagsLocation
- Returns:
- root path for all tags
-
getAvatarsLocation
- Returns:
- root path for all user avatars
-
getForumBanIPLocation
- Returns:
- root path for forum bans
-
getBBCodesLocation
- Returns:
- root path for all BBCodes
-
getFaqHomeLocation
- Returns:
- root path for FAQ
-
getFaqSettingsLocation
- Returns:
- location for FAQ settings
-
getFaqUserSettingsLocation
- Returns:
- root path for all user settings
-
getFaqCategoriesLocation
- Returns:
- root path for FAQ cateogries
-
getFaqTemplatesLocation
- Returns:
- path where FAQ templates are stored
-
getForumStatisticsLocation
- Returns:
- path where forum statistics are stored
-
toString
-
getUserSubscriptionLocation
Return the location of forum subscriptions for a given user- Parameters:
userId- user id- Returns:
-