Package org.imixs.workflow.xml
Class XMLDataCollectionAdapter
java.lang.Object
org.imixs.workflow.xml.XMLDataCollectionAdapter
An XMLItemCollectionAdapter converts a
org.imixs.workflow.xml.XMLItemCollection into a
org.imixs.workflow.ItemCollection and reverse- Version:
- 1.1
- Author:
- imixs.com - Ralph Soika
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]static XMLDataCollectiongetDataCollection(Collection<ItemCollection> documents) This method transforms a Collectioninto a DocumentCollection static XMLDataCollectiongetDataCollection(Collection<ItemCollection> documents, List<String> itemNames) This method transforms a Collectioninto a XMLDocumentCollection If the attribute List is provided only the corresponding properties will be returned. static XMLDataCollectiongetDataCollection(ItemCollection document) This method transforms a single ItemCollection into a XMLDocumentCollectionstatic XMLDataCollectiongetDataCollection(ItemCollection document, List<String> itemNames) This method transforms a single ItemCollection into a XMLDocumentCollectionstatic List<ItemCollection>putDataCollection(XMLDataCollection xmlDocuments) This Method converts aorg.imixs.workflow.xml.DocumentCollectioninto a List oforg.imixs.workflow.ItemCollectionThe method returns an empty list if the collection is empty or nullstatic List<ItemCollection>readCollection(byte[] byteInput) This method imports an xml entity data byte array and returns a List of ItemCollection objects.static List<ItemCollection>readCollectionFromInputStream(InputStream inputStream) This method imports an xml entity data stream and returns a List of ItemCollection objects.static byte[]writeItemCollection(Collection<ItemCollection> documents) This method writes a collection of ItemCollection into a Byte array representing a XMLDataCollectionstatic byte[]writeItemCollection(ItemCollection document) This method writes a ItemCollection into a Byte array representing a XMLDataCollection
-
Constructor Details
-
XMLDataCollectionAdapter
public XMLDataCollectionAdapter()
-
-
Method Details
-
putDataCollection
This Method converts aorg.imixs.workflow.xml.DocumentCollectioninto a List oforg.imixs.workflow.ItemCollectionThe method returns an empty list if the collection is empty or null- Parameters:
entity-- Returns:
- ItemCollection
-
getDataCollection
This method transforms a Collectioninto a DocumentCollection - Parameters:
documents-- Returns:
-
getDataCollection
public static XMLDataCollection getDataCollection(Collection<ItemCollection> documents, List<String> itemNames) This method transforms a Collectioninto a XMLDocumentCollection If the attribute List is provided only the corresponding properties will be returned. - Parameters:
documents- - collection of ItemCollection objects to be converteditemNames- - optional list of item names to be converted. If null all items will be converted- Returns:
-
getDataCollection
This method transforms a single ItemCollection into a XMLDocumentCollection -
getDataCollection
This method transforms a single ItemCollection into a XMLDocumentCollection -
readCollectionFromInputStream
public static List<ItemCollection> readCollectionFromInputStream(InputStream inputStream) throws jakarta.xml.bind.JAXBException, IOException This method imports an xml entity data stream and returns a List of ItemCollection objects. The method can import any kind of entity data like model or configuration data an xml export of workitems.- Parameters:
inputStream- xml input stream- Returns:
- List of ItemCollection objects
- Throws:
jakarta.xml.bind.JAXBExceptionIOException
-
readCollection
public static List<ItemCollection> readCollection(byte[] byteInput) throws jakarta.xml.bind.JAXBException, IOException This method imports an xml entity data byte array and returns a List of ItemCollection objects. The method can import any kind of entity data like model or configuration data an xml export of workitems.- Parameters:
inputStream- xml input stream- Returns:
- List of ItemCollection objects
- Throws:
jakarta.xml.bind.JAXBExceptionIOException
-
writeItemCollection
public static byte[] writeItemCollection(Collection<ItemCollection> documents) throws jakarta.xml.bind.JAXBException, IOException This method writes a collection of ItemCollection into a Byte array representing a XMLDataCollection- Parameters:
inputStream- xml input stream- Returns:
- List of ItemCollection objects
- Throws:
jakarta.xml.bind.JAXBExceptionIOException
-
writeItemCollection
public static byte[] writeItemCollection(ItemCollection document) throws jakarta.xml.bind.JAXBException, IOException This method writes a ItemCollection into a Byte array representing a XMLDataCollection- Parameters:
inputStream- xml input stream- Returns:
- List of ItemCollection objects
- Throws:
jakarta.xml.bind.JAXBExceptionIOException
-
getBytesFromStream
- Throws:
IOException
-