|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.xml.containerpage.CmsLazyFolder
public class CmsLazyFolder
Helper class for creating a folder if it doesn'T already exist.
| Constructor Summary | |
|---|---|
CmsLazyFolder(CmsResource folder)
Initializes this object with an existing folder. |
|
CmsLazyFolder(String path)
Initializes this object with a path at which the folder should be created. |
|
| Method Summary | |
|---|---|
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CmsLazyFolder(CmsResource folder)
folder - the existing folderpublic CmsLazyFolder(String path)
path - the path at which the folder should be created| Method Detail |
|---|
public CmsResource createFolder(CmsObject cms)
throws CmsException
cms - the current CMS context
CmsException - if something goes wrong
public CmsResource getFolder(CmsObject cms)
throws CmsException
cms - the current CMS context
CmsException - if something goes wrong
public CmsResource getOrCreateFolder(CmsObject cms)
throws CmsException
cms - the current CMS context
CmsException - if something goes wrong
public CmsResource getPermissionCheckFolder(CmsObject cms)
throws CmsException
cms - the current CMS context
CmsException - if something goes wrongpublic String getSitePath(CmsObject cms)
cms - the current CMS context
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||