public static final class CmsLockUtil.LockedFile extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEncoding()
Returns the encoding used for the file.
|
CmsFile |
getFile()
Returns the file.
|
CmsLockActionRecord |
getLockActionRecord()
Returns the lock action record.
|
boolean |
isCreated()
Returns a flag, indicating if the file is newly created.
|
static CmsLockUtil.LockedFile |
lockResource(CmsObject cms,
CmsResource resource)
Lock and read a file.
|
void |
setCreated(boolean isNew)
Set the flag, indicating if the file was newly created.
|
boolean |
unlock() |
public static CmsLockUtil.LockedFile lockResource(CmsObject cms, CmsResource resource) throws CmsException
cms
- the cms user context.resource
- the resource to lock and read.CmsException
- thrown if locking failspublic java.lang.String getEncoding()
CmsFileUtil.getEncoding(CmsObject, CmsResource)
public CmsLockActionRecord getLockActionRecord()
public boolean isCreated()
public void setCreated(boolean isNew)
isNew
- flag, indicating if the file was newly created.public boolean unlock() throws CmsException
CmsException