|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.grouper.xml.XmlExporter
public class XmlExporter
Utility class for exporting data from the Groups Registry in XML format.
This class can export all-or-port of a Groups Registry as a stem/group
hierarchy. Alternatively, collections of Stem
s, Group
s,
Subject
s or Membership
s may be exported.
Exported stem and group data may be imported, as is, or with modifications,
into the same repository or into another repository. See XmlImporter
.
The API for this class will change in future Grouper releases.
Constructor Summary | |
---|---|
XmlExporter(GrouperSession s,
java.util.Properties userOptions)
Export the Groups Registry to XML. |
Method Summary | |
---|---|
void |
export(java.io.Writer writer)
Exports data for the entire repository |
void |
export(java.io.Writer writer,
java.util.Collection items,
java.lang.String msg)
Export a Collection of Stems, Groups, Members, Subjects or Memberships. |
void |
export(java.io.Writer writer,
Group g,
boolean relative,
boolean includeParent)
Export a single group. |
void |
export(java.io.Writer writer,
Stem ns,
boolean relative)
Export a single stem. |
void |
export(java.io.Writer writer,
Stem ns,
boolean relative,
boolean childrenOnly)
Export a single stem. |
java.util.Properties |
internal_getOptions()
|
java.lang.String |
internal_groupToXML(Group g,
boolean writeAbsoluteName)
Return a String containing a Group as XML. |
java.lang.String |
internal_membershipToXML(Membership ms)
Return a String containing a Membership as XML. |
java.lang.String |
internal_subjectToXML(edu.internet2.middleware.subject.Subject subj,
java.lang.String immediate)
Return a String containing a Subject as XML. |
static void |
main(java.lang.String[] args)
Export Groups Registry to XML output. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlExporter(GrouperSession s, java.util.Properties userOptions) throws GrouperException
The export process is configured using the follow properties.
Key | Values | Default Value | Description |
export.metadata | true/false | true | If true Group type and field information as well as Subject sources will be exported. |
export.data | true/false | true | If true data will be exported. |
export.privs.naming | true/false | true | If true naming privileges will be exported along with Stems. |
export.privs.access | true/false | true | If true access privileges will be exported along with Groups. |
export.privs.immediate-only | true/false | false | If true only directly granted privileges will be exported. |
export.group.members | true/false | true | If true group memberships are exported. |
export.group.members.immediate-only | true/false | true | If true only immediate group memberships will be exported. |
export.group.lists | true/false | true | If true custom list attributes will be exported. |
export.group.lists.immediate-only | true/false | true | If true only immediate list members will be exported. |
export.uuids | true/false | true | If true group and stem uuids will be exported |
export.group.internal-attributes | true/false | true | If true system-maintained Group attributes (eg. modifyDate) will be exported. |
export.group.custom-attributes | true/false | true | If true custom attributes will be exported. |
export.stem.internal-attributes | true/false | true | If true system-maintained Stem attributes (eg. modifyDate) will be exported. |
export.privs.for-parents | true/false | false | If true and only exporting a partial hierarchy then privileges for parent stems will be exported. |
export.data.fail-on-unresolvable-subject | true/false | false | If true and there is a problem resolving a subject attribute abort. |
export.subject-attributes.source.<source name>.<subject type> | Space separated list of attribute names | ? | Specifices any attributes that should be exported with a Subject given the specified Source and Subject Type. |
export.subject-attributes.source.<source name> | Space separated list of attribute names | ? | Specifies any attributes that should be exported with a Subject given the specified Source. |
export.subject-attributes.type.<subject type> | Space separated list of attribute names | ? | Specifies any attributes that should be exported with a Subject given the Subject Type. |
s
- Perform export within this session.userOptions
- User-specified configuration parameters.
GrouperException
Method Detail |
---|
public static void main(java.lang.String[] args)
public void export(java.io.Writer writer) throws GrouperException
writer
- Write XML here.
GrouperException
public void export(java.io.Writer writer, Group g, boolean relative, boolean includeParent) throws GrouperException
writer
- Write XML here.g
- Export this group.relative
- If true export in a format suitable for relocating within the Groups Registry.includeParent
- Include parent stem in export.
GrouperException
public void export(java.io.Writer writer, Stem ns, boolean relative) throws GrouperException
writer
- Write XML here.ns
- Export this stem.relative
- If true export in a format suitable for relocating within the Groups Registry.
GrouperException
public void export(java.io.Writer writer, Stem ns, boolean relative, boolean childrenOnly) throws GrouperException
writer
- Write XML here.ns
- Export this stem.relative
- If true export in a format suitable for relocating within the Groups Registry.childrenOnly
- If true omit the actual stem and only export child stems/groups
GrouperException
public void export(java.io.Writer writer, java.util.Collection items, java.lang.String msg) throws GrouperException
NOTE: XmlImporter cannot currently import the XML generated by this method.
writer
- Write XML here.items
- Collection to export.msg
- Comment to indicate how collection was generated.
GrouperException
public java.util.Properties internal_getOptions()
public java.lang.String internal_groupToXML(Group g, boolean writeAbsoluteName)
public java.lang.String internal_membershipToXML(Membership ms) throws GroupNotFoundException, MemberNotFoundException, edu.internet2.middleware.subject.SubjectNotFoundException
GroupNotFoundException
MemberNotFoundException
edu.internet2.middleware.subject.SubjectNotFoundException
public java.lang.String internal_subjectToXML(edu.internet2.middleware.subject.Subject subj, java.lang.String immediate)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |