|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Defines of all methods that a specific resource type has to implement.
| Method Summary | |
void |
changeLockedInProject(CmsObject cms,
int newProjectId,
String resourcename)
Changes the project-id of the resource to the new project for publishing the resource directly |
void |
chgrp(CmsObject cms,
String filename,
String newGroup,
boolean chRekursive)
Changes the group of a resource. |
void |
chmod(CmsObject cms,
String filename,
int flags,
boolean chRekursive)
Changes the flags of a resource. |
void |
chown(CmsObject cms,
String filename,
String newOwner,
boolean chRekursive)
Changes the owner of a resource. |
void |
chtype(CmsObject cms,
String filename,
String newType)
Changes the resourcetype of a resource. |
void |
copyResource(CmsObject cms,
String source,
String destination,
boolean keepFlags)
Copies a Resource. |
void |
copyResourceToProject(CmsObject cms,
String resourceName)
Copies the resourcename to the current offline project |
CmsResource |
createResource(CmsObject cms,
String newResourceName,
Map properties,
byte[] contents,
Object parameter)
Creates a new resource. |
void |
deleteResource(CmsObject cms,
String filename)
Deletes a resource. |
CmsFile |
exportResource(CmsObject cms,
CmsFile file)
Does the Linkmanagement when a resource will be exported. |
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. |
String |
getResourceTypeName()
Returns the name for this resource-type. |
CmsResource |
importResource(CmsObject cms,
String source,
String destination,
String type,
String user,
String group,
String access,
long lastmodified,
Map properties,
String launcherStartClass,
byte[] content,
String importPath)
Does the Linkmanagement when a resource is imported. |
void |
init(int resourceType,
int launcherType,
String resourceTypeName,
String launcherClass)
init a new CmsResourceType object. |
void |
lockResource(CmsObject cms,
String resource,
boolean force)
Locks a given resource. |
void |
moveResource(CmsObject cms,
String source,
String destination)
Moves a file to the given destination. |
void |
renameResource(CmsObject cms,
String oldname,
String newname)
Renames the file to the new name. |
void |
restoreResource(CmsObject cms,
int versionId,
String filename)
Restores a file in the current project with a version in the backup |
void |
touch(CmsObject cms,
String resourceName,
long timestamp,
boolean touchRecursive)
Change the timestamp of a resource. |
void |
undeleteResource(CmsObject cms,
String filename)
Deletes a resource. |
void |
undoChanges(CmsObject cms,
String filename)
Undo all changes in the resource, restore the online file. |
void |
unlockResource(CmsObject cms,
String resource)
Unlocks a resource. |
| Method Detail |
public void init(int resourceType,
int launcherType,
String resourceTypeName,
String launcherClass)
resourceType - The id of the resource type.launcherType - The id of the required launcher.resourceTypeName - The printable name of the resource type.launcherClass - The Java class that should be invoked by the launcher.
This value is null if the default invokation class should be used.public String getLauncherClass()
public int getLauncherType()
public String getResourceTypeName()
public int getResourceType()
public void chgrp(CmsObject cms,
String filename,
String newGroup,
boolean chRekursive)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newGroup - the name of the new group for this resource.chRekursive - shows if the subResources (of a folder) should be changed too.
CmsException - if operation was not successful.
public void chmod(CmsObject cms,
String filename,
int flags,
boolean chRekursive)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.flags - the new flags for the resource.chRekursive - shows if the subResources (of a folder) should be changed too.
CmsException - if operation was not successful.
for this resource.
public void chown(CmsObject cms,
String filename,
String newOwner,
boolean chRekursive)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newOwner - the name of the new owner for this resource.chRekursive - shows if the subResources (of a folder) should be changed too.
CmsException - if operation was not successful.
public void touch(CmsObject cms,
String resourceName,
long timestamp,
boolean touchRecursive)
throws CmsException
resourceName - the name of the resource to changetimestamp - timestamp the new timestamp of the changed resource
CmsException
public void chtype(CmsObject cms,
String filename,
String newType)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newType - the name of the new resourcetype for this resource.
CmsException - if operation was not successful.
public void copyResource(CmsObject cms,
String source,
String destination,
boolean keepFlags)
throws CmsException
source - the complete path of the sourcefile.destination - the complete path of the destinationfolder.keepFlags - true if the copy should keep the source file's flags,
false if the copy should get the user's default flags.
CmsException - if the file couldn't be copied, or the user
has not the appropriate rights to copy the file.
public void copyResourceToProject(CmsObject cms,
String resourceName)
throws CmsException
cms - The CmsObjectresourceName - The name of the resource
CmsException - if operation was not successful.
public CmsResource createResource(CmsObject cms,
String newResourceName,
Map properties,
byte[] contents,
Object parameter)
throws CmsException
contents - the contents of the new file.
CmsFile object representing the newly created file.
CmsException - if the resourcetype is set to folder. The CmsException is also thrown, if the
filename is not valid or if the user has not the appropriate rights to create a new file.
public void deleteResource(CmsObject cms,
String filename)
throws CmsException
filename - the complete path of the file.
CmsException - if the file couldn't be deleted, or if the user
has not the appropriate rights to delete the file.
public void undeleteResource(CmsObject cms,
String filename)
throws CmsException
filename - the complete path of the file.
CmsException - if the file couldn't be deleted, or if the user
has not the appropriate rights to delete the file.
public CmsFile exportResource(CmsObject cms,
CmsFile file)
throws CmsException
file - is the file that has to be changed
CmsException
public CmsResource importResource(CmsObject cms,
String source,
String destination,
String type,
String user,
String group,
String access,
long lastmodified,
Map properties,
String launcherStartClass,
byte[] content,
String importPath)
throws CmsException
CmsException
public void lockResource(CmsObject cms,
String resource,
boolean force)
throws CmsException
resource - the complete path to the resource to lock.force - if force is true, a existing locking will be overwritten.
CmsException - if the user has not the rights to lock this resource.
It will also be thrown, if there is a existing lock and force was set to false.
public void moveResource(CmsObject cms,
String source,
String destination)
throws CmsException
source - the complete path of the sourcefile.destination - the complete path of the destinationfile.
CmsException - if the user has not the rights to move this resource,
or if the file couldn't be moved.
public void renameResource(CmsObject cms,
String oldname,
String newname)
throws CmsException
oldname - the complete path to the file which will be renamed.newname - the new name of the file.
CmsException - if the user has not the rights
to rename the file, or if the file couldn't be renamed.
public void restoreResource(CmsObject cms,
int versionId,
String filename)
throws CmsException
cms - The CmsObjectversionId - The version id of the resourcefilename - The name of the file to restore
CmsException - Throws CmsException if operation was not succesful.
public void undoChanges(CmsObject cms,
String filename)
throws CmsException
CmsException - Throws CmsException if something goes wrong.
public void unlockResource(CmsObject cms,
String resource)
throws CmsException
resource - the complete path to the resource to be unlocked.
CmsException - if the user has not the rights
to unlock this resource.
public void changeLockedInProject(CmsObject cms,
int newProjectId,
String resourcename)
throws CmsException
newProjectId - The Id of the new projectresourcename - The name of the resource to change
CmsException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||