org.kuali.rice.kim.impl.jaxb
Class KimImporterAndExporter

java.lang.Object
  extended by org.kuali.rice.kim.impl.jaxb.KimImporterAndExporter
All Implemented Interfaces:
XmlLoader, Exporter

public class KimImporterAndExporter
extends Object
implements XmlLoader, Exporter

Imports and exports roles and permissions from/to XML via JAXB.

TODO: Do we need to restrict XML additions or updates based on which user is performing the ingestion?

TODO: It may be best to make this class into a "service" instead.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
KimImporterAndExporter()
           
 
Method Summary
 void export(Class<?> dataObjectClass, List<? extends Object> dataObjects, String exportFormat, OutputStream outputStream)
          Exports the List of BusinessObjects to the specified ExportFormat.
 List<String> getSupportedFormats(Class<?> dataObjectClass)
          Returns a List of ExportFormats supported by this Exporter for the given DataOject class.
 void loadXml(InputStream inputStream, String principalId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KimImporterAndExporter

public KimImporterAndExporter()
Method Detail

loadXml

public void loadXml(InputStream inputStream,
                    String principalId)
Specified by:
loadXml in interface XmlLoader
See Also:
XmlLoader.loadXml(java.io.InputStream, java.lang.String)

export

public void export(Class<?> dataObjectClass,
                   List<? extends Object> dataObjects,
                   String exportFormat,
                   OutputStream outputStream)
            throws IOException,
                   ExportNotSupportedException
Description copied from interface: Exporter
Exports the List of BusinessObjects to the specified ExportFormat.

The resulting output of the export operation should be written to the given OutputStream

Specified by:
export in interface Exporter
Parameters:
dataObjectClass - the type of DataObjects being exported
dataObjects - a List of DataObjects to export
exportFormat - the export format in which to export the DataObjects
outputStream - the OutputStream to write the exported data to
Throws:
IOException - if the process encounters an I/O issue
ExportNotSupportedException - if the given ExportFormat is not supported
See Also:
Exporter.export(java.lang.Class, java.util.List, java.lang.String, java.io.OutputStream)

getSupportedFormats

public List<String> getSupportedFormats(Class<?> dataObjectClass)
Description copied from interface: Exporter
Returns a List of ExportFormats supported by this Exporter for the given DataOject class.

Specified by:
getSupportedFormats in interface Exporter
Parameters:
dataObjectClass - the class of the DataObjects being exported
Returns:
a List of supported ExportFormats
See Also:
Exporter.getSupportedFormats(java.lang.Class)


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.