|
|||||||||
| 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
Interface I_CmsResourceType

- All Known Implementing Classes:
- CmsResourceTypeFolder, CmsResourceTypePage, CmsResourceTypePlain
- public interface I_CmsResourceType
Defines of all methods that a specific resource type has to implement.
| Method Summary | |
void |
changeLockedInProject(CmsObject cms,
int newProjectId,
java.lang.String resourcename)
Changes the project-id of the resource to the new project for publishing the resource directly |
void |
chgrp(CmsObject cms,
java.lang.String filename,
java.lang.String newGroup,
boolean chRekursive)
Changes the group of a resource. |
void |
chmod(CmsObject cms,
java.lang.String filename,
int flags,
boolean chRekursive)
Changes the flags of a resource. |
void |
chown(CmsObject cms,
java.lang.String filename,
java.lang.String newOwner,
boolean chRekursive)
Changes the owner of a resource. |
void |
chtype(CmsObject cms,
java.lang.String filename,
java.lang.String newType)
Changes the resourcetype of a resource. |
void |
copyResource(CmsObject cms,
java.lang.String source,
java.lang.String destination,
boolean keepFlags)
Copies a Resource. |
void |
copyResourceToProject(CmsObject cms,
java.lang.String resourceName)
Copies the resourcename to the current offline project |
CmsResource |
createResource(CmsObject cms,
java.lang.String newResourceName,
java.util.Map properties,
byte[] contents,
java.lang.Object parameter)
Creates a new resource. |
void |
deleteResource(CmsObject cms,
java.lang.String filename)
Deletes a resource. |
CmsFile |
exportResource(CmsObject cms,
CmsFile file)
Does the Linkmanagement when a resource will be exported. |
java.lang.String |
getLauncherClass()
Returns the name of the Java class loaded by the launcher. |
int |
getLauncherType()
Returns the launcher type needed for this resource-type. |
int |
getResourceType()
Returns the type of this resource-type. |
java.lang.String |
getResourceTypeName()
Returns the name for this resource-type. |
CmsResource |
importResource(CmsObject cms,
java.lang.String source,
java.lang.String destination,
java.lang.String type,
java.lang.String user,
java.lang.String group,
java.lang.String access,
long lastmodified,
java.util.Map properties,
java.lang.String launcherStartClass,
byte[] content,
java.lang.String importPath)
Does the Linkmanagement when a resource is imported. |
void |
init(int resourceType,
int launcherType,
java.lang.String resourceTypeName,
java.lang.String launcherClass)
init a new CmsResourceType object. |
void |
lockResource(CmsObject cms,
java.lang.String resource,
boolean force)
Locks a given resource. |
void |
moveResource(CmsObject cms,
java.lang.String source,
java.lang.String destination)
Moves a file to the given destination. |
void |
renameResource(CmsObject cms,
java.lang.String oldname,
java.lang.String newname)
Renames the file to the new name. |
void |
restoreResource(CmsObject cms,
int versionId,
java.lang.String filename)
Restores a file in the current project with a version in the backup |
void |
touch(CmsObject cms,
java.lang.String resourceName,
long timestamp,
boolean touchRecursive)
Change the timestamp of a resource. |
void |
undeleteResource(CmsObject cms,
java.lang.String filename)
Deletes a resource. |
void |
undoChanges(CmsObject cms,
java.lang.String filename)
Undo all changes in the resource, restore the online file. |
void |
unlockResource(CmsObject cms,
java.lang.String resource)
Unlocks a resource. |
| Method Detail |
init
public void init(int resourceType,
int launcherType,
java.lang.String resourceTypeName,
java.lang.String launcherClass)
- init a new CmsResourceType object.
getLauncherClass
public java.lang.String getLauncherClass()
- Returns the name of the Java class loaded by the launcher.
This method returns null if the default class for this type is used.
getLauncherType
public int getLauncherType()
- Returns the launcher type needed for this resource-type.
getResourceTypeName
public java.lang.String getResourceTypeName()
- Returns the name for this resource-type.
getResourceType
public int getResourceType()
- Returns the type of this resource-type.
chgrp
public void chgrp(CmsObject cms, java.lang.String filename, java.lang.String newGroup, boolean chRekursive) throws com.opencms.core.CmsException
- Changes the group of a resource.
Only the group of a resource in an offline project can be changed. The state of the resource is set to CHANGED (1). If the content of this resource is not existing in the offline project already, it is read from the online project and written into the offline project.Security: Access is granted, if:
- the user has access to the project
- the user is owner of the resource or is admin
- the resource is locked by the callingUser
chmod
public void chmod(CmsObject cms, java.lang.String filename, int flags, boolean chRekursive) throws com.opencms.core.CmsException
- Changes the flags of a resource.
Only the flags of a resource in an offline project can be changed. The state of the resource is set to CHANGED (1). If the content of this resource is not existing in the offline project already, it is read from the online project and written into the offline project. The user may change the flags, if he is admin of the resource.Security: Access is granted, if:
- the user has access to the project
- the user can write the resource
- the resource is locked by the callingUser
chown
public void chown(CmsObject cms, java.lang.String filename, java.lang.String newOwner, boolean chRekursive) throws com.opencms.core.CmsException
- Changes the owner of a resource.
Only the owner of a resource in an offline project can be changed. The state of the resource is set to CHANGED (1). If the content of this resource is not existing in the offline project already, it is read from the online project and written into the offline project. The user may change this, if he is admin of the resource.Security: Access is granted, if:
- the user has access to the project
- the user is owner of the resource or the user is admin
- the resource is locked by the callingUser
touch
public void touch(CmsObject cms, java.lang.String resourceName, long timestamp, boolean touchRecursive) throws com.opencms.core.CmsException
- Change the timestamp of a resource.
chtype
public void chtype(CmsObject cms, java.lang.String filename, java.lang.String newType) throws com.opencms.core.CmsException
- Changes the resourcetype of a resource.
Only the resourcetype of a resource in an offline project can be changed. The state of the resource is set to CHANGED (1). If the content of this resource is not exisiting in the offline project already, it is read from the online project and written into the offline project. The user may change this, if he is admin of the resource.Security: Access is granted, if:
- the user has access to the project
- the user is owner of the resource or is admin
- the resource is locked by the callingUser
copyResource
public void copyResource(CmsObject cms, java.lang.String source, java.lang.String destination, boolean keepFlags) throws com.opencms.core.CmsException
- Copies a Resource.
copyResourceToProject
public void copyResourceToProject(CmsObject cms, java.lang.String resourceName) throws com.opencms.core.CmsException
- Copies the resourcename to the current offline project
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
- Creates a new resource.
deleteResource
public void deleteResource(CmsObject cms, java.lang.String filename) throws com.opencms.core.CmsException
- Deletes a resource.
undeleteResource
public void undeleteResource(CmsObject cms, java.lang.String filename) throws com.opencms.core.CmsException
- Deletes a resource.
exportResource
public CmsFile exportResource(CmsObject cms, CmsFile file) throws com.opencms.core.CmsException
- Does the Linkmanagement when a resource will be exported.
When a resource has to be exported, the IDīs inside the
Linkmanagement-Tags have to be changed to the corresponding URLīs
importResource
public CmsResource importResource(CmsObject cms, java.lang.String source, java.lang.String destination, java.lang.String type, java.lang.String user, java.lang.String group, java.lang.String access, long lastmodified, java.util.Map properties, java.lang.String launcherStartClass, byte[] content, java.lang.String importPath) throws com.opencms.core.CmsException
- Does the Linkmanagement when a resource is imported.
When a resource has to be imported, the URLīs of the
Links inside the resources have to be saved and changed to the corresponding IDīs
lockResource
public void lockResource(CmsObject cms, java.lang.String resource, boolean force) throws com.opencms.core.CmsException
- Locks a given resource.
A user can lock a resource, so he is the only one who can write this resource.
moveResource
public void moveResource(CmsObject cms, java.lang.String source, java.lang.String destination) throws com.opencms.core.CmsException
- Moves a file to the given destination.
renameResource
public void renameResource(CmsObject cms, java.lang.String oldname, java.lang.String newname) throws com.opencms.core.CmsException
- Renames the file to the new name.
restoreResource
public void restoreResource(CmsObject cms, int versionId, java.lang.String filename) throws com.opencms.core.CmsException
- Restores a file in the current project with a version in the backup
undoChanges
public void undoChanges(CmsObject cms, java.lang.String filename) throws com.opencms.core.CmsException
- Undo all changes in the resource, restore the online file.
unlockResource
public void unlockResource(CmsObject cms, java.lang.String resource) throws com.opencms.core.CmsException
- Unlocks a resource.
A user can unlock a resource, so other users may lock this file.
changeLockedInProject
public void changeLockedInProject(CmsObject cms, int newProjectId, java.lang.String resourcename) throws com.opencms.core.CmsException
- Changes the project-id of the resource to the new project
for publishing the resource directly
|
|||||||||
| Home >> All >> com >> opencms >> [ file overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC