Interface SakaiPersonManager
-
public interface SakaiPersonManager- Author:
- Lance Speelmon
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROFILE_DELETEstatic StringPROFILE_UPDATE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SakaiPersoncreate(String agentUuid, Type recordType)Creates a persistent SakaiPerson record.voiddelete(SakaiPerson sakaiPerson)Removes SakaiPerson from persistent state.List<SakaiPerson>findAllFerpaEnabled()Find all SakaiPerson objects where ferpaEnabled == TRUE.List<SakaiPerson>findSakaiPerson(String simpleSearchCriteria)Search the "common" SakaiPerson fields for a given String.List<SakaiPerson>findSakaiPerson(SakaiPerson queryByExample)Query-by-Example finder signature.List<SakaiPerson>findSakaiPersonByUid(String uid)Retrieve SakaiPerson by uid (username).SakaiPersongetPrototype()Get a new instantiation of an empty SakaiPerson object (has no persistent state).SakaiPersongetSakaiPerson(String agentUuid, Type recordType)Find all SakaiPerson objects with specified type.SakaiPersongetSakaiPerson(Type recordType)Assumes current user.Map<String,SakaiPerson>getSakaiPersons(Set<String> userIds, Type userMutableType)Finds all SakaiPerson objects with the specified type, whos IDs are contained in the userIds collection.TypegetSystemMutableType()Returns the systemMutableType constant.TypegetUserMutableType()Returns the userMutableType constant.List<String>isFerpaEnabled(Collection<String> agentUuids)Composite call to determine if a Set of Agents have the FERPA flag enabled.voidsave(SakaiPerson sakaiPerson)Save or update the SakaiPerson bean.
-
-
-
Field Detail
-
PROFILE_UPDATE
static final String PROFILE_UPDATE
- See Also:
- Constant Field Values
-
PROFILE_DELETE
static final String PROFILE_DELETE
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
SakaiPerson create(String agentUuid, Type recordType)
Creates a persistent SakaiPerson record.- Parameters:
agentUuid-recordType-getSystemMutableType()orgetUserMutableType()- Returns:
-
getPrototype
SakaiPerson getPrototype()
Get a new instantiation of an empty SakaiPerson object (has no persistent state). For example, useful if you query-by-example finder method.- Returns:
-
findSakaiPersonByUid
List<SakaiPerson> findSakaiPersonByUid(String uid)
Retrieve SakaiPerson by uid (username).- Parameters:
uid- username- Returns:
- List of SakaiPerson objects incuding both system and user mutable Types.
-
findSakaiPerson
List<SakaiPerson> findSakaiPerson(SakaiPerson queryByExample)
Query-by-Example finder signature.- Parameters:
queryByExample- A SakaiPerson protoype. All non-null preoperties will be searched using a logical AND.- Returns:
-
getSakaiPerson
SakaiPerson getSakaiPerson(Type recordType)
Assumes current user. If you would like to specify the user, see#findSakaiPerson(String, Type).- Parameters:
recordType- SeegetSystemMutableType()orgetUserMutableType().- Returns:
-
getSakaiPerson
SakaiPerson getSakaiPerson(String agentUuid, Type recordType)
Find all SakaiPerson objects with specified type. Types should be obtained through the Type constant getter methods.- Parameters:
agent-recordType- SeegetSystemMutableType()orgetUserMutableType().- Returns:
-
getSakaiPersons
Map<String,SakaiPerson> getSakaiPersons(Set<String> userIds, Type userMutableType)
Finds all SakaiPerson objects with the specified type, whos IDs are contained in the userIds collection.- Parameters:
userIds-userMutableType-- Returns:
-
getUserMutableType
Type getUserMutableType()
Returns the userMutableType constant. SakaiPerson's of this Type allow the user to modify all attributes.- Returns:
-
getSystemMutableType
Type getSystemMutableType()
Returns the systemMutableType constant. SakaiPerson's of this Type can only be modified by the "system", i.e. not the end user, and would normally consist of enterprise data (e.g. LDAP, etc).- Returns:
-
save
void save(SakaiPerson sakaiPerson)
Save or update the SakaiPerson bean.- Parameters:
sakaiPerson-
-
delete
void delete(SakaiPerson sakaiPerson)
Removes SakaiPerson from persistent state.- Parameters:
sakaiPerson-
-
findSakaiPerson
List<SakaiPerson> findSakaiPerson(String simpleSearchCriteria)
Search the "common" SakaiPerson fields for a given String.- Parameters:
simpleSearchCriteria- String used to search for SakaiPerson objects where the following properties are like this String: uid, givenName, surname.- Returns:
-
isFerpaEnabled
List<String> isFerpaEnabled(Collection<String> agentUuids)
Composite call to determine if a Set of Agents have the FERPA flag enabled.- Parameters:
agentUuids-- Returns:
- A List of agentUuid Strings where FERPA is enabled.
-
findAllFerpaEnabled
List<SakaiPerson> findAllFerpaEnabled()
Find all SakaiPerson objects where ferpaEnabled == TRUE.- Returns:
- A List of SakaiPerson objects where ferpaEnabled == TRUE.
-
-