public class CmsLazyFolder
extends java.lang.Object
构造器和说明 |
---|
CmsLazyFolder(CmsResource folder)
Initializes this object with an existing folder.
|
CmsLazyFolder(java.lang.String path)
Initializes this object with a path at which the folder should be created.
|
限定符和类型 | 方法和说明 |
---|---|
CmsResource |
createFolder(CmsObject cms)
Creates the folder with the given name if it doesn't already exist, and returns it.
|
CmsResource |
getFolder(CmsObject cms)
Returns the folder if it already exists, or null if it doesn't.
|
CmsResource |
getOrCreateFolder(CmsObject cms)
Returns the folder if it already exists, or creates and returns it if it doesn't.
|
CmsResource |
getPermissionCheckFolder(CmsObject cms)
Returns the folder to check for permissions, which is either the folder itself if it already exists,
or the parent folder if it doesn't.
|
java.lang.String |
getSitePath(CmsObject cms)
Computes the site path of the folder, which is either the original path constructor argument, or the site
path of the original resource constructor argument.
|
public CmsLazyFolder(CmsResource folder)
folder
- the existing folderpublic CmsLazyFolder(java.lang.String path)
path
- the path at which the folder should be createdpublic CmsResource createFolder(CmsObject cms) throws CmsException
cms
- the current CMS contextCmsException
- if something goes wrongpublic CmsResource getFolder(CmsObject cms) throws CmsException
cms
- the current CMS contextCmsException
- if something goes wrongpublic CmsResource getOrCreateFolder(CmsObject cms) throws CmsException
cms
- the current CMS contextCmsException
- if something goes wrongpublic CmsResource getPermissionCheckFolder(CmsObject cms) throws CmsException
cms
- the current CMS contextCmsException
- if something goes wrongpublic java.lang.String getSitePath(CmsObject cms)
cms
- the current CMS context