📄 jahiaabstractacl.java
字号:
* * @exception JahiaACLException * Throws an exception if the current ACL object was not initialized * correctly. */ public boolean removeUserEntry (JahiaUser user) throws JahiaACLException { testProxy (); synchronized (mACL) { return mACL.removeUserEntry(user); } } //------------------------------------------------------------------------- // FH 8 Jan. 2001 /** * Remove all the entries related to users in the current ACL object. * * @return * Return true on success or false on any failure. * * @exception JahiaACLException * Throws an exception if the current ACL object was not initialized * correctly. */ public boolean removeAllUserEntries () throws JahiaACLException { testProxy (); synchronized (mACL) { return mACL.clearEntries (JahiaACL.USER_TYPE_ENTRY); } } //------------------------------------------------------------------------- // FH 8 Jan. 2001 /** * Return all the user names present in the ACL object having the same * rights as specified. * * @param entry * Access rights bits map. Set this parameter to null to get all the * user names regarding their access rights. * * @return * Return a Vector holding all the String representation of the users' * usernames. The returned Vector is never null, but if no user is * present in the ACL, it will be empty. * * @exception JahiaACLException * Throws an exception if the current ACL object was not initialized * correctly. */ public Vector getUsernameList (JahiaACLEntry entry) throws JahiaACLException { testProxy (); return mACL.getUsernameList (entry); } //------------------------------------------------------------------------- // FH 8 Jan. 2001 /** * Return a clone of the user entry in the ACL. * * @param group * The group reference * * @return * The user entry clone, or null if the user has no entry in the ACL. * @throws JahiaACLException */ public JahiaACLEntry getGroupEntry (JahiaGroup group) throws JahiaACLException { testProxy(); return mACL.getGroupEntry (group); } //------------------------------------------------------------------------- // FH 8 Jan. 2001 /** * Add a new access for the specified group. If the group is already present * in the ACL object, the access is replaced by the new one. * * @param group * Reference to a non-null group object. * @param entry * Reference to a valid non-null ACL entry. * * @return * Return true on success or false on any failure. * * @exception JahiaACLException * Throws an exception if the current ACL object was not initialized * correctly. */ public boolean setGroupEntry (JahiaGroup group, JahiaACLEntry entry) throws JahiaACLException { testProxy (); synchronized (mACL) { return mACL.setGroupEntry (group, entry); } } //------------------------------------------------------------------------- // FH 8 Jan. 2001 /** * Remove the group access in the current ACL object. * @param group * Reference to a non-null group object. * * @return * Return true on success or false on any failure. * * @exception JahiaACLException * Throws an exception if the current ACL object was not initialized * correctly. */ public boolean removeGroupEntry (JahiaGroup group) throws JahiaACLException { testProxy (); synchronized (mACL) { return mACL.removeGroupEntry (group); } } //------------------------------------------------------------------------- // FH 8 Jan. 2001 /** * Remove all the entries related to groups in the current ACL object. * * @return * Return true on success or false on any failure. * * @exception JahiaACLException * Throws an exception if the current ACL object was not initialized * correctly. */ public boolean removeAllGroupEntries () throws JahiaACLException { testProxy (); synchronized (mACL) { return mACL.clearEntries(JahiaACL.GROUP_TYPE_ENTRY); } } //------------------------------------------------------------------------- // FH 8 Jan. 2001 /** * Return all the group names present in the ACL object having the same * rights as specified. * * @param entry * Access rights bits map. Set this parameter to null to get all the * group names regarding their access rights. * * @return * Return a Vector holding all the String representation of the * groups' usernames. The returned Vector is never null, but if no * group is present in the ACL, it will be empty. * * @exception JahiaACLException * Throws an exception if the current ACL object was not initialized * correctly. */ public Vector getGroupnameList (JahiaACLEntry entry) throws JahiaACLException { testProxy (); return mACL.getGroupnameList (entry); } //------------------------------------------------------------------------- // FH 8 Jan. 2001 /** * Return all the group names present in the ACL object having the same * rights as specified, but not the Administrator group * * @param entry * Access rights bits map. Set this parameter to null to get all the * group names regarding their access rights. * * @return * Return a Vector holding all the String representation of the * groupnames. The returned Vector is never null, but if no group is * present in the ACL, it will be empty. * @throws JahiaACLException */ public Vector getGroupnameListNoAdmin (JahiaACLEntry entry) throws JahiaACLException { testProxy (); return mACL.getGroupnameListNoAdmin (entry); } //------------------------------------------------------------------------- // FH 8 Jan. 2001 /** * Return true if the specified user has the requested rights in the ACL, * or in one of the parent's ACLs. * * @param user * Reference to a non-null user object. * @param permission * Bit index of the requested access, this index should be defined as * a constant in the derived classes. * @param siteID, the context used to retrieve the site's administrator group * * @return * Return true on success or false on any failure. * * @exception JahiaACLException * Throws an exception if the current ACL object was not initialized * correctly. */ public boolean getPermission (JahiaUser user, int permission, int siteID) throws JahiaACLException { testProxy (); return mACL.getPermission (user, permission, siteID); } //------------------------------------------------------------------------- // FH 8 Jan. 2001 /** * Return true if the specified group has the requested rights in the ACL, * or in one of the parent's ACLs. * * @param group * Reference to a non-null group object. * @param permission * Bit index of the requested access, this index should be defined as * a constant in the derived classes. * * @return * Return true on success or false on any failure. * * @exception JahiaACLException * Throws an exception if the current ACL object was not initialized * correctly. */ public boolean getPermission (JahiaGroup group, int permission) throws JahiaACLException { testProxy (); return mACL.getPermission (group, permission); } //------------------------------------------------------------------------- // FH 8 Jan. 2001 public String toString () { if (mACL == null) { return "-ACL proxy not initialized-"; } return mACL.toString (); } //------------------------------------------------------------------------- // FH 8 Jan. 2001 public Vector getUsernameListAlsoGroupUsers (JahiaACLEntry entry) throws JahiaACLException { testProxy(); return mACL.getUsernameListAlsoGroupUsers (entry); } //------------------------------------------------------------------------- // FH 8 Jan. 2001 private void testProxy () throws JahiaACLException { if (mACL == null) { throw new JahiaACLException (INIT_ERROR_MSG, JahiaACLException.ACL_NOT_INITIALIZED); } } //------------------------------------------------------------------------- public void setParentID (int parentID) throws ACLNotFoundException, JahiaDatabaseException { JahiaACL parentACL = mACLService.lookupACL (parentID); mACL.setParentACL (parentACL); } //------------------------------------------------------------------------- /** * Make an exact copy of the ACL except the ACL ID. * * @return the clone Object */ public Object clone() { return mACL.clone(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -