001 package com.mentata.examples.umich;
002
003 // import necessary classes
004 import com.mentata.l3d.L3DContext;
005 import com.mentata.l3d.L3DException;
006 import com.mentata.sg8.SG8ReverseDnAttribute;
007 import com.mentata.sg8.core.inetorgperson;
008
009 /**
010 * A person affiliated with University of Michigan.
011 */
012 public class person extends inetorgperson {
013
014 /**
015 * Constructs an empty template.
016 *
017 * @param context a containing SG8 context
018 */
019 public person(L3DContext context)
020 throws L3DException {
021
022 // pass the context up the constructor chain
023 super(context);
024
025 // configure the object
026 prependBase("ou=People");
027 setFilter("(uid=*)");
028 setBatch(40);
029 setFormats();
030 addAttribute("owner", new SG8ReverseDnAttribute("group", "owner") );
031 addAttribute("member", new SG8ReverseDnAttribute("group", "member") );
032 applyLabels();
033
034 // set basic attribute lists for this object class
035 addAttributeList("l3d.identify", new String[] {"uid", "cn"} );
036 addAttributeList("l3d.sort", new String[] {"sn", "cn"} );
037 addAttributeList("sg8.search", new String[] {"sn", "cn", "title"} );
038 addAttributeList("sg8.sortable", new String[] {"givenname", "sn", "title", "uid"} );
039 addAttributeList("sg8.hyperlink", getAttributeList("l3d.identify") );
040 addAttributeList("sg8.list", new String[] {"title"} );
041
042 // set attribute lists to support retrievability
043 addAttributeList("sg8.highlight", new String[]
044 {"ou", "mail", "telephonenumber", "facsimiletelephonenumber", "mobile",
045 "homephone", "postaladdress", "homepostaladdress", "labeleduri"} );
046 addAttributeList("sg8.also", new String[] {"owner", "member"} );
047 addAttributeList("sg8.r_tabtext", new String[]
048 {"uid", "cn", "mail", "telephonenumber"} );
049 addAttributeList("sg8.r_html", new String[]
050 {"cn", "title", "ou", "mail", "telephonenumber", "facsimiletelephonenumber",
051 "mobile", "homephone", "postaladdress", "homepostaladdress", "labeleduri"} );
052 addAttributeList("sg8.r_dsml", getAttributeList() );
053 addAttributeList("sg8.r_ldif", getAttributeList() );
054 }
055 }