📄 i_cmsresourcetype.java
字号:
void lockResource(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int mode)
throws CmsException;
/**
* Moves a resource to the given destination.<p>
*
* A move operation in OpenCms is always a copy (as sibling) followed by a delete,
* this is a result of the online/offline structure of the
* OpenCms VFS. This way you can see the deleted files/folders in the offline
* project, and you will be unable to undelete them.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to move
* @param destination the destination resource name
*
* @throws CmsException if something goes wrong
* @throws CmsIllegalArgumentException if the <code>source</code> argument is null or of length 0
*
*
* @see CmsObject#moveResource(String, String)
* @see CmsObject#renameResource(String, String)
* @see CmsSecurityManager#copyResource(org.opencms.file.CmsRequestContext, CmsResource, String, int)
* @see CmsSecurityManager#deleteResource(org.opencms.file.CmsRequestContext, CmsResource, int)
*/
void moveResource(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, String destination)
throws CmsException, CmsIllegalArgumentException;
/**
* Removes a resource from the current project of the user.<p>
*
* This is used to reduce the current users project with the
* specified resource, in case that the resource is already part of the project.
* The resource is not really removed like in a regular copy operation,
* it is in fact only "disabled" in the current users project.<p>
*
* @param cms the initialized CmsObject
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to apply this operation to
*
* @throws CmsException if something goes wrong
* @throws CmsIllegalArgumentException if the <code>resource</code> argument is null or of length 0
*
* @see CmsObject#copyResourceToProject(String)
* @see CmsSecurityManager#copyResourceToProject(org.opencms.file.CmsRequestContext, CmsResource)
*/
void removeResourceFromProject(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource)
throws CmsException, CmsIllegalArgumentException;
/**
* Replaces the content, type and properties of a resource.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the name of the resource to replace
* @param type the new type of the resource
* @param content the new content of the resource
* @param properties the new properties of the resource
*
* @throws CmsException if something goes wrong
*
* @see CmsObject#replaceResource(String, int, byte[], List)
* @see CmsSecurityManager#replaceResource(org.opencms.file.CmsRequestContext, CmsResource, int, byte[], List)
*/
void replaceResource(
CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
int type,
byte[] content,
List properties) throws CmsException;
/**
* Restores a file in the current project with a version from the backup archive.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to restore from the archive
* @param tag the tag (version) id to resource form the archive
*
* @throws CmsException if something goes wrong
*
* @see CmsObject#restoreResourceBackup(String, int)
* @see CmsSecurityManager#restoreResource(org.opencms.file.CmsRequestContext, CmsResource, int)
*/
void restoreResourceBackup(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int tag)
throws CmsException;
/**
* Sets the additional resource type flag.<p>
* @param additionalType true or false
*/
void setAdditionalModuleResourceType(boolean additionalType);
/**
* Changes the "expire" date of a resource.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to touch
* @param dateExpired the new expire date of the changed resource
* @param recursive if this operation is to be applied recursivly to all resources in a folder
*
* @throws CmsException if something goes wrong
*
* @see CmsObject#setDateExpired(String, long, boolean)
* @see CmsSecurityManager#setDateExpired(org.opencms.file.CmsRequestContext, CmsResource, long)
*/
void setDateExpired(
CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
long dateExpired,
boolean recursive) throws CmsException;
/**
* Changes the "last modified" date of a resource.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to touch
* @param dateLastModified timestamp the new timestamp of the changed resource
* @param recursive if this operation is to be applied recursivly to all resources in a folder
*
* @throws CmsException if something goes wrong
*
* @see CmsObject#setDateLastModified(String, long, boolean)
* @see CmsSecurityManager#setDateLastModified(org.opencms.file.CmsRequestContext, CmsResource, long)
*/
void setDateLastModified(
CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
long dateLastModified,
boolean recursive) throws CmsException;
/**
* Changes the "release" date of a resource.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to touch
* @param dateReleased the new release date of the changed resource
* @param recursive if this operation is to be applied recursivly to all resources in a folder
*
* @throws CmsException if something goes wrong
*
* @see CmsObject#setDateReleased(String, long, boolean)
* @see CmsSecurityManager#setDateReleased(org.opencms.file.CmsRequestContext, CmsResource, long)
*/
void setDateReleased(
CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
long dateReleased,
boolean recursive) throws CmsException;
/**
* Undos all changes in the resource by restoring the version from the
* online project to the current offline project.<p>
*
* This is also used when doing an "undelete" operation.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to undo the changes for
* @param recursive if this operation is to be applied recursivly to all resources in a folder
*
* @throws CmsException if something goes wrong
*
* @see CmsObject#undoChanges(String, boolean)
* @see CmsSecurityManager#undoChanges(org.opencms.file.CmsRequestContext, CmsResource)
*/
void undoChanges(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, boolean recursive)
throws CmsException;
/**
* Unlocks a resource.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to unlock
*
* @throws CmsException if something goes wrong
*
* @see CmsObject#unlockResource(String)
* @see CmsSecurityManager#unlockResource(org.opencms.file.CmsRequestContext, CmsResource)
*/
void unlockResource(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource) throws CmsException;
/**
* Writes a resource, including it's content.<p>
*
* Applies only to resources of type <code>{@link CmsFile}</code>
* that have a binary content attached.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to apply this operation to
*
* @return the written resource
*
* @throws CmsException if something goes wrong
*
* @see CmsObject#writeFile(CmsFile)
* @see CmsSecurityManager#writeFile(org.opencms.file.CmsRequestContext, CmsFile)
*/
CmsFile writeFile(CmsObject cms, CmsSecurityManager securityManager, CmsFile resource) throws CmsException;
/**
* Writes a property for a specified resource.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to write the property for
* @param property the property to write
*
* @throws CmsException if something goes wrong
*
* @see CmsObject#writePropertyObject(String, CmsProperty)
* @see CmsSecurityManager#writePropertyObject(org.opencms.file.CmsRequestContext, CmsResource, CmsProperty)
*/
void writePropertyObject(
CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
CmsProperty property) throws CmsException;
/**
* Writes a list of properties for a specified resource.<p>
*
* Code calling this method has to ensure that the no properties
* <code>a, b</code> are contained in the specified list so that <code>a.equals(b)</code>,
* otherwise an exception is thrown.<p>
*
* @param cms the current cms context
* @param securityManager the initialized OpenCms security manager
* @param resource the resource to write the properties for
* @param properties the list of properties to write
*
* @throws CmsException if something goes wrong
*
* @see CmsObject#writePropertyObjects(String, List)
* @see CmsSecurityManager#writePropertyObjects(org.opencms.file.CmsRequestContext, CmsResource, List)
*/
void writePropertyObjects(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, List properties)
throws CmsException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -