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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? community.java

?? dspace 用j2ee架構的一個數字圖書館.開源程序
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
            mappingRow.setColumn("community_id", getID());            mappingRow.setColumn("collection_id", c.getID());            DatabaseManager.update(ourContext, mappingRow);        }        // close the TableRowIterator to free up resources        tri.close();    }    /**     * Create a new sub-community within this community.     *      * @return the new community     */    public Community createSubcommunity() throws SQLException,            AuthorizeException    {        // Check authorisation        AuthorizeManager.authorizeAction(ourContext, this, Constants.ADD);        Community c = create(this, ourContext);        addSubcommunity(c);        return c;    }    /**     * Add an exisiting community as a subcommunity to the community     *      * @param c     *            subcommunity to add     */    public void addSubcommunity(Community c) throws SQLException,            AuthorizeException    {        // Check authorisation        AuthorizeManager.authorizeAction(ourContext, this, Constants.ADD);        log.info(LogManager.getHeader(ourContext, "add_subcommunity",                "parent_comm_id=" + getID() + ",child_comm_id=" + c.getID()));        // Find out if mapping exists        TableRowIterator tri = DatabaseManager.query(ourContext,                "community2community",                "SELECT * FROM community2community WHERE parent_comm_id="                        + getID() + " AND child_comm_id=" + c.getID());        if (!tri.hasNext())        {            // No existing mapping, so add one            TableRow mappingRow = DatabaseManager.create(ourContext,                    "community2community");            mappingRow.setColumn("parent_comm_id", getID());            mappingRow.setColumn("child_comm_id", c.getID());            DatabaseManager.update(ourContext, mappingRow);        }        // close the TableRowIterator to free up resources        tri.close();    }    /**     * Remove a collection. Any items then orphaned are deleted.     *      * @param c     *            collection to remove     */    public void removeCollection(Collection c) throws SQLException,            AuthorizeException, IOException    {        // Check authorisation        AuthorizeManager.authorizeAction(ourContext, this, Constants.REMOVE);        log.info(LogManager.getHeader(ourContext, "remove_collection",                "community_id=" + getID() + ",collection_id=" + c.getID()));        // Remove any mappings        DatabaseManager.updateQuery(ourContext,                "DELETE FROM community2collection WHERE community_id="                        + getID() + " AND collection_id=" + c.getID());        // Is the community an orphan?        TableRowIterator tri = DatabaseManager.query(ourContext,                "SELECT * FROM community2collection WHERE collection_id="                        + c.getID());        if (!tri.hasNext())        {            //make the right to remove the collection explicit because the            // implicit relation            //has been removed. This only has to concern the currentUser            // because            //he started the removal process and he will end it too.            //also add right to remove from the collection to remove it's            // items.            AuthorizeManager.addPolicy(ourContext, c, Constants.DELETE,                    ourContext.getCurrentUser());            AuthorizeManager.addPolicy(ourContext, c, Constants.REMOVE,                    ourContext.getCurrentUser());            // Orphan; delete it            c.delete();        }        // close the TableRowIterator to free up resources        tri.close();    }    /**     * Remove a subcommunity. Any substructure then orphaned is deleted.     *      * @param c     *            subcommunity to remove     */    public void removeSubcommunity(Community c) throws SQLException,            AuthorizeException, IOException    {        // Check authorisation        AuthorizeManager.authorizeAction(ourContext, this, Constants.REMOVE);        log.info(LogManager.getHeader(ourContext, "remove_subcommunity",                "parent_comm_id=" + getID() + ",child_comm_id=" + c.getID()));        // Remove any mappings        DatabaseManager.updateQuery(ourContext,                "DELETE FROM community2community WHERE parent_comm_id="                        + getID() + " AND child_comm_id=" + c.getID());        // Is the subcommunity an orphan?        TableRowIterator tri = DatabaseManager.query(ourContext,                "SELECT * FROM community2community WHERE child_comm_id="                        + c.getID());        if (!tri.hasNext())        {            //make the right to remove the sub explicit because the implicit            // relation            //has been removed. This only has to concern the currentUser            // because            //he started the removal process and he will end it too.            //also add right to remove from the subcommunity to remove it's            // children.            AuthorizeManager.addPolicy(ourContext, c, Constants.DELETE,                    ourContext.getCurrentUser());            AuthorizeManager.addPolicy(ourContext, c, Constants.REMOVE,                    ourContext.getCurrentUser());            // Orphan; delete it            c.delete();        }        // close the TableRowIterator to free up resources        tri.close();    }    /**     * Delete the community, including the metadata and logo. Collections and     * subcommunities that are then orphans are deleted.     */    public void delete() throws SQLException, AuthorizeException, IOException    {        // Check authorisation        // FIXME: If this was a subcommunity, it is first removed from it's        // parent.        // This means the parentCommunity == null        // But since this is also the case for top-level communities, we would        // give everyone rights to remove the top-level communities.        // The same problem occurs in removing the logo        if (!AuthorizeManager.authorizeActionBoolean(ourContext,                getParentCommunity(), Constants.REMOVE))        {            AuthorizeManager                    .authorizeAction(ourContext, this, Constants.DELETE);        }        // If not a top-level community, have parent remove me; this        // will call delete() after removing the linkage        Community parent = getParentCommunity();        if (parent != null)        {            parent.removeSubcommunity(this);            return;        }        log.info(LogManager.getHeader(ourContext, "delete_community",                "community_id=" + getID()));        // remove from the search index        DSIndexer.unIndexContent(ourContext, this);        HistoryManager.saveHistory(ourContext, this, HistoryManager.REMOVE,                ourContext.getCurrentUser(), ourContext.getExtraLogInfo());        // Remove from cache        ourContext.removeCached(this, getID());        // Remove collections        Collection[] cols = getCollections();        for (int i = 0; i < cols.length; i++)        {            removeCollection(cols[i]);        }        // Remove subcommunities        Community[] comms = getSubcommunities();        for (int j = 0; j < comms.length; j++)        {            removeSubcommunity(comms[j]);        }        // Remove the logo        setLogo(null);        // Remove all authorization policies        AuthorizeManager.removeAllPolicies(ourContext, this);        // Delete community row        DatabaseManager.delete(ourContext, communityRow);    }    /**     * Return <code>true</code> if <code>other</code> is the same Community     * as this object, <code>false</code> otherwise     *      * @param other     *            object to compare to     *      * @return <code>true</code> if object passed in represents the same     *         community as this object     */    public boolean equals(Object other)    {        if (!(other instanceof Community))        {            return false;        }        return (getID() == ((Community) other).getID());    }    /**     * return type found in Constants     */    public int getType()    {        return Constants.COMMUNITY;    }    /**     * return TRUE if context's user can edit community, false otherwise     *      * @return boolean true = current user can edit community     */    public boolean canEditBoolean() throws java.sql.SQLException    {        try        {            canEdit();            return true;        }        catch (AuthorizeException e)        {            return false;        }    }    public void canEdit() throws AuthorizeException, SQLException    {        Community[] parents = getAllParents();        for (int i = 0; i < parents.length; i++)        {            if (AuthorizeManager.authorizeActionBoolean(ourContext, parents[i],                    Constants.WRITE))            {                return;            }            if (AuthorizeManager.authorizeActionBoolean(ourContext, parents[i],                    Constants.ADD))            {                return;            }        }        AuthorizeManager.authorizeAction(ourContext, this, Constants.WRITE);    }	/**     * counts items in this community     *     * @return  total items     */    public int countItems() throws SQLException    {           	int total = 0;    	// add collection counts        Collection[] cols = getCollections();        for ( int i = 0; i < cols.length; i++)        {        	total += cols[i].countItems();        }        // add sub-community counts        Community[] comms = getSubcommunities();        for ( int j = 0; j < comms.length; j++ )        {        	total += comms[j].countItems();        }        return total;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频一区三区九区| 91精品欧美一区二区三区综合在| 高清在线观看日韩| 91国产免费看| 久久天堂av综合合色蜜桃网| 亚洲人成在线观看一区二区| 麻豆成人在线观看| 91久久一区二区| 国产日韩亚洲欧美综合| 日日夜夜精品视频天天综合网| 国产成人av电影| 日韩午夜三级在线| 亚洲一区中文日韩| 成人ar影院免费观看视频| 欧美一区二区播放| 亚洲激情综合网| 成人精品高清在线| 久久综合久久综合久久| 日日欢夜夜爽一区| 色狠狠色狠狠综合| 最新国产精品久久精品| 国产美女在线观看一区| 91精品国产高清一区二区三区| 亚洲欧美日韩国产手机在线| 成人黄色在线网站| 久久精品网站免费观看| 蜜桃久久久久久| 欧美色精品天天在线观看视频| 亚洲欧洲在线观看av| 国产高清亚洲一区| 2023国产精品自拍| 国产综合色视频| 精品日韩一区二区三区| 日本不卡视频一二三区| 欧美日韩精品二区第二页| 亚洲精品一二三四区| 色综合久久天天综合网| 日韩一区在线播放| 91欧美激情一区二区三区成人| 国产欧美精品区一区二区三区| 激情文学综合丁香| 精品国产一区久久| 国产电影一区在线| 国产欧美日韩精品a在线观看| 国产福利精品一区二区| 国产精品丝袜一区| 91在线视频免费91| 一区二区三区在线不卡| 欧美三级资源在线| 日韩av一级电影| 日韩美女在线视频| 国产sm精品调教视频网站| 亚洲国产精品激情在线观看| 99re8在线精品视频免费播放| 亚洲视频一二区| 色伊人久久综合中文字幕| 亚洲一区国产视频| 日韩一区二区三区观看| 激情综合色综合久久| 中文字幕欧美区| 一本一本大道香蕉久在线精品 | 欧美日韩国产美女| 蜜臀av性久久久久蜜臀aⅴ流畅| 日韩色视频在线观看| 国产精品1024| 亚洲综合视频网| 精品国内片67194| 粉嫩一区二区三区性色av| 亚洲欧美成人一区二区三区| 欧美日韩一级黄| 国产麻豆精品在线| 一区二区三区日韩欧美精品| 在线不卡中文字幕播放| 国产精品77777| 亚洲一区二区三区在线看| 久久一日本道色综合| 欧美无砖砖区免费| 国产一级精品在线| 天天综合日日夜夜精品| 欧美精品一区二区久久久| 91麻豆123| 精品午夜一区二区三区在线观看| 欧美国产精品专区| 日韩欧美国产系列| 日本乱人伦一区| 国产一区二区三区久久悠悠色av | 欧美成人三级电影在线| 成人福利电影精品一区二区在线观看| 亚洲最新视频在线播放| 久久婷婷国产综合精品青草| 欧美日韩在线一区二区| 成人福利视频网站| 国产在线精品一区二区夜色| 亚洲激情六月丁香| 中文一区一区三区高中清不卡| 欧美日韩成人一区| 日本道在线观看一区二区| 丁香一区二区三区| 麻豆久久久久久| 亚洲一区二区欧美日韩| 亚洲视频在线观看三级| 国产欧美一区二区精品婷婷 | 亚洲精品美腿丝袜| 国产欧美一区视频| 欧美大片一区二区| 精品视频一区二区不卡| 日本高清视频一区二区| 丰满少妇久久久久久久 | 亚洲国产欧美另类丝袜| 国产精品美女久久久久av爽李琼| 亚洲精品在线网站| 日韩欧美aaaaaa| 日韩女优视频免费观看| 在线不卡欧美精品一区二区三区| 91在线视频网址| 91在线云播放| 一本到高清视频免费精品| 99久久99久久精品国产片果冻| 国产在线麻豆精品观看| 国产乱码一区二区三区| 韩日av一区二区| 久久国产精品免费| 另类综合日韩欧美亚洲| 久久精品国产一区二区三区免费看| 五月婷婷另类国产| 蜜桃av噜噜一区| 免费成人av在线播放| 蜜臀av性久久久久蜜臀aⅴ四虎| 蜜臀av亚洲一区中文字幕| 久久国产精品免费| 丰满少妇久久久久久久| a亚洲天堂av| 色悠久久久久综合欧美99| 色欧美片视频在线观看| 欧美日本一道本在线视频| 欧美精品久久天天躁| 精品少妇一区二区三区| 中文字幕乱码亚洲精品一区| 国产精品美女久久久久aⅴ | 午夜精品久久久久久久| 日韩电影免费一区| 国产精一区二区三区| av午夜精品一区二区三区| 在线视频欧美精品| 欧美一区二区成人6969| 欧美国产一区在线| 亚洲精品videosex极品| 日本一区中文字幕| 粉嫩av一区二区三区粉嫩| 91搞黄在线观看| 7777精品伊人久久久大香线蕉经典版下载 | 一区二区三区小说| 亚洲人成小说网站色在线| 亚洲一区二区精品3399| 久久国产精品免费| 91网址在线看| 337p亚洲精品色噜噜| 久久久久久黄色| 一区二区三区在线观看国产| 麻豆精品视频在线观看免费| 风间由美性色一区二区三区| 欧美视频一区在线| 久久久精品2019中文字幕之3| 亚洲男女毛片无遮挡| 免费高清不卡av| 91猫先生在线| 欧美tickle裸体挠脚心vk| 国产精品女主播av| 青青青爽久久午夜综合久久午夜| 成人免费黄色在线| 7777精品伊人久久久大香线蕉完整版| 国产精品全国免费观看高清| 视频一区免费在线观看| www.在线成人| 久久综合九色综合欧美98| 亚洲综合一区二区| hitomi一区二区三区精品| 日韩手机在线导航| 亚洲一区二区三区四区五区中文 | 成人av网站免费观看| 5858s免费视频成人| 亚洲区小说区图片区qvod| 国产电影一区二区三区| 精品国产乱码久久久久久牛牛| 亚洲综合在线视频| 99国产一区二区三精品乱码| 成人免费视频网站在线观看| 91福利国产精品| 国产精品久久久久久久浪潮网站| 青青草精品视频| 欧美日韩一区二区三区视频| 亚洲欧美激情插| 成人国产亚洲欧美成人综合网| 精品国产免费人成在线观看| 午夜欧美在线一二页| 欧美在线免费观看亚洲| 亚洲精品午夜久久久| 91浏览器打开| 日韩理论电影院| 91在线精品秘密一区二区|