|
|||||||||
| Home >> All >> com >> opencms >> [ file overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.opencms.file
Class CmsResourceTypeLink

java.lang.Objectcom.opencms.file.CmsResourceTypePlain
com.opencms.file.CmsResourceTypeLink
- All Implemented Interfaces:
- com.opencms.core.I_CmsConstants, I_CmsResourceType, java.io.Serializable
- public class CmsResourceTypeLink
- extends CmsResourceTypePlain
Implementation of a resource type for links between resources in the virtual file system (VFS). A VFS link is nothing else but a text file of a certain resource type. The content of this file is the name/path of the target resource of the link, including the site root (which is at least "/default/vfs/").
VFS links and their target resources are tracked by the RESOURCE_FLAGS table attribute. Each VFS link saves there the ID of it's target resource. Each resource that has VFS links saves the count of it's VFS links (to fix wheter it has VFS links at all or not).
All resource types are created by the factory getResourceType() in CmsObject.
- Version:
- $Revision: 1.10 $
| Field Summary | |
static java.lang.String |
C_TYPE_RESOURCE_NAME
The name of the resource type node in registry.xml to read the general configurations for VFS links. |
private static int |
DEBUG
|
| Fields inherited from class com.opencms.file.CmsResourceTypePlain |
|
| Constructor Summary | |
CmsResourceTypeLink()
|
|
| Method Summary | |
void |
copyResource(CmsObject cms,
java.lang.String theSourceResourceName,
java.lang.String theDestinationResourceName,
boolean keepFlags)
Copy a VFS link. |
CmsResource |
createResource(CmsObject cms,
java.lang.String newResourceName,
java.util.Map properties,
byte[] contents,
java.lang.Object parameter)
Create a new VFS link. |
void |
deleteResource(CmsObject cms,
java.lang.String theResourceName)
Delete a VFS link. |
void |
moveResource(CmsObject cms,
java.lang.String theSourceResourceName,
java.lang.String theDestinationResourceName)
Move a VFS link. |
void |
renameResource(CmsObject cms,
java.lang.String theOldResourceName,
java.lang.String theNewResourceName)
Rename a VFS link. |
void |
undeleteResource(CmsObject cms,
java.lang.String theResourceName)
Undelete a VFS link. |
void |
undoChanges(CmsObject cms,
java.lang.String theResourceName)
Undo the changes on a VFS link. |
| Methods inherited from class com.opencms.file.CmsResourceTypePlain |
changeLockedInProject, chgrp, chmod, chown, chtype, copyResourceToProject, exportResource, getLauncherClass, getLauncherType, getResourceType, getResourceTypeName, importResource, init, lockResource, restoreResource, setDefaultFlags, toString, touch, unlockResource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
C_TYPE_RESOURCE_NAME
public static final java.lang.String C_TYPE_RESOURCE_NAME
- The name of the resource type node in registry.xml to read the
general configurations for VFS links.
- See Also:
- Constant Field Values
DEBUG
private static final int DEBUG
- See Also:
- Constant Field Values
| Constructor Detail |
CmsResourceTypeLink
public CmsResourceTypeLink()
| Method Detail |
createResource
public CmsResource createResource(CmsObject cms, java.lang.String newResourceName, java.util.Map properties, byte[] contents, java.lang.Object parameter) throws com.opencms.core.CmsException
- Create a new VFS link.
- Specified by:
createResourcein interfaceI_CmsResourceType- Overrides:
createResourcein classCmsResourceTypePlain
deleteResource
public void deleteResource(CmsObject cms, java.lang.String theResourceName) throws com.opencms.core.CmsException
- Delete a VFS link. The link counter of the target resource is decremented.
- Specified by:
deleteResourcein interfaceI_CmsResourceType- Overrides:
deleteResourcein classCmsResourceTypePlain
undeleteResource
public void undeleteResource(CmsObject cms, java.lang.String theResourceName) throws com.opencms.core.CmsException
- Undelete a VFS link. The link counter of the target resource is incremented again.
- Specified by:
undeleteResourcein interfaceI_CmsResourceType- Overrides:
undeleteResourcein classCmsResourceTypePlain
copyResource
public void copyResource(CmsObject cms, java.lang.String theSourceResourceName, java.lang.String theDestinationResourceName, boolean keepFlags) throws com.opencms.core.CmsException
- Copy a VFS link. The link counter of the target resource is incremented.
The ID of the target resource is saved in the new link resource.
- Specified by:
copyResourcein interfaceI_CmsResourceType- Overrides:
copyResourcein classCmsResourceTypePlain
moveResource
public void moveResource(CmsObject cms, java.lang.String theSourceResourceName, java.lang.String theDestinationResourceName) throws com.opencms.core.CmsException
- Move a VFS link. The link counter of the target resource remains unchanged.
The ID of the target resource is saved in the new link resource.
- Specified by:
moveResourcein interfaceI_CmsResourceType- Overrides:
moveResourcein classCmsResourceTypePlain
renameResource
public void renameResource(CmsObject cms, java.lang.String theOldResourceName, java.lang.String theNewResourceName) throws com.opencms.core.CmsException
- Rename a VFS link. The link counter of the target resource remains unchanged.
The ID of the target resource is saved in the new link resource.
- Specified by:
renameResourcein interfaceI_CmsResourceType- Overrides:
renameResourcein classCmsResourceTypePlain
undoChanges
public void undoChanges(CmsObject cms, java.lang.String theResourceName) throws com.opencms.core.CmsException
- Undo the changes on a VFS link. In case the target of the link has to be changed
back to another target resource, the link counter of the new target resource
is decremented, and so the link counter of the previous target resource is
incremented again. The ID of the target resource is saved in the new link resource.
- Specified by:
undoChangesin interfaceI_CmsResourceType- Overrides:
undoChangesin classCmsResourceTypePlain
|
|||||||||
| Home >> All >> com >> opencms >> [ file overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC