⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmsobject.java

📁 java 编写的程序
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
 *
 * @param name the name of the project to read.
 * @param description the description for the new project.
 * @param groupname the name of the group to be set.
 * @param managergroupname the name of the managergroup to be set.
 * @param projecttype the type of the project (normal or temporary)
 *
 * @exception CmsException if operation was not successful.
 */
public CmsProject createProject(String name, String description, String groupname, String managergroupname, int projecttype) throws CmsException
{
    CmsProject newProject = m_rb.createProject(m_context.currentUser(), m_context.currentProject(), name, description, groupname, managergroupname, projecttype);
    return (newProject);
}

/**
 * Creates a new project for the temporary files.
 *
 * @exception CmsException if operation was not successful.
 */
public CmsProject createTempfileProject() throws CmsException
{
    CmsProject newProject = m_rb.createTempfileProject(this, m_context.currentUser(), m_context.currentProject());
    return (newProject);
}

/**
 * Creates the property-definition for a resource type.
 *
 * @param name the name of the property-definition to overwrite.
 * @param resourcetype the name of the resource-type for the property-definition.
 * @param type the type of the property-definition (normal|optional)
 *
 * @exception CmsException if operation was not successful.
 * @deprecated Use createPropertydefinition without type of propertydefinition instead.
 */
public CmsPropertydefinition createPropertydefinition(String name, String resourcetype, int type) throws CmsException {
    return createPropertydefinition(name, resourcetype);
}

/**
 * Creates the property-definition for a resource type.
 *
 * @param name the name of the property-definition to overwrite.
 * @param resourcetype the name of the resource-type for the property-definition.
 *
 * @exception CmsException if operation was not successful.
 */
public CmsPropertydefinition createPropertydefinition(String name, String resourcetype) throws CmsException {
    return (m_rb.createPropertydefinition(m_context.currentUser(), m_context.currentProject(), name, resourcetype));
}

/**
  * Creates a new task.
  * <p>
  * <B>Security:</B>
  * All users can create a new task.
  *
  * @param projectid the Id of the current project task of the user.
  * @param agentname the User who will edit the task.
  * @param rolename a Usergroup for the task.
  * @param taskname a Name of the task.
  * @param tasktype the type of the task.
  * @param taskcomment a description of the task.
  * @param timeout the time when the task must finished.
  * @param priority the Id for the priority of the task.
  *
  * @return a <code>CmsTask</code> object representing the newly created task.
  *
  * @exception CmsException Throws CmsException if something goes wrong.
  */
public CmsTask createTask(int projectid, String agentName, String roleName, String taskname, String taskcomment, int tasktype, long timeout, int priority) throws CmsException {
    return m_rb.createTask(m_context.currentUser(), projectid, agentName, roleName, taskname, taskcomment, tasktype, timeout, priority);
}
/**
  * Creates a new task.
  * <p>
  * <B>Security:</B>
  * All users can create a new task.
  * @param agent the User who will edit the task.
  * @param role a Usergroup for the task.
  * @param taskname the name of the task.
  * @param taskcomment a description of the task.
  * @param timeout the time when the task must finished.
  * @param priority the Id for the priority of the task.
  *
  * @return a <code>CmsTask</code> object representing the newly created task.
  *
  * @exception CmsException if operation was not successful.
  */
public CmsTask createTask(String agentName, String roleName, String taskname, String taskcomment, long timeout, int priority) throws CmsException {
    return (m_rb.createTask(m_context.currentUser(), m_context.currentProject(), agentName, roleName, taskname, taskcomment, timeout, priority));
}
/**
 * Deletes all properties for a file or folder.
 *
 * @param resourcename the name of the resource for which all properties should be deleted.
 *
 * @exception CmsException if operation was not successful.
 */
public void deleteAllProperties(String resourcename) throws CmsException {
    m_rb.deleteAllProperties(m_context.currentUser(), m_context.currentProject(), getSiteRoot(resourcename));
}
/**
 * Deletes a file.
 *
 * @param filename the complete path of the file.
 *
 * @exception CmsException if the file couldn't be deleted, or if the user
 * has not the appropriate rights to delete the file.
 *
 * @deprecated Use deleteResource instead.
 */
public void deleteFile(String filename) throws CmsException {
    deleteResource(filename);
}
/**
 * Deletes a folder.
 * <br>
 * This is a very complex operation, because all sub-resources may be
 * deleted too.
 *
 * @param foldername the complete path of the folder.
 *
 * @exception CmsException if the folder couldn't be deleted, or if the user
 * has not the rights to delete this folder.
 *
 * @deprecated Use deleteResource instead.
 */
public void deleteFolder(String foldername) throws CmsException {
    deleteResource(foldername);
}

/**
 * Deletes a folder.
 * <br>
 * This is a very complex operation, because all sub-resources may be
 * deleted too.
 *
 * @param foldername the complete path of the folder.
 *
 * @exception CmsException if the folder couldn't be deleted, or if the user
 * has not the rights to delete this folder.
 *
 */
public void deleteEmptyFolder(String foldername) throws CmsException {
    m_rb.deleteFolder(m_context.currentUser(), m_context.currentProject(), getSiteRoot(foldername));
}

/**
 * Deletes a resource.
 *
 * @param filename the complete path of the file.
 *
 * @exception CmsException if the file couldn't be deleted, or if the user
 * has not the appropriate rights to delete the file.
 */
public void deleteResource(String filename) throws CmsException {
    CmsResource res = readFileHeader(filename);
    I_CmsResourceType rt = getResourceType(res.getType());
    rt.deleteResource(this, filename);
}

/**
 * Deletes a file.
 *
 * @param filename the complete path of the file.
 *
 * @exception CmsException if the file couldn't be deleted, or if the user
 * has not the appropriate rights to delete the file.
 */
protected void doDeleteFile(String filename) throws CmsException {
    m_rb.deleteFile(m_context.currentUser(), m_context.currentProject(), getSiteRoot(filename));
}

/**
 * Deletes a folder.
 * <br>
 * This is a very complex operation, because all sub-resources may be
 * deleted too.
 *
 * @param foldername the complete path of the folder.
 *
 * @exception CmsException if the folder couldn't be deleted, or if the user
 * has not the rights to delete this folder.
 */
protected void doDeleteFolder(String foldername) throws CmsException {
    m_rb.deleteFolder(m_context.currentUser(), m_context.currentProject(), getSiteRoot(foldername));
}

/**
 * Undeletes a resource.
 *
 * @param filename the complete path of the file.
 *
 * @exception CmsException if the file couldn't be undeleted, or if the user
 * has not the appropriate rights to undelete the file.
 */
public void undeleteResource(String filename) throws CmsException {
    //read the file header including deleted
    CmsResource res = m_rb.readFileHeader(m_context.currentUser(), m_context.currentProject(), getSiteRoot(filename), true);
    I_CmsResourceType rt = getResourceType(res.getType());
    rt.undeleteResource(this, filename);
}

/**
 * Undeletes a file.
 *
 * @param filename the complete path of the file.
 *
 * @exception CmsException if the file couldn't be undeleted, or if the user
 * has not the appropriate rights to undelete the file.
 */
protected void doUndeleteFile(String filename) throws CmsException {
    m_rb.undeleteResource(m_context.currentUser(), m_context.currentProject(), getSiteRoot(filename));
}

/**
 * Undeletes a folder.
 * <br>
 * This is a very complex operation, because all sub-resources may be
 * undeleted too.
 *
 * @param foldername the complete path of the folder.
 *
 * @exception CmsException if the folder couldn't be undeleted, or if the user
 * has not the rights to undelete this folder.
 */
protected void doUndeleteFolder(String foldername) throws CmsException {
    m_rb.undeleteResource(m_context.currentUser(), m_context.currentProject(), getSiteRoot(foldername));
}

/**
 * Deletes a group.
 * <p>
 * <b>Security:</b>
 * Only the admin user is allowed to delete a group.
 *
 * @param delgroup the name of the group.
 * @exception CmsException  if operation was not successful.
 */
public void deleteGroup(String delgroup) throws CmsException {
    m_rb.deleteGroup(m_context.currentUser(), m_context.currentProject(), delgroup);
}
/**
 * Deletes a project.
 *
 * @param id the id of the project.
 *
 * @exception CmsException if operation was not successful.
 */
public void deleteProject(int id) throws CmsException {
    m_rb.deleteProject(m_context.currentUser(), m_context.currentProject(), id);
}
/**
 * Deletes a property for a file or folder.
 *
 * @param resourcename the name of a resource for which the property should be deleted.
 * @param property the name of the property.
 *
 * @exception CmsException Throws if operation was not successful.
 */
public void deleteProperty(String resourcename, String property) throws CmsException {
    m_rb.deleteProperty(m_context.currentUser(), m_context.currentProject(), getSiteRoot(resourcename), property);
}
/**
 * Deletes the property-definition for a resource type.
 *
 * @param name the name of the property-definition to delete.
 * @param resourcetype the name of the resource-type for the property-definition.
 *
 * @exception CmsException if operation was not successful.
 */
public void deletePropertydefinition(String name, String resourcetype) throws CmsException {
    m_rb.deletePropertydefinition(m_context.currentUser(), m_context.currentProject(), name, resourcetype);
}
/**
 * Deletes a user from the Cms.
 * <p>
 * <b>Security:</b>
 * Only a admin user is allowed to delete a user.
 *
 * @param name the Id of the user to be deleted.
 *
 * @exception CmsException if operation was not successful.
 */
public void deleteUser(int userId) throws CmsException {
    m_rb.deleteUser(m_context.currentUser(), m_context.currentProject(), userId);
}
/**
 * Deletes a user from the Cms.
 * <p>
 * <b>Security:</b>
 * Only a admin user is allowed to delete a user.
 *
 * @param name the name of the user to be deleted.
 *
 * @exception CmsException if operation was not successful.
 */
public void deleteUser(String username) throws CmsException {
    m_rb.deleteUser(m_context.currentUser(), m_context.currentProject(), username);
}
/**
 * Deletes a web user from the Cms.
 *
 * @param name the id of the user to be deleted.
 *
 * @exception CmsException if operation was not successful.
 */
public void deleteWebUser(int userId) throws CmsException {
    m_rb.deleteWebUser(m_context.currentUser(), m_context.currentProject(), userId);
}
/**
 * Destroys the resource borker and required modules and connections.
 * @exception CmsException if operation was not successful.
 */
public void destroy() throws CmsException {
    m_rb.destroy();
}
/**
 * Ends a task of the Cms.
 *
 * @param taskid the ID of the task to end.
 *
 * @exception CmsException if operation was not successful.
 */
public void endTask(int taskid) throws CmsException {
    m_rb.endTask(m_context.currentUser(), m_context.currentProject(), taskid);
}
/**
 * Exports cms-resources to a zip-file.
 *
 * @param exportFile the name (absolute Path) of the export resource (zip-file).
 * @param exportPath the name (absolute Path) of folder from which should be exported.
 *
 * @exception CmsException if operation was not successful.
 */
public void exportResources(String exportFile, String[] exportPaths) throws CmsException {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -