📄 i_cmsresourcebroker.java
字号:
* the values for the propertyinfos.
* @param launcherType The launcher type of the new resource
* @param launcherClassname The name of the launcherclass of the new resource
* @param ownername The name of the owner of the new resource
* @param groupname The name of the group of the new resource
* @param accessFlags The accessFlags of the new resource
* @param filecontent The content of the resource if it is of type file
*
* @return CmsResource The created resource.
*
* @throws CmsException will be thrown for missing propertyinfos, for worng propertydefs
* or if the filename is not valid. The CmsException will also be thrown, if the
* user has not the rights for this resource.
*/
public CmsResource importResource(CmsUser currentUser, CmsProject currentProject,
String newResourceName,
int resourceType, Map propertyinfos, int launcherType,
String launcherClassname,
String ownername, String groupname, int accessFlags,
long lastmodified, byte[] filecontent)
throws CmsException;
/**
* Creates a project.
*
* <B>Security</B>
* Only the users which are in the admin or projectleader-group are granted.
*
* Changed: added the parent id
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param name The name of the project to read.
* @param description The description for the new project.
* @param group the group to be set.
* @param managergroup the managergroup to be set.
* @param parentId the parent project
* @throws CmsException Throws CmsException if something goes wrong.
*/
public CmsProject createProject(CmsUser currentUser, CmsProject currentProject, String name, String description, String groupname, String managergroupname) throws com.opencms.core.CmsException;
/**
* Creates a project.
*
* <B>Security</B>
* Only the users which are in the admin or projectleader-group are granted.
*
* Changed: added the project type
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param name The name of the project to read.
* @param description The description for the new project.
* @param group the group to be set.
* @param managergroup the managergroup to be set.
* @param projecttype the project type (normal or temporary)
* @throws CmsException Throws CmsException if something goes wrong.
*/
public CmsProject createProject(CmsUser currentUser, CmsProject currentProject, String name, String description, String groupname, String managergroupname, int projecttype) throws com.opencms.core.CmsException;
/**
* Creates a new project for task handling.
*
* @param owner User who creates the project
* @param projectname Name of the project
* @param projectType Type of the Project
* @param role Usergroup for the project
* @param timeout Time when the Project must finished
* @param priority Priority for the Project
*
* @return The new task project
*
* @throws CmsException Throws CmsException if something goes wrong.
*/
public CmsTask createProject(CmsUser currentUser, String projectname, int projectType,
String roleName, long timeout,
int priority)
throws CmsException;
// Methods working with properties and propertydefinitions
/**
* Creates a project for the direct publish.
*
* <B>Security</B>
* Only the users which are in the admin or projectleader-group of the current project are granted.
*
* Changed: added the project type
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param name The name of the project to read.
* @param description The description for the new project.
* @param group the group to be set.
* @param managergroup the managergroup to be set.
* @param project type the type of the project
* @throws CmsException Throws CmsException if something goes wrong.
*/
public CmsProject createDirectPublishProject(CmsUser currentUser, CmsProject currentProject, String name, String description, String groupname, String managergroupname, int projecttype) throws CmsException;
/**
* Creates a project for the temporary files.
*
* <B>Security</B>
* Only the users which are in the admin or projectleader-group are granted.
*
* Changed: added the project type
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @throws CmsException Throws CmsException if something goes wrong.
*/
public CmsProject createTempfileProject(CmsObject cms, CmsUser currentUser, CmsProject currentProject) throws CmsException;
/**
* Creates the propertydefinition for the resource type.<BR/>
*
* <B>Security</B>
* Only the admin can do this.
*
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param name The name of the propertydefinition to overwrite.
* @param resourcetype The name of the resource-type for the propertydefinition.
*
* @throws CmsException Throws CmsException if something goes wrong.
*/
public CmsPropertydefinition createPropertydefinition(CmsUser currentUser,
CmsProject currentProject,
String name,
String resourcetype)
throws CmsException;
/**
* Creates a new task.
*
* <B>Security:</B>
* All users are granted.
*
* @param currentUser The user who requested this method.
* @param projectid The Id of the current project task of the user.
* @param agentname User who will edit the task
* @param rolename Usergroup for the task
* @param taskname Name of the task
* @param tasktype Type of the task
* @param taskcomment Description of the task
* @param timeout Time when the task must finished
* @param priority Id for the priority
*
* @return A new Task Object
*
* @throws CmsException Throws CmsException if something goes wrong.
*/
public CmsTask createTask(CmsUser currentUser, int projectid, String agentName, String roleName,
String taskname, String taskcomment, int tasktype,
long timeout, int priority)
throws CmsException;
/**
* Creates a new task.
*
* <B>Security:</B>
* All users are granted.
*
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param agent User who will edit the task
* @param role Usergroup for the task
* @param taskname Name of the task
* @param taskcomment Description of the task
* @param timeout Time when the task must finished
* @param priority Id for the priority
*
* @return A new Task Object
*
* @throws CmsException Throws CmsException if something goes wrong.
*/
public CmsTask createTask(CmsUser currentUser, CmsProject currentProject,
String agentName, String roleName,
String taskname, String taskcomment,
long timeout, int priority)
throws CmsException;
/**
* Deletes all propertyinformation for a file or folder.
*
* <B>Security</B>
* Only the user is granted, who has the right to write the resource.
*
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param resource The name of the resource of which the propertyinformations
* have to be deleted.
*
* @throws CmsException Throws CmsException if operation was not succesful
*/
public void deleteAllProperties(CmsUser currentUser,
CmsProject currentProject,
String resource)
throws CmsException;
/**
* Deletes a file in the Cms.<br>
*
* A file can only be deleteed in an offline project.
* A file is deleted by setting its state to DELETED (3). <br>
*
*
* <B>Security:</B>
* Access is granted, if:
* <ul>
* <li>the user has access to the project</li>
* <li>the user can write the resource</li>
* <li>the resource is locked by the callinUser</li>
* </ul>
*
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param filename The complete path of the file.
*
* @throws CmsException Throws CmsException if operation was not succesful.
*/
public void deleteFile(CmsUser currentUser, CmsProject currentProject,
String filename)
throws CmsException;
/**
* Deletes a folder in the Cms.<br>
*
* Only folders in an offline Project can be deleted. A folder is deleted by
* setting its state to DELETED (3). <br>
*
* In its current implmentation, this method can ONLY delete empty folders.
*
* <B>Security:</B>
* Access is granted, if:
* <ul>
* <li>the user has access to the project</li>
* <li>the user can read and write this resource and all subresources</li>
* <li>the resource is not locked</li>
* </ul>
*
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param foldername The complete path of the folder.
*
* @throws CmsException Throws CmsException if operation was not succesful.
*/
public void deleteFolder(CmsUser currentUser, CmsProject currentProject,
String foldername)
throws CmsException;
/**
* Undeletes a resource in the Cms.<br>
*
* A resource can only be undeleted in an offline project.
* A resource is undeleted by setting its state to CHANGED (1). <br>
*
*
* <B>Security:</B>
* Access is granted, if:
* <ul>
* <li>the user has access to the project</li>
* <li>the user can write the resource</li>
* <li>the resource is locked by the callinUser</li>
* </ul>
*
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param filename The complete path of the resource.
*
* @throws CmsException Throws CmsException if operation was not succesful.
*/
public void undeleteResource(CmsUser currentUser, CmsProject currentProject,
String filename)
throws CmsException;
/**
* Delete a group from the Cms.<BR/>
* Only groups that contain no subgroups can be deleted.
*
* Only the admin can do this.<P/>
*
* <B>Security:</B>
* Only users, which are in the group "administrators" are granted.
*
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param delgroup The name of the group that is to be deleted.
* @throws CmsException Throws CmsException if operation was not succesfull.
*/
public void deleteGroup(CmsUser currentUser, CmsProject currentProject,
String delgroup)
throws CmsException;
/**
* Deletes a project.
*
* <B>Security</B>
* Only the admin or the owner of the project can do this.
*
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param id The id of the project to be published.
*
* @throws CmsException Throws CmsException if something goes wrong.
*/
public void deleteProject(CmsUser currentUser, CmsProject currentProject,
int id)
throws CmsException;
/**
* Deletes a propertyinformation for a file or folder.
*
* <B>Security</B>
* Only the user is granted, who has the right to write the resource.
*
* @param currentUser The user who requested this method.
* @param currentProject The current project of the user.
* @param resource The name of the resource of which the propertyinformation
* has to be read.
* @param property The propertydefinition-name of which the propertyinformation has to be set.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -