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.SG8Object;
007 import com.mentata.sg8.SG8StringAttribute;
008 import com.mentata.sg8.SG8BooleanAttribute;
009 import com.mentata.sg8.SG8DnAttribute;
010 import com.mentata.sg8.SG8EmailAttribute;
011 import com.mentata.sg8.SG8URLAttribute;
012 import com.mentata.sg8.SG8MLSAttribute;
013
014 /**
015 * A mail group affiliated with University of Michigan.
016 */
017 public class group extends SG8Object {
018
019 /**
020 * Constructs an empty template.
021 *
022 * @param context a containing SG8 context
023 */
024 public group(L3DContext context)
025 throws L3DException {
026
027 // pass the context up the constructor chain
028 super(context);
029
030 // configure the object
031 addObjectclasses(new String[] {"rfc822MailGroup"});
032 prependBase("ou=Groups");
033 setBatch(35);
034 setFormats();
035
036 // define attributes
037 addAttribute("cn", new SG8StringAttribute() );
038 addAttribute("owner", new SG8DnAttribute("person") );
039 addAttribute("member", new SG8DnAttribute("person") );
040 addAttribute("moderator", new SG8EmailAttribute() );
041 addAttribute("description", new SG8StringAttribute() );
042 addAttribute("telephonenumber", new SG8StringAttribute() );
043 addAttribute("facsimiletelephonenumber", new SG8StringAttribute() );
044 addAttribute("postaladdress", new SG8MLSAttribute() );
045 addAttribute("labeleduri", new SG8URLAttribute() );
046 addAttribute("joinable", new SG8BooleanAttribute() );
047 applyLabels();
048
049 // set basic attribute lists for this object class
050 addAttributeList("l3d.identify", new String[] {"cn"} );
051 addAttributeList("l3d.sort", new String[] {"cn"} );
052 addAttributeList("sg8.search", new String[] {"cn", "description"} );
053 addAttributeList("sg8.hyperlink", getAttributeList("l3d.identify") );
054 addAttributeList("sg8.list", new String[] {"description"} );
055
056 // set attribute lists to support retrievability
057 addAttributeList("sg8.highlight", new String[]
058 {"moderator", "owner", "member", "telephonenumber", "facsimiletelephonenumber",
059 "postaladdress", "labeleduri", "joinable"} );
060 addAttributeList("sg8.r_tabtext", new String[]
061 {"cn", "moderator", "joinable", "description"} );
062 addAttributeList("sg8.r_html", new String[]
063 {"cn", "description", "moderator", "owner", "member", "telephonenumber",
064 "facsimiletelephonenumber", "postaladdress", "labeleduri", "joinable"} );
065 addAttributeList("sg8.r_dsml", getAttributeList() );
066 addAttributeList("sg8.r_ldif", getAttributeList() );
067 }
068 }