|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.opencms.file.types.A_CmsResourceType
org.opencms.file.types.A_CmsResourceTypeFolderBase
Resource type descriptor for the type "folder".
| Field Summary |
| Fields inherited from class org.opencms.file.types.A_CmsResourceType |
m_addititionalModuleResourceType, m_copyResources, m_defaultProperties, m_frozen, m_mappings, m_typeId, m_typeName, MACRO_RESOURCE_FOLDER_PATH, MACRO_RESOURCE_NAME, MACRO_RESOURCE_PARENT_PATH, MACRO_RESOURCE_ROOT_PATH, MACRO_RESOURCE_SITE_PATH |
| Fields inherited from interface org.opencms.file.types.I_CmsResourceType |
ADD_MAPPING_METHOD, ADD_RESOURCE_TYPE_METHOD, CONFIGURATION_PROPERTY_CREATE, CONFIGURATION_RESOURCE_TYPE_ID, CONFIGURATION_RESOURCE_TYPE_NAME, PROPERTY_ON_RESOURCE, PROPERTY_ON_STRUCTURE |
| Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler |
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD |
| Constructor Summary | |
A_CmsResourceTypeFolderBase()
Default constructor, used to initialize member variables. |
|
| Method Summary | |
void |
changeLastModifiedProjectId(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource)
Changes the project id of the resource to the current project, indicating that the resource was last modified in this project. |
void |
chtype(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource filename,
int newType)
Changes the resource type of a resource. |
void |
copyResource(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource source,
String destination,
int siblingMode)
Copies a resource. |
CmsResource |
createResource(CmsObject cms,
CmsSecurityManager securityManager,
String resourcename,
byte[] content,
List properties)
Creates a new resource of the given resource type with the provided content and properties. |
void |
deleteResource(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
int siblingMode)
Deletes a resource given its name. |
int |
getLoaderId()
Returns the loader type id of this resource type. |
boolean |
isFolder()
Returns true if this resource type is a folder. |
void |
moveResource(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
String destination)
Moves a resource to the given destination. |
void |
replaceResource(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
int type,
byte[] content,
List properties)
Replaces the content, type and properties of a resource. |
void |
restoreResourceBackup(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resourename,
int tag)
Restores a file in the current project with a version from the backup archive. |
void |
touch(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
long dateLastModified,
long dateReleased,
long dateExpired,
boolean recursive)
Changes the timestamp information of a resource. |
void |
undoChanges(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
boolean recursive)
Undos all changes in the resource by restoring the version from the online project to the current offline project. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public A_CmsResourceTypeFolderBase()
| Method Detail |
public void changeLastModifiedProjectId(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource)
throws CmsException
I_CmsResourceTypeThis information is used while publishing. Only resources inside the project folders that are new/modified/changed and that "belong" to the project (i.e. have the id of the project set) are published with the project.
changeLastModifiedProjectId in interface I_CmsResourceTypechangeLastModifiedProjectId in class A_CmsResourceTypeCmsExceptionI_CmsResourceType.changeLastModifiedProjectId(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource)
public void chtype(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource filename,
int newType)
throws CmsException,
CmsDataNotImplementedException
I_CmsResourceTypeOpenCms handles resources according to the resource type, not the file suffix. This is e.g. why a JSP in OpenCms can have the suffix ".html" instead of ".jsp" only. Changing the resource type makes sense e.g. if you want to make a plain text file a JSP resource, or a binary file an image, etc.
chtype in interface I_CmsResourceTypechtype in class A_CmsResourceTypeCmsException
CmsDataNotImplementedExceptionI_CmsResourceType.chtype(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource, int)
public void copyResource(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource source,
String destination,
int siblingMode)
throws CmsIllegalArgumentException,
CmsException
I_CmsResourceTypeYou must ensure that the destination path is an absolute, valid and existing VFS path. Relative paths from the source are currently not supported.
The copied resource will always be locked to the current user after the copy operation.
In case the target resource already exists, it is overwritten with the source resource.
The siblingMode parameter controls how to handle siblings
during the copy operation.
Possible values for this parameter are:
copyResource in interface I_CmsResourceTypecopyResource in class A_CmsResourceTypeCmsIllegalArgumentException
CmsExceptionI_CmsResourceType.copyResource(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource, java.lang.String, int)
public CmsResource createResource(CmsObject cms,
CmsSecurityManager securityManager,
String resourcename,
byte[] content,
List properties)
throws CmsException
I_CmsResourceType
createResource in interface I_CmsResourceTypecreateResource in class A_CmsResourceTypeCmsExceptionI_CmsResourceType.createResource(org.opencms.file.CmsObject, CmsSecurityManager, java.lang.String, byte[], List)
public void deleteResource(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
int siblingMode)
throws CmsException
I_CmsResourceType
The siblingMode parameter controls how to handle siblings
during the delete operation.
Possible values for this parameter are:
deleteResource in interface I_CmsResourceTypedeleteResource in class A_CmsResourceTypeCmsExceptionI_CmsResourceType.deleteResource(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource, int)public int getLoaderId()
I_CmsResourceType
getLoaderId in interface I_CmsResourceTypegetLoaderId in class A_CmsResourceTypeI_CmsResourceType.getLoaderId()public boolean isFolder()
I_CmsResourceTypetrue if this resource type is a folder.
isFolder in interface I_CmsResourceTypeisFolder in class A_CmsResourceTypeA_CmsResourceType.isFolder()
public void moveResource(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
String destination)
throws CmsException,
CmsIllegalArgumentException
I_CmsResourceTypeA 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.
moveResource in interface I_CmsResourceTypemoveResource in class A_CmsResourceTypeCmsException
CmsIllegalArgumentExceptionI_CmsResourceType.moveResource(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource, java.lang.String)
public void replaceResource(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
int type,
byte[] content,
List properties)
throws CmsException,
CmsDataNotImplementedException
I_CmsResourceType
replaceResource in interface I_CmsResourceTypereplaceResource in class A_CmsResourceTypeCmsException
CmsDataNotImplementedExceptionI_CmsResourceType.replaceResource(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource, int, byte[], List)
public void restoreResourceBackup(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resourename,
int tag)
throws CmsException
I_CmsResourceType
restoreResourceBackup in interface I_CmsResourceTyperestoreResourceBackup in class A_CmsResourceTypeCmsExceptionI_CmsResourceType.restoreResourceBackup(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource, int)
public void touch(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
long dateLastModified,
long dateReleased,
long dateExpired,
boolean recursive)
throws CmsException
I_CmsResourceTypeThis method is used to set the "last modified" date of a resource, the "release" date of a resource, and also the "expire" date of a resource.
touch in interface I_CmsResourceTypetouch in class A_CmsResourceTypeCmsExceptionI_CmsResourceType.touch(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource, long, long, long, boolean)
public void undoChanges(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
boolean recursive)
throws CmsException
I_CmsResourceTypeThis is also used when doing an "undelete" operation.
undoChanges in interface I_CmsResourceTypeundoChanges in class A_CmsResourceTypeCmsExceptionI_CmsResourceType.undoChanges(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource, boolean)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||