亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cmsresourcebroker.java

?? java 編寫的程序
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
 * All users are granted.
 *
 * @param currentUser The user who requested this method.
 * @param currentProject The current project of the user.
 * @param username The name of the user.
 * @return Vector of groups
 * @exception CmsException Throws CmsException if operation was not succesful
 */
public Vector getGroupsOfUser(CmsUser currentUser, CmsProject currentProject, String username) throws CmsException {
    com.opencms.file.oracleplsql.CmsDbAccess dbAccess = (com.opencms.file.oracleplsql.CmsDbAccess) m_dbAccess;

    Vector allGroups = (Vector) m_usergroupsCache.get(C_USER + username);
    if ((allGroups == null) || (allGroups.size() == 0)) {
        Vector groups = dbAccess.getAllGroupsOfUser(username);
        m_usergroupsCache.put(C_USER + username, groups);
        return groups;
    }
    return allGroups;
}
/**
 * Returns a list of users in a group.<P/>
 *
 * <B>Security:</B>
 * All users are granted, except the anonymous user.
 *
 * @param currentUser The user who requested this method.
 * @param currentProject The current project of the user.
 * @param groupname The name of the group to list users from.
 * @return Vector of users.
 * @exception CmsException Throws CmsException if operation was not succesful.
 */
public Vector getUsersOfGroup(CmsUser currentUser, CmsProject currentProject, String groupname) throws CmsException {
    com.opencms.file.oracleplsql.CmsDbAccess dbAccess = (com.opencms.file.oracleplsql.CmsDbAccess) m_dbAccess;

    // check the security
    if (!anonymousUser(currentUser, currentProject).equals(currentUser)) {
        return dbAccess.getUsersOfGroup(currentUser, groupname, C_USER_TYPE_SYSTEMUSER);
    } else {
        throw new CmsException("[" + this.getClass().getName() + "] " + groupname, CmsException.C_NO_ACCESS);
    }
}
    /**
     * Initializes the resource broker and sets up all required modules and connections.
     * @param config The OpenCms configuration.
     * @exception CmsException Throws CmsException if something goes wrong.
     */
    public void init(Configurations config) throws CmsException {
        super.init(config);
    }
/**
 * Determines, if the users may manage a project.<BR/>
 * Only the manager of a project may publish it.
 *
 * <B>Security:</B>
 * All users are granted.
 *
 * @param currentUser The user who requested this method.
 * @param currentProject The current project of the user.
 * @return true, if the may manage this project.
 * @exception CmsException Throws CmsException if operation was not succesful.
 */
public boolean isManagerOfProject(CmsUser currentUser, CmsProject currentProject) throws CmsException {
    com.opencms.file.oracleplsql.CmsDbAccess dbAccess = (com.opencms.file.oracleplsql.CmsDbAccess) m_dbAccess;
    return (dbAccess.isManagerOfProject(currentUser, currentProject));
}
/**
 * Locks a resource.<br>
 *
 * Only a resource in an offline project can be locked. 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.
 * A user can lock a resource, so he is the only one who can write this
 * resource. <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 not locked by another user</li>
 * </ul>
 *
 * @param currentUser The user who requested this method.
 * @param currentProject The current project of the user.
 * @param resource The complete path to the resource to lock.
 * @param force If force is true, a existing locking will be oberwritten.
 *
 * @exception CmsException  Throws CmsException if operation was not succesful.
 * It will also be thrown, if there is a existing lock
 * and force was set to false.
 */
public void lockResource(CmsUser currentUser, CmsProject currentProject, String resourcename, boolean force) throws CmsException {
    CmsResource cmsResource = null;
    CmsFolder cmsFolder = null;
    CmsFile cmsFile = null;
    com.opencms.file.oracleplsql.CmsDbAccess dbAccess = (com.opencms.file.oracleplsql.CmsDbAccess) m_dbAccess;
    Vector resources = dbAccess.lockResource(currentUser, currentProject, resourcename, force);

    for (int i = 0; i < resources.size(); i++) {
        cmsResource = (CmsResource) resources.elementAt(i);
        String resourceName = cmsResource.getResourceName();
        if (resourceName.endsWith("/")) {
            cmsFolder = new CmsFolder(cmsResource.getResourceId(), cmsResource.getParentId(),
                                    cmsResource.getFileId(), resourceName, cmsResource.getType(),
                                    cmsResource.getFlags(), cmsResource.getOwnerId(), cmsResource.getGroupId(),
                                    cmsResource.getProjectId(), cmsResource.getAccessFlags(),
                                    cmsResource.getState(), cmsResource.isLockedBy(), cmsResource.getDateCreated(),
                                    cmsResource.getDateLastModified(), cmsResource.getResourceLastModifiedBy(),
                                    cmsResource.getProjectId());

        } else {
            cmsFile = new CmsFile(cmsResource.getResourceId(), cmsResource.getParentId(),
                                    cmsResource.getFileId(), resourceName, cmsResource.getType(),
                                    cmsResource.getFlags(), cmsResource.getOwnerId(), cmsResource.getGroupId(),
                                    cmsResource.getProjectId(), cmsResource.getAccessFlags(),
                                    cmsResource.getState(), cmsResource.isLockedBy(), cmsResource.getLauncherType(),
                                    cmsResource.getLauncherClassname(), cmsResource.getDateCreated(),
                                    cmsResource.getDateLastModified(), cmsResource.getResourceLastModifiedBy(),
                                    new byte[0], cmsResource.getLength(),cmsResource.getProjectId());

        }
        m_resourceCache.remove(resourceName);
    }
    m_subresCache.clear();
}

/**
 * Unocks a resource.<br>
 *
 * Only a resource in an offline project can be unlocked. 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.
 * A user can unlock a resource, so he is the only one who can write this
 * resource. <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 current user</li>
 * </ul>
 *
 * @param currentUser The user who requested this method.
 * @param currentProject The current project of the user.
 * @param resource The complete path to the resource to unlock.
 *
 * @exception CmsException  Throws CmsException if operation was not succesful.
 */
public void unlockResource(CmsUser currentUser, CmsProject currentProject, String resourcename) throws CmsException {

    CmsResource cmsResource = null;
    CmsFolder cmsFolder = null;
    CmsFile cmsFile = null;
    com.opencms.file.oracleplsql.CmsDbAccess dbAccess = (com.opencms.file.oracleplsql.CmsDbAccess) m_dbAccess;
    Vector resources = dbAccess.unlockResource(currentUser, currentProject, resourcename);

    for (int i=0; i < resources.size(); i++) {
        cmsResource = (CmsResource)resources.elementAt(i);
        String resourceName = cmsResource.getResourceName();
        if (resourceName.endsWith("/")) {
            cmsFolder = new CmsFolder(cmsResource.getResourceId(), cmsResource.getParentId(),
                                    cmsResource.getFileId(), resourceName, cmsResource.getType(),
                                    cmsResource.getFlags(), cmsResource.getOwnerId(), cmsResource.getGroupId(),
                                    cmsResource.getProjectId(), cmsResource.getAccessFlags(),
                                    cmsResource.getState(), cmsResource.isLockedBy(), cmsResource.getDateCreated(),
                                    cmsResource.getDateLastModified(), cmsResource.getResourceLastModifiedBy(),
                                    cmsResource.getProjectId());
        } else {
            cmsFile = new CmsFile(cmsResource.getResourceId(), cmsResource.getParentId(),
                                    cmsResource.getFileId(), resourceName, cmsResource.getType(),
                                    cmsResource.getFlags(), cmsResource.getOwnerId(), cmsResource.getGroupId(),
                                    cmsResource.getProjectId(), cmsResource.getAccessFlags(),
                                    cmsResource.getState(), cmsResource.isLockedBy(), cmsResource.getLauncherType(),
                                    cmsResource.getLauncherClassname(), cmsResource.getDateCreated(),
                                    cmsResource.getDateLastModified(), cmsResource.getResourceLastModifiedBy(),
                                    new byte[0], cmsResource.getLength(),cmsResource.getProjectId());
        }
        m_resourceCache.remove(resourceName);
    }
    m_subresCache.clear();
}
/**
 * Checks if a user is member of a group.<P/>
 *
 * <B>Security:</B>
 * All users are granted, except the anonymous user.
 *
 * @param currentUser The user who requested this method.
 * @param currentProject The current project of the user.
 * @param callingUser The user who wants to use this method.
 * @param nameuser The name of the user to check.
 * @param groupname The name of the group to check.
 * @return True or False
 *
 * @exception CmsException Throws CmsException if operation was not succesful
 */
public boolean userInGroup(CmsUser currentUser, CmsProject currentProject, String username, String groupname) throws CmsException {
    com.opencms.file.oracleplsql.CmsDbAccess dbAccess = (com.opencms.file.oracleplsql.CmsDbAccess) m_dbAccess;
    try {
        CmsUser user = null;
        try {
            user = readUser(currentUser, currentProject, username);
        } catch (CmsException exc){
            user = readWebUser(currentUser, currentProject, username);
        }
        CmsGroup group = readGroup(currentUser, currentProject, groupname);
        return (dbAccess.userInGroup(user.getId(), group.getId()));
    } catch (CmsException ex) {
        return false;
    }
}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷久久综合九色综合绿巨人| 色综合一个色综合亚洲| 99精品国产热久久91蜜凸| 欧美吻胸吃奶大尺度电影| 久久久91精品国产一区二区三区| 一区二区欧美在线观看| 国产盗摄精品一区二区三区在线| 欧美熟乱第一页| 最新中文字幕一区二区三区| 九色综合国产一区二区三区| 欧美在线看片a免费观看| 中文文精品字幕一区二区| 日韩精品欧美成人高清一区二区| 91网站最新地址| 久久久久国产一区二区三区四区| 亚洲第四色夜色| 色综合久久久久久久久久久| 国产三级精品三级| 激情综合五月天| 日韩一区二区精品在线观看| 亚洲成人动漫在线免费观看| 色av成人天堂桃色av| 国产精品欧美一区二区三区| 国产尤物一区二区在线| 精品国产乱码久久久久久蜜臀| 天天综合色天天综合| 日本久久一区二区三区| 亚洲人123区| av午夜精品一区二区三区| 日本一区二区免费在线观看视频 | 国产精品家庭影院| 国产91精品一区二区麻豆亚洲| 精品少妇一区二区三区在线播放| 美腿丝袜亚洲一区| 欧美zozo另类异族| 精品一区二区久久| 精品国产乱码久久久久久图片| 开心九九激情九九欧美日韩精美视频电影| 欧美性大战久久久久久久 | 久久er精品视频| 日韩欧美一区二区视频| 久久99最新地址| 26uuu亚洲综合色| 国产91丝袜在线播放0| 欧美经典一区二区三区| 波多野结衣91| 亚洲国产一区二区a毛片| 欧美电影一区二区三区| 九九热在线视频观看这里只有精品| 日韩欧美不卡在线观看视频| 国产毛片精品视频| 中文字幕日本不卡| 欧美在线三级电影| 九九在线精品视频| 亚洲天堂成人在线观看| 欧美日韩综合在线| 久久国产尿小便嘘嘘| 日本一区二区动态图| 在线影院国内精品| 久久精品99久久久| 国产精品美女久久久久高潮| 色偷偷成人一区二区三区91 | 精品1区2区3区| 久久精品国产久精国产爱| 欧美极品少妇xxxxⅹ高跟鞋| 91国偷自产一区二区三区成为亚洲经典 | 狠狠色综合色综合网络| 国产亚洲婷婷免费| 91福利视频久久久久| 久久精品国产一区二区| 亚洲人妖av一区二区| 91精品一区二区三区久久久久久| 国产麻豆成人传媒免费观看| 一区二区三区四区激情| 日韩欧美中文一区二区| zzijzzij亚洲日本少妇熟睡| 午夜视频在线观看一区二区| 久久精品夜色噜噜亚洲a∨| 欧美在线综合视频| 成人在线视频首页| 日本不卡123| 亚洲免费在线看| 久久久综合激的五月天| 欧美视频一区二区| 99视频在线观看一区三区| 蜜桃视频一区二区三区| 伊人婷婷欧美激情| 国产片一区二区| 精品国产乱子伦一区| 欧美婷婷六月丁香综合色| 国产精品99久久久久久有的能看| 亚洲高清一区二区三区| 亚洲免费观看高清完整版在线 | 欧美精品久久久久久久久老牛影院| 国产一区二区伦理| 蜜臀久久99精品久久久久久9| 亚洲精品va在线观看| 国产精品区一区二区三| 久久久精品影视| 日韩精品一区二区三区老鸭窝| 欧美人动与zoxxxx乱| 色妹子一区二区| av激情综合网| 99视频一区二区| 粉嫩13p一区二区三区| 国产福利一区二区三区视频在线 | 日韩理论片中文av| 国产婷婷色一区二区三区四区| 日韩欧美中文一区二区| 日韩一区二区免费在线电影| 欧美日韩三级在线| 欧美日韩精品综合在线| 欧美日韩免费电影| 日本久久一区二区| 欧美日韩三级视频| 欧美日韩国产一级二级| 欧美日韩在线观看一区二区 | 精品国产乱码久久久久久夜甘婷婷 | 欧美视频在线一区| 欧美中文字幕一区二区三区| 欧美性猛交xxxx黑人交| 欧美三级日韩三级| 日韩欧美国产成人一区二区| 精品国产百合女同互慰| 久久中文娱乐网| 国产欧美日韩视频在线观看| 国产精品久久久久久户外露出 | 91网站黄www| 欧美性色黄大片| 欧美性感一区二区三区| 欧美肥妇bbw| 久久在线观看免费| 国产欧美精品一区二区色综合朱莉| 欧美国产禁国产网站cc| 日韩一区中文字幕| 亚洲国产成人精品视频| 日本不卡视频一二三区| 国产麻豆日韩欧美久久| av亚洲产国偷v产偷v自拍| 欧美视频中文一区二区三区在线观看| 欧美精品亚洲一区二区在线播放| 欧美一级日韩不卡播放免费| 久久人人爽爽爽人久久久| 亚洲欧洲成人自拍| 天天操天天综合网| 国产成人一区在线| 欧美性淫爽ww久久久久无| 欧美一区二区三区婷婷月色| 国产午夜亚洲精品午夜鲁丝片| 中文字幕一区二区5566日韩| 久久99国产精品尤物| 粉嫩久久99精品久久久久久夜| 欧美在线影院一区二区| 久久综合狠狠综合久久综合88| 亚洲男人的天堂在线aⅴ视频| 日韩国产欧美在线观看| 大白屁股一区二区视频| 91麻豆精品91久久久久同性| 日本一区二区免费在线观看视频| 亚洲成人一区二区在线观看| 国产一区在线观看麻豆| 欧美色窝79yyyycom| 久久久影视传媒| 首页欧美精品中文字幕| 成人久久18免费网站麻豆| 日韩视频免费观看高清完整版 | 国产亚洲午夜高清国产拍精品| 樱花草国产18久久久久| 国产精品一区二区果冻传媒| 欧美日韩不卡一区二区| 综合婷婷亚洲小说| 国产麻豆91精品| 精品国偷自产国产一区| 亚洲午夜精品网| av成人老司机| 国产偷国产偷精品高清尤物| 久久精品国产999大香线蕉| 欧美日韩午夜在线| 亚洲色图视频网| 成人sese在线| 中文字幕乱码日本亚洲一区二区| 日韩激情在线观看| 欧美日韩一区高清| 亚洲精品日韩综合观看成人91| 国产精品18久久久| 久久精品在这里| 国产精品影视网| 精品国产sm最大网站| 秋霞国产午夜精品免费视频| 欧美性一级生活| 亚洲一区二区三区四区的| 一本色道久久综合亚洲91| 国产精品午夜春色av| 国产乱对白刺激视频不卡| 亚洲精品一线二线三线| 美日韩一区二区三区| 欧美一区二区久久| 麻豆精品在线看| 日韩欧美自拍偷拍| 久草精品在线观看|