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

📄 cmsobject.java

📁 内容管理
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
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.
 *
 * @throws 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.
 *
 * @throws 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.
 *
 * @throws 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.
 *
 * @throws 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.
 *
 * @throws 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.
 *
 * @throws 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.
 * @throws 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.
 *
 * @throws 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.
 *
 * @throws CmsException if operation was not successful.
 */
public void exportResources(String exportFile, String[] exportPaths) throws CmsException {
    // export the resources
    m_rb.exportResources(m_context.currentUser(), m_context.currentProject(), exportFile, exportPaths, this);
}
/**
 * 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.
 * @param includeSystem indicates if the system resources will be included in the export.
 * @param excludeUnchanged <code>true</code>, if unchanged files should be excluded.
 *
 * @throws CmsException if operation was not successful.
 */
public void exportResources(String exportFile, String[] exportPaths, boolean includeSystem, boolean excludeUnchanged) throws CmsException {
    // export the resources
    m_rb.exportResources(m_context.currentUser(), m_context.currentProject(), exportFile, exportPaths, this, includeSystem, excludeUnchanged);
}

/**
 * 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.
 * @param includeSystem indicates if the system resources will be included in the export.
 * @param excludeUnchanged <code>true</code>, if unchanged files should be excluded.
 * @param report the cmsReport to handle the log messages.
 *
 * @throws CmsException if operation was not successful.
 */
public void exportResources(String exportFile, String[] exportPaths, boolean includeSystem, boolean excludeUnchanged, boolean exportUserdata, long contentAge, I_CmsReport report) throws CmsException {
    // export the resources
    m_rb.exportResources(m_context.currentUser(), m_context.currentProject(), exportFile, exportPaths, this, includeSystem, excludeUnchanged, exportUserdata, contentAge, report);
}
/**
 * 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.
 * @param includeSystem indicates if the system resources will be included in the export.
 * @param excludeUnchanged <code>true</code>, if unchanged files should be excluded.
 *
 * @throws CmsException if operation was not successful.
 */
public void exportResources(String exportFile, String[] exportPaths, boolean includeSystem, boolean excludeUnchanged, boolean exportUserdata) throws CmsException {
    // call the export with the standard report object.
    exportResources(exportFile, exportPaths, includeSystem, excludeUnchanged, exportUserdata, 0, new CmsShellReport());
}

/**
 * Exports a resource.
 */
public CmsFile exportResource(CmsFile file) throws CmsException {
    I_CmsResourceType rt = getResourceType(file.getType());
    return rt.exportResource(this, file);
}

    /**
     * Exports channels and moduledata to zip.
     *
     * <B>Security:</B>
     * only Administrators can do this;
     *
     * @param currentUser user who requestd themethod
     * @param currentProject current project of the user
     * @param exportFile the name (absolute Path) of the export resource (zip)
     * @param exportChannels the names (absolute Path) of channels from which should be exported
     * @param exportModules the names of modules from which should be exported
     * @param cms the cms-object to use for the export.
     *
     * @throws Throws CmsException if something goes wrong.
     */
    public void exportModuledata(String exportFile, String[] exportChannels, String[] exportModules, I_CmsReport report) throws CmsException {
        m_rb.exportModuledata(m_context.currentUser(), m_context.currentProject(), exportFile, exportChannels, exportModules, this, report);
    }

/**
 * Creates a static export in the filesystem
 *
 * @param startpoints the startpoints for the export.
 * @param projectResources
 * @param allExportedLinks
 * @param changedResources
 * @param report the cmsReport to handle the log messages.
 *
 * @throws CmsException if operation was not successful.
 */
public void exportStaticResources(Vector startpoints, Vector projectResources, Vector allExportedLinks,
            CmsPublishedResources changedResources, I_CmsReport report) throws CmsException {

    m_rb.exportStaticResources(m_context.currentUser(), m_context.currentProject(),
             this, startpoints, projectResources, allExportedLinks, changedResources, report);
}

/**
 * Creates a static export in the filesystem. This method is used only
 * on a slave system in a cluster. The Vector is generated in the static export
 * on the master system (in the Vector allExportdLinks), so in this method the
 * database must not be updated.
 *
 * @param linksToExport all links that where exported by the master OpenCms.
 *
 * @throws CmsException if operation was not successful.
 */
public void exportStaticResources(Vector linksToExport) throws CmsException {

    m_rb.exportStaticResources(m_context.currentUser(), m_context.currentProject(),
             this, linksToExport);
}

/**
 * Creates a special CmsObject for the static export.
 *
 * @param .
 * @throws CmsException if operation was not successful.
 */
public CmsObject getCmsObjectForStaticExport(CmsExportRequest dReq, CmsExportResponse dRes) throws CmsException{

    CmsObject cmsForStaticExport = new CmsObject();
    cmsForStaticExport.init(m_rb, dReq, dRes, C_USER_GUEST,
                             C_GROUP_GUEST, C_PROJECT_ONLINE_ID, false, new CmsElementCache(), null, m_context.getDirectoryTranslator(), m_context.getFileTranslator());
    cmsForStaticExport.setLauncherManager(getLauncherManager());
    return cmsForStaticExport;
}

/**
 * Forwards a task to a new user.
 *
 * @param taskid the id of the task which will be forwarded.
 * @param newRole the new group for the task.
 * @param newUser the new user who gets the task.
 *
 * @throws CmsException if operation was not successful.
 */
public void forwardTask(int taskid, String newRoleName, String newUserName) throws CmsException {
    m_rb.forwardTask(m_context.currentUser(), m_context.currentProject(), taskid, newRoleName, newUserName);
}
/**
 * Returns all projects, which the current user can access.
 *
 * @return a Vector of objects of type <code>CmsProject</code>.
 *
 * @throws CmsException if operation was not successful.
 */
public Vector getAllAccessibleProjects() throws CmsException {
    return (m_rb.getAllAccessibleProjects(m_context.currentUser(), m_context.currentProject()));
}
/**
 * Returns all projects which are owned by the current user or which are manageable
 * for the group of the user.
 *
 * @return a Vector of objects of type <code>CmsProject</code>.
 *
 * @throws CmsException if operation was not successful.
 */
public Vector getAllManageableProjects() throws CmsException {
    return (m_rb.getAllManageableProjects(m_context.currentUser(), m_context.currentProject()));
}

/**
* Returns a Vector with all projects from history
*
* @return Vector with all projects from history.
*
* @throws CmsException  Throws CmsException if operation was not succesful.
*/
public Vector getAllBackupProjects() throws CmsException {
    return m_rb.getAllBackupProjects();
}

/**
 * Returns a Vector with all export links
 *
 * @return Vector (Strings) with all export links.
 *
 * @throws CmsException  Throws CmsException if operation was not succesful.
 */
 public Vector getAllExportLinks() throws CmsException{
    return m_rb.getAllExportLinks();
 }
/**
 * Returns a Hashtable with all I_CmsResourceTypes.
 *
 * @return returns a Vector with all I_CmsResourceTypes.
 *
 * @throws CmsException if operation was not successful.
 */
public Hashtable getAllResourceTypes() throws CmsException {
    return (m_rb.getAllResourceTypes(m_context.currentUser(), m_context.currentProject()));
}

/**
* Gets information about the cache size.
* <br>
* The size of the following caching areas is returned:
* <ul>
*  <li>GroupCache</li>
*  <li>UserGroupCache</li>
*  <li>ResourceCache</li>
*  <li>SubResourceCache</li>
*  <li>ProjectCache</li>
*  <li>PropertyCache</li>
*  <li>PropertyDefinitionCache</li>
*  <li>PropertyDefinitionVectorCache</li>
* </ul>
* @return a Hashtable with information about the size of the various cache areas.
*/
public Hashtable getCacheInfo() {
    return m_rb.getCacheInfo();
}
/**
 * Returns all child groups of a group.
 *
 * @param groupname the name of the group.
 * @return groups a Vector of all child groups or null.
 * @throws CmsException if operation was not successful.
 */
public Vector getChild(String groupname) throws CmsException {
    return (m_rb.getChild(m_context.currentUser(), m_context.currentProject(), groupname));
}
/**
 * Returns all child groups of a group.
 * <br>
 * This method also returns all sub-child groups of the current group.
 *
 * @param groupname the name of the group.
 * @return groups a Vector of all child groups or null.
 * @throws CmsException if operation was not successful.
 */
public Vector getChilds(String groupname) throws CmsException {
    return (m_rb.getChilds(m_context.currentUser(), m_context.currentProject(), groupname));
}
/**
 * Gets the configurations of

⌨️ 快捷键说明

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