📄 jahiagroupmanagerservice.java
字号:
//// ____.// __/\ ______| |__/\. _______// __ .____| | \ | +----+ \// _______| /--| | | - \ _ | : - \_________// \\______: :---| : : | : | \________>// |__\---\_____________:______: :____|____:_____\// /_____|//// . . . i n j a h i a w e t r u s t . . .//// NK - 18 Dec. 2001 :// 1. Added properties to grouppackage org.jahia.services.usermanager;import java.util.Properties;import java.util.Vector;import java.util.Enumeration;import org.jahia.services.JahiaService;import org.jahia.services.usermanager.JahiaUser;import org.jahia.services.usermanager.JahiaGroup;import org.jahia.exceptions.*;import org.jahia.data.JahiaDOMObject;import org.jahia.data.JahiaDBDOMObject;public abstract class JahiaGroupManagerService extends JahiaService{ public static final String USERS_GROUPNAME = "users"; public static final String ADMINISTRATORS_GROUPNAME = "administrators"; public static final String GUEST_GROUPNAME = "guest"; //------------------------------------------------------------------------- /** * Create a new group in the system. * * @param int siteID the site owner of this group * @param groupname Group's unique identification name * * @return Retrun a reference on a group object on success, or if the groupname * already exists or another error occured, null is returned. */ public abstract JahiaGroup createGroup (int siteID, String name, Properties properties); //------------------------------------------------------------------------- /** * Lookup the group information from the underlaying system (DB, LDAP, ... ) * Try to lookup the group into the cache, if it's not in the cache, then * load it into the cahce from the database. * * @param int siteID the site id * @param groupname Group's unique identification name. * * @return Return a reference on a the specified group name. Return null * if the group doesn't exist or when any error occured. */ public abstract JahiaGroup lookupGroup (int siteID, String name); //------------------------------------------------------------------------- /** * Lookup the group information from the underlaying system (DB, LDAP, ... ) * Try to lookup the group into the cache, if it's not in the cache, then * load it into the cahce from the database. * * @param String groupID Group's unique identification id. * * @return Return a reference on a the specified group name. Return null * if the group doesn't exist or when any error occured. */ public abstract JahiaGroup lookupGroup (String groupID); //------------------------------------------------------------------------- /** * Delete a group from the system. Updates the database automatically, and * signal the ACL Manager that the group no longer exists. * * @param group Reference to a JahiaGroup object. * * @return Return true on success, or false on any failure. */ public abstract boolean deleteGroup (JahiaGroup group); //------------------------------------------------------------------------- /** * This function checks on a gived site if the groupname has already been * assigned to another group. * * @param int siteID the site id * @param groupname String representing the unique group name. * * @return Return true if the specified username has not been assigned yet, * return false on any failure. */ public abstract boolean groupExists (int siteID, String name); //------------------------------------------------------------------------- /** * Remove the specified user from all the membership lists of all the groups. * * @param user Reference on an existing user. * * @return Return true on success, or false on any failure. */ public abstract boolean removeUserFromAllGroups (JahiaUser user); //------------------------------------------------------------------------- /** * Return a <code>Vector</code) of <code>String</code> representing all the * group names. * * @return Return a vector of strings containing all the group names. */ public abstract Vector getGroupnameList (); //------------------------------------------------------------------------- /** * Return a <code>Vector</code) of <code>String</code> representing all the * group names of a site. * * @param int the site id * @return Return a vector of strings containing all the group names. */ public abstract Vector getGroupnameList (int siteID); //------------------------------------------------------------------------- /** * Return a <code>Vector</code) of <code>String</code> representing all the * groups of a site. * * @param int the site id * @return Return a vector of identifier of all groups of this site. */ public abstract Vector getGroupList (int siteID); //------------------------------------------------------------------------- /** * Return a <code>Vector</code) of <code>String</code> representing all the * group keys of a site. * * @param int the site id * @return Return a vector of identifier of all groups of this site. * @auhtor NK */ public abstract Vector getGroupList (); //------------------------------------------------------------------------- /** * Return the list of groups to shich the specified user has access. * * @param user Valid reference on an existing group. * * @return Return a vector of strings holding all the group names to * which the user as access. */ public abstract Vector getUserMembership (JahiaUser user); //------------------------------------------------------------------------- /** * */ public abstract JahiaGroup getAdministratorGroup (int siteID); //------------------------------------------------------------------------- /** * Return an instance of the guest group * * @return Return the instance of the guest group. Return null on any failure. */ public abstract JahiaGroup getGuestGroup (int siteID); //------------------------------------------------------------------------- /** * Get all JahiaSite objects where the user has an access. * * @param JahiaUser user, the user you want to get his access grantes sites list. * @return Return a vector containing all JahiaSite objects where the user has an access. * @author Alexandre Kraft */ public abstract Vector getAdminGrantedSites (JahiaUser user) throws JahiaException; //-------------------------------------------------------------------------- /** * return a DOM document of all groups of a site * * @param int the site id * * @return JahiaDOMObject a DOM representation of this object * * @author NK */ public abstract JahiaDOMObject getGroupsAsDOM( int siteID ) throws JahiaException; //-------------------------------------------------------------------------- /** * return a DOM document of all group props of a site * * @param int the site id * * @return JahiaDOMObject a DOM representation of this object * * @author NK */ public abstract JahiaDOMObject getGroupPropsAsDOM( int siteID ) throws JahiaException; //-------------------------------------------------------------------------- /** * return a DOM document of all application role groups of a site * * @param int the site id * * @return JahiaDOMObject a DOM representation of this object * * @author NK */ public abstract JahiaDOMObject getAppRoleGroupsAsDOM( int siteID ) throws JahiaException; //-------------------------------------------------------------------------- /** * return a DOM document of all user group access for a site * * @param int the site id * * @return JahiaDOMObject a DOM representation of this object * * @author NK */ public abstract JahiaDOMObject getUserGroupAccessAsDOM( int siteID ) throws JahiaException; //-------------------------------------------------------------------------- /** * return a DOM document of all application group access for a site * Here users and groups have access to application role groups ( not normal groups ) * * @param int the site id * * @return JahiaDOMObject a DOM representation of this object * * @author NK */ public abstract JahiaDOMObject getAppGroupAccessAsDOM( int siteID ) throws JahiaException; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -