|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--us.openinternet.luge.service.LugeFacade | +--us.openinternet.luge.service.PersonFacade
Field Summary |
Fields inherited from class us.openinternet.luge.service.LugeFacade |
grpTransformer, lugeTransformer, personTransformer |
Constructor Summary | |
PersonFacade(LugeFacade lf)
|
|
PersonFacade(LugeTransformer lt)
|
|
PersonFacade(java.lang.String cn,
java.lang.String key)
Use this constructor to establish your connection to the ldap server. |
Method Summary | |
boolean |
addAttributeToPerson(java.lang.String uid,
java.lang.String attr,
java.util.ArrayList values)
This method will add an attribute with mutliple values to the user. |
boolean |
addAttributeToPerson(java.lang.String uid,
java.lang.String attr,
java.lang.String value)
This method will add an attribute with single value to the user. |
boolean |
addPerson(PersonVO pvo)
This method adds a user to the directory. |
boolean |
deleteAttributeFromPerson(java.lang.String uid,
java.lang.String attr)
This method allows all values of an attribute to be deleted. |
boolean |
deleteAttributeValueFromPerson(java.lang.String uid,
java.lang.String attr,
java.lang.String val)
This method allows a particular value to be deleted from an attribute. |
boolean |
deletePerson(java.lang.String uid)
This method removes the specified user from the directory. |
protected void |
finalize()
|
java.util.ArrayList |
getUserAttributeMultiValue(java.lang.String uid,
java.lang.String attr)
This method is intended to be used as a quick method for retrieving a multi-valued attribute. |
java.util.Hashtable |
getUserAttributes(java.lang.String uid,
java.lang.String[] attrs)
This method returns specific attributes of a user in a Hashtable with the actual ldap attribute names as keys and the values returned as String arrays to accomodate multi-valued attributes. |
java.lang.String |
getUserAttributeSingleValue(java.lang.String uid,
java.lang.String attr)
This method returns the first value of an attribute. |
boolean |
modifyPerson(java.lang.String uid,
PersonVO pvo,
boolean AppendAttributes)
This method allows the attributes of a person to be modified. |
boolean |
personExists(java.lang.String uid)
This method verifies that a user exists in the directory. |
PersonVO |
personLookup(java.lang.String uid)
Use this method to return all the values for the specified person. |
java.util.ArrayList |
quickUserSearch(java.lang.String attrName,
java.lang.String value)
This method returns an ArrayList of user names that match a simple attribute value search (ie cn=foo*). |
GroupVO |
removeAttributeValueFromAllPeople(java.lang.String attrName,
java.lang.String attrValue)
Remove a specified attribute value from all People that possess it. |
boolean |
replaceAttributeForPerson(java.lang.String uid,
java.lang.String attr,
java.util.ArrayList values)
This method is the same as replaceAttributeForPerson except it accepts an ArrayList of values to accomodate multi-valued attributes. |
boolean |
replaceAttributeForPerson(java.lang.String uid,
java.lang.String attr,
java.lang.String value)
This method replaces an attribute. |
boolean |
replaceAttributeForPerson(java.lang.String uid,
java.lang.String attr,
java.lang.String oldValue,
java.lang.String newValue)
This method allows a single value of a multi-vauled attribute to be replaced |
SearchVO |
searchUsers(SearchVO svo)
The preferred method to search the directory, see SearchVO documentation for sample code on setting serach criteria, using this method and extracting the results. |
boolean |
userHasAttribute(java.lang.String uid,
java.lang.String attr)
This method verifies if a user has a specific attribute. |
boolean |
userHasAttributeValue(java.lang.String uid,
java.lang.String attr,
java.lang.String value)
This method verifies if a user has an attribute with a specific value. |
boolean |
validateUserPassword(java.lang.String user,
java.lang.String passwd)
This method tests whether a given username/password set is valid. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PersonFacade(java.lang.String cn, java.lang.String key) throws LugeException
cn
- - This is an id assigned to your applicationkey
- - Each id is also assigned a key for authentication purposes.
The key is not the LDAP server password.
LugeException
public PersonFacade(LugeTransformer lt) throws LugeException
public PersonFacade(LugeFacade lf) throws LugeException
Method Detail |
public boolean addPerson(PersonVO pvo) throws LugeException
PersonVO pvo = new PersonVO();
pvo.setName("foo_bar");
pvo.setLastName("Bar");
pvo.setEmail("foo_bar@spam.com");
ArrayList categories = new ArrayList();
categories.add("Marketing");
categories.add("Sales");
categories.add("Finance");
pvo.setAttributeValues("businessCategory", categories);
pvo.addValueToAttribute("businessCategory", "One_More_Category");
try{
AdminFacade af = new AdminFacade("myApp", "myKey");
af.addPerson(pvo);
} catch (LugeException lugeEx) {
lugeEx.printStackTrace();
}
LugeException
public boolean deletePerson(java.lang.String uid) throws LugeException
uid
- - the Person's name
LugeException
public boolean addAttributeToPerson(java.lang.String uid, java.lang.String attr, java.lang.String value) throws LugeException
uid
- The userID (cn) of the person.attr
- The valid LDAP attribute name.value
- The value to be added to the attribute.
LugeException
public boolean addAttributeToPerson(java.lang.String uid, java.lang.String attr, java.util.ArrayList values) throws LugeException
uid
- The userID (cn) of the personattr
- The valid LDAP attribute name.values
- An ArrayList of values to be added to the attribute.
LugeException
public boolean replaceAttributeForPerson(java.lang.String uid, java.lang.String attr, java.lang.String value) throws LugeException
uid
- The userID (cn) of the personattr
- The valid LDAP attribute name.value
- The value of the attribute.
LugeException
public boolean replaceAttributeForPerson(java.lang.String uid, java.lang.String attr, java.util.ArrayList values) throws LugeException
uid
- The userID (cn) of the personattr
- The valid LDAP attribute name.values
- An ArrayList of values of the attribute.
LugeException
public boolean replaceAttributeForPerson(java.lang.String uid, java.lang.String attr, java.lang.String oldValue, java.lang.String newValue) throws LugeException
uid
- The userID (cn) of the personattr
- The valid LDAP attribute name.oldValue
- The current value of the attribute.newValue
- The new value of the attribute.
LugeException
public boolean deleteAttributeFromPerson(java.lang.String uid, java.lang.String attr) throws LugeException
uid
- The userID (cn) of the personattr
- The valid LDAP attribute name.
LugeException
public boolean deleteAttributeValueFromPerson(java.lang.String uid, java.lang.String attr, java.lang.String val) throws LugeException
uid
- The userID (cn) of the person.attr
- The valid LDAP attribute name.val
- The value of the attribute to be deleted.
LugeException
public boolean modifyPerson(java.lang.String uid, PersonVO pvo, boolean AppendAttributes) throws LugeException
uid
- The userID (cn) of the person.
LugeException
public GroupVO removeAttributeValueFromAllPeople(java.lang.String attrName, java.lang.String attrValue) throws LugeException
attrName
- - the attribute name you want to modifyattrValue
- - the attribute value you are looking to eradicate
getOkPeople
and getProblemPeople
values
for people whose attributes were successfully and unsuccessfully updated.
LugeException
protected void finalize() throws java.lang.Throwable
finalize
in class LugeFacade
java.lang.Throwable
public SearchVO searchUsers(SearchVO svo) throws LugeException
LugeException
public PersonVO personLookup(java.lang.String uid) throws LugeException
uid
- - the unique identifier for the Person
LugeException
public java.lang.String getUserAttributeSingleValue(java.lang.String uid, java.lang.String attr) throws LugeException
uid
- - The uid of the user you want to lookupattr
- Name of the actual ldap attribute that you want returned
LugeException
public java.util.ArrayList getUserAttributeMultiValue(java.lang.String uid, java.lang.String attr) throws LugeException
uid
- - The cn or uid of the user you want to lookup
LugeException
public java.util.Hashtable getUserAttributes(java.lang.String uid, java.lang.String[] attrs) throws LugeException
uid
- - The uid of the user you want to lookup
LugeException
public java.util.ArrayList quickUserSearch(java.lang.String attrName, java.lang.String value) throws LugeException
attrName
- The actual ldap attribute name you want to search onvalue
- The String value you want to search on, wildcards ok.
LugeException
public boolean validateUserPassword(java.lang.String user, java.lang.String passwd) throws LugeException
LugeExceptions
- that specify if the user doesn't exist or if the password is wrong.
LugeException
public boolean personExists(java.lang.String uid)
uid
- - The userName of the person
public boolean userHasAttributeValue(java.lang.String uid, java.lang.String attr, java.lang.String value) throws LugeException
uid
- - The userName of the personattr
- A valid ldap attribute namevalue
- The value you are checking for
LugeException
public boolean userHasAttribute(java.lang.String uid, java.lang.String attr) throws LugeException
uid
- - The userName of the personattr
- A valid ldap attribute name you are checking for
LugeException
|
Copyright 2003, Michael Schwartz All Rights Reserved. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |