Package org.alfresco.filesys.repo
Class ContentContext
- java.lang.Object
-
- org.alfresco.jlan.server.core.DeviceContext
-
- org.alfresco.jlan.server.filesys.DiskDeviceContext
-
- org.alfresco.filesys.alfresco.AlfrescoContext
-
- org.alfresco.filesys.repo.ContentContext
-
public class ContentContext extends AlfrescoContext
Content Filesystem Context ClassContains per filesystem context.
- Author:
- GKSpencer
-
-
Field Summary
-
Fields inherited from class org.alfresco.filesys.alfresco.AlfrescoContext
DBG_FILE, DBG_FILEIO, DBG_INFO, DBG_LOCK, DBG_PSEUDO, DBG_RENAME, DBG_SEARCH, m_debug
-
-
Constructor Summary
Constructors Constructor Description ContentContext()Default constructor allowing initialization by container.ContentContext(java.lang.String deviceName, java.lang.String storeName, java.lang.String rootPath, org.alfresco.service.cmr.repository.NodeRef rootNodeRef)Class constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidCloseContext()Close the filesystem contextAccessControlListBeangetAccessControlList()Gets the access control list.booleangetDisableChangeNotifications()Determine if change notifications are disabledbooleangetDisableNodeMonitor()Determines whether a node monitor is required.booleangetDisableOplocks()Determine if oplocks support should be disabledjava.lang.StringgetFilesystemType()Return the filesystem type, either FileSystem.TypeFAT or FileSystem.TypeNTFS.org.alfresco.jlan.server.filesys.cache.FileStateLockManagergetLockManager()Return the lock managerbooleangetOfflineFiles()Determines whether locked files should be marked as offline.java.lang.StringgetRelativePath()Return the relative pathjava.util.regex.PatterngetRenameShufflePattern()Get the regular expression pattern that will be applied to detected potential rename shuffles.org.alfresco.service.cmr.repository.NodeRefgetRootNode()Return the root nodejava.lang.StringgetRootPath()Return the root pathjava.lang.StringgetStoreName()Return the store nameorg.alfresco.jlan.server.thread.ThreadRequestPoolgetThreadPool()Return the thread poolvoidinitialize(AlfrescoDiskDriver filesysDriver)Complete initialization by registering with a disk drivervoidsetAccessControlList(AccessControlListBean accessControlList)voidsetDisableChangeNotifications(boolean disableChangeNotify)Disable change notificationsvoidsetDisableNodeMonitor(boolean disableNodeMonitor)voidsetDisableOplocks(boolean disableOplocks)Enable/disable oplock supportprotected voidsetNodeMonitor(NodeMonitor nodeMonitor)Set the node monitorvoidsetOfflineFiles(boolean offlineFiles)voidsetRelativePath(java.lang.String path)voidsetRenameShufflePattern(java.util.regex.Pattern renameShufflePattern)Set the regular expression that will be applied to filenames during renames to detect whether clients are performing a renaming shuffle - common during file saving on various clients.voidsetRootNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)voidsetRootPath(java.lang.String path)voidsetStoreName(java.lang.String name)voidstartFilesystem(org.alfresco.jlan.server.filesys.DiskSharedDevice share)Start the filesystem-
Methods inherited from class org.alfresco.filesys.alfresco.AlfrescoContext
getOpLockManager, getShareURLFileName, getShareUrlPrefix, getSysAdminParams, getURLFileName, getURLPrefix, hasDebug, isAlfrescoURLEnabled, isShareURLEnabled, setAlfrescoURLEnabled, setDebug, setDisableChangeNotification, setLockManager, setOpLockManager, setShareURLEnabled, setShareURLFileName, setSysAdminParams, setURLFileName
-
Methods inherited from class org.alfresco.jlan.server.filesys.DiskDeviceContext
addNotifyRequest, enableChangeHandler, getChangeHandler, getDeviceAttributes, getDiskInformation, getFilesystemAttributes, getQuotaManager, getStateCache, getVolumeInformation, hasChangeHandler, hasDiskInformation, hasFileServerNotifications, hasQuotaManager, hasStateCache, hasVolumeInformation, isCaseless, removeNotifyRequest, requiresStateCache, setDeviceAttributes, setDiskInformation, setFileServerNotifications, setFilesystemAttributes, setQuotaManager, setRequiresStateCache, setStateCache, setVolumeInformation
-
-
-
-
Constructor Detail
-
ContentContext
public ContentContext()
Default constructor allowing initialization by container.
-
ContentContext
public ContentContext(java.lang.String deviceName, java.lang.String storeName, java.lang.String rootPath, org.alfresco.service.cmr.repository.NodeRef rootNodeRef)Class constructor- Parameters:
deviceName- StringstoreName- StringrootPath- StringrootNodeRef- NodeRef
-
-
Method Detail
-
setStoreName
public void setStoreName(java.lang.String name)
-
setRootPath
public void setRootPath(java.lang.String path)
-
setRelativePath
public void setRelativePath(java.lang.String path)
-
setOfflineFiles
public void setOfflineFiles(boolean offlineFiles)
-
setDisableNodeMonitor
public void setDisableNodeMonitor(boolean disableNodeMonitor)
-
setDisableChangeNotifications
public void setDisableChangeNotifications(boolean disableChangeNotify)
Disable change notifications- Parameters:
disableChangeNotify- boolean
-
setAccessControlList
public void setAccessControlList(AccessControlListBean accessControlList)
-
setRootNodeRef
public void setRootNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
-
setDisableOplocks
public void setDisableOplocks(boolean disableOplocks)
Enable/disable oplock support- Parameters:
disableOplocks- boolean
-
getRenameShufflePattern
public java.util.regex.Pattern getRenameShufflePattern()
Get the regular expression pattern that will be applied to detected potential rename shuffles.- Returns:
- the regular expression pattern to match against
-
setRenameShufflePattern
public void setRenameShufflePattern(java.util.regex.Pattern renameShufflePattern)
Set the regular expression that will be applied to filenames during renames to detect whether clients are performing a renaming shuffle - common during file saving on various clients. ALF-3856- Parameters:
renameShufflePattern- a regular expression filename match
-
initialize
public void initialize(AlfrescoDiskDriver filesysDriver)
Description copied from class:AlfrescoContextComplete initialization by registering with a disk driver- Overrides:
initializein classAlfrescoContext
-
getFilesystemType
public java.lang.String getFilesystemType()
Return the filesystem type, either FileSystem.TypeFAT or FileSystem.TypeNTFS.- Overrides:
getFilesystemTypein classAlfrescoContext- Returns:
- String
-
getStoreName
public final java.lang.String getStoreName()
Return the store name- Returns:
- String
-
getRootPath
public final java.lang.String getRootPath()
Return the root path- Returns:
- String
-
getRelativePath
public java.lang.String getRelativePath()
Return the relative path- Returns:
- String
-
getOfflineFiles
public boolean getOfflineFiles()
Determines whether locked files should be marked as offline.- Returns:
trueif locked files should be marked as offline
-
getDisableNodeMonitor
public boolean getDisableNodeMonitor()
Determines whether a node monitor is required.- Returns:
trueif a node monitor is required
-
getDisableOplocks
public boolean getDisableOplocks()
Determine if oplocks support should be disabled- Returns:
- boolean
-
getLockManager
public org.alfresco.jlan.server.filesys.cache.FileStateLockManager getLockManager()
Return the lock manager- Overrides:
getLockManagerin classAlfrescoContext- Returns:
- FileStateLockManager
-
getDisableChangeNotifications
public boolean getDisableChangeNotifications()
Determine if change notifications are disabled- Returns:
- boolean
-
getAccessControlList
public AccessControlListBean getAccessControlList()
Gets the access control list.- Returns:
- the access control list
-
getRootNode
public final org.alfresco.service.cmr.repository.NodeRef getRootNode()
Return the root node- Returns:
- NodeRef
-
getThreadPool
public final org.alfresco.jlan.server.thread.ThreadRequestPool getThreadPool()
Return the thread pool- Returns:
- ThreadRequestPool
-
CloseContext
public void CloseContext()
Close the filesystem context- Overrides:
CloseContextin classorg.alfresco.jlan.server.filesys.DiskDeviceContext
-
setNodeMonitor
protected void setNodeMonitor(NodeMonitor nodeMonitor)
Set the node monitor- Parameters:
nodeMonitor- node monitor
-
startFilesystem
public void startFilesystem(org.alfresco.jlan.server.filesys.DiskSharedDevice share) throws org.alfresco.jlan.server.core.DeviceContextExceptionStart the filesystem- Overrides:
startFilesystemin classAlfrescoContext- Parameters:
share- DiskSharedDevice- Throws:
org.alfresco.jlan.server.core.DeviceContextException
-
-