|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.grouper.ui.util.MembershipImportManager
public class MembershipImportManager
Class that reads an XML configuration file and hands off actual data import to an implementation associated with the selected import format. The configuration file is determined by looking up the media.properties key 'membership-import.config'. The base Grouper UI distribution does not have a value set. If you want to allow membership import you must configure one or more formats appropriate to your site.
<membership-import> <format name="Tab separated" separator="\t" id-field="1" field-type="id" ignore-existing="true" class="edu.internet2.middleware.grouper.ui.util.DefaultMembershipImporter"/> <format name="Comma separated" separator="," id-field="1" field-type="id" ignore-existing="true" class="edu.internet2.middleware.grouper.ui.util.DefaultMembershipImporter"/> </membership-import>
ignore-existing=true indicates that no error should be reported if an imported Subject is already a member of the group
class specifies the implementation for this format
name is the text that users will see and select - unless there is only one format, in
which case it will be used as a default.
Other attributes are interpreted by the implementation class. There is no formal DTD/Schema.
Constructor Summary | |
---|---|
MembershipImportManager()
|
Method Summary | |
---|---|
List |
getAvailableFormats()
Returns the configured import formats |
boolean |
isActive()
Returns true if the XML configuration file exists and there is at least one import format defined. |
int |
load(String format,
Group group,
Reader input,
PrintWriter output,
Field field)
Looks up the configuration for the supplied format, instantiates the configured implemetation class and calls its 'load' method |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MembershipImportManager() throws Exception
config
- - media.properties. The key 'membership-import.config' defines XML configuratoin filenav
- - nav.properties. Provides localized messages
Exception
Method Detail |
---|
public boolean isActive()
public List getAvailableFormats() throws Exception
Exception
public int load(String format, Group group, Reader input, PrintWriter output, Field field) throws Exception, IOException, SchemaException
format
- group
- input
- output
- field
-
IOException
SchemaException
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |