001: /* Copyright 2001, 2002 The JA-SIG Collaborative. All rights reserved.
002: * See license distributed with this file and
003: * available online at http://www.uportal.org/license.html
004: */
005:
006: package org.jasig.portal.groups;
007:
008: import java.util.Iterator;
009:
010: import org.jasig.portal.EntityIdentifier;
011:
012: /**
013: * Defines an api for discovering an entry point into the groups system,
014: * represented by an <code>IGroupMember</code>. This is analogous to getting an
015: * <code>InitialContext</code> in JNDI. Subsequent requests for navigating or
016: * maintaining groups go thru the <code>IGroupMember</code>.
017: *
018: * @author Dan Ellentuck
019: * @version $Revision: 36683 $
020: * @deprecated Use instead {@link ICompositeGroupService} or
021: * {@link IIndividualGroupService}
022: */
023: public interface IGroupService {
024:
025: /**
026: * Returns a pre-existing <code>IEntityGroup</code> or null if the
027: * <code>IGroupMember</code> does not exist.
028: */
029: public IEntityGroup findGroup(String key) throws GroupsException;
030:
031: /**
032: * Returns an <code>IEntity</code> representing a portal entity. This does
033: * not guarantee that the entity actually exists.
034: */
035: public IEntity getEntity(String key, Class type)
036: throws GroupsException;
037:
038: /**
039: * Returns an <code>IGroupMember</code> representing either a group or a
040: * portal entity. If the parm <code>type</code> is the group type,
041: * the <code>IGroupMember</code> is an <code>IEntityGroup</code> else it is
042: * an <code>IEntity</code>.
043: */
044: public IGroupMember getGroupMember(String key, Class type)
045: throws GroupsException;
046:
047: /**
048: * Returns an <code>IGroupMember</code> representing either a group or a
049: * portal entity, based on the <code>EntityIdentifier</code>, which
050: * refers to the UNDERLYING entity for the <code>IGroupMember</code>.
051: */
052: public IGroupMember getGroupMember(
053: EntityIdentifier underlyingEntityIdentifier)
054: throws GroupsException;
055:
056: /**
057: * Returns a new <code>IEntityGroup</code> for the given Class with an unused
058: * key.
059: */
060: public IEntityGroup newGroup(Class type) throws GroupsException;
061:
062: /**
063: * Returns an <code>IEntityGroupStore</code>.
064: */
065: public IEntityGroupStore getGroupStore() throws GroupsException;
066:
067: /**
068: * Removes the <code>IEntityGroup</code> from the store.
069: */
070: public void deleteGroup(IEntityGroup group) throws GroupsException;
071:
072: /**
073: * Commits the updated <code>IEntityGroup</code> to the store.
074: */
075: public void updateGroup(IEntityGroup group) throws GroupsException;
076:
077: /**
078: * Commits the updated <code>IEntityGroup</code> to the store.
079: */
080: public void updateGroupMembers(IEntityGroup group)
081: throws GroupsException;
082:
083: /**
084: * Returns the containing groups for the <code>IGroupMember</code>
085: * @param gm IGroupMember
086: */
087: public Iterator findContainingGroups(IGroupMember gm)
088: throws GroupsException;
089:
090: /**
091: * Returns the member groups for the <code>IEntityGroup</code>
092: * @param eg IEntityGroup
093: */
094: public Iterator findMemberGroups(IEntityGroup eg)
095: throws GroupsException;
096:
097: /**
098: * Find EntityIdentifiers for groups whose name matches the query string
099: * according to the specified method and matches the provided leaf type
100: */
101: public EntityIdentifier[] searchForGroups(String query, int method,
102: Class leaftype) throws GroupsException;
103:
104: /**
105: * Find EntityIdentifiers for groups whose name matches the query string
106: * according to the specified method, has the provided leaf type and
107: * descends from the specified group
108: */
109: public EntityIdentifier[] searchForGroups(String query, int method,
110: Class leaftype, IEntityGroup ancestor)
111: throws GroupsException;
112:
113: /**
114: * Find EntityIdentifiers for entities whose name matches the query string
115: * according to the specified method and is of the specified type
116: */
117: public EntityIdentifier[] searchForEntities(String query,
118: int method, Class type) throws GroupsException;
119:
120: /**
121: * Find EntityIdentifiers for entities whose name matches the query string
122: * according to the specified method, is of the specified type and
123: * descends from the specified group
124: */
125: public EntityIdentifier[] searchForEntities(String query,
126: int method, Class type, IEntityGroup ancestor)
127: throws GroupsException;
128:
129: }
|