Package org.duracloud.storage.xml
Class StorageAccountsDocumentBinding
- java.lang.Object
-
- org.duracloud.storage.xml.StorageAccountsDocumentBinding
-
public class StorageAccountsDocumentBinding extends Object
This class (de)serializes durastore acct configuration between objects and xml.- Author:
- Andrew Woods Date: Apr 21, 2010
-
-
Constructor Summary
Constructors Constructor Description StorageAccountsDocumentBinding()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jdom.ElementcreateDocumentFrom(Collection<StorageAccount> accts, boolean includeCredentials, boolean includeOptions)Converts the provided DuraStore acct configuration into an Xml element, to be included in a larger Xml document (likely DuraStore config)List<StorageAccount>createStorageAccountsFrom(org.jdom.Element accounts)This method deserializes the provided xml into a durastore acct config object.List<StorageAccount>createStorageAccountsFromXml(InputStream xml)Creates storage accounts listing from XML which includes only the storage accounts list (not the full DuraStore config.StringcreateXmlFrom(Collection<StorageAccount> accts, boolean includeCredentials, boolean includeOptions)Converts the provided DuraStore acct configuration into a stand-alone XML document.
-
-
-
Method Detail
-
createStorageAccountsFrom
public List<StorageAccount> createStorageAccountsFrom(org.jdom.Element accounts)
This method deserializes the provided xml into a durastore acct config object.- Parameters:
accounts-- Returns:
-
createStorageAccountsFromXml
public List<StorageAccount> createStorageAccountsFromXml(InputStream xml)
Creates storage accounts listing from XML which includes only the storage accounts list (not the full DuraStore config. This is used to parse the response of the GET stores DuraStore REST call.- Parameters:
xml-- Returns:
-
createDocumentFrom
public org.jdom.Element createDocumentFrom(Collection<StorageAccount> accts, boolean includeCredentials, boolean includeOptions)
Converts the provided DuraStore acct configuration into an Xml element, to be included in a larger Xml document (likely DuraStore config)- Parameters:
accts-- Returns:
-
createXmlFrom
public String createXmlFrom(Collection<StorageAccount> accts, boolean includeCredentials, boolean includeOptions)
Converts the provided DuraStore acct configuration into a stand-alone XML document. This is used for the DuraStore GET stores REST call.- Parameters:
accts-- Returns:
-
-