Package org.duracloud.storage.xml
Class StorageAccountsDocumentBinding
java.lang.Object
org.duracloud.storage.xml.StorageAccountsDocumentBinding
This class (de)serializes durastore acct configuration between objects and xml.
- Author:
- Andrew Woods Date: Apr 21, 2010
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.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)createStorageAccountsFrom(org.jdom.Element accounts) This method deserializes the provided xml into a durastore acct config object.Creates storage accounts listing from XML which includes only the storage accounts list (not the full DuraStore config.createXmlFrom(Collection<StorageAccount> accts, boolean includeCredentials, boolean includeOptions) Converts the provided DuraStore acct configuration into a stand-alone XML document.
-
Constructor Details
-
StorageAccountsDocumentBinding
public StorageAccountsDocumentBinding()
-
-
Method Details
-
createStorageAccountsFrom
This method deserializes the provided xml into a durastore acct config object.- Parameters:
accounts-- Returns:
-
createStorageAccountsFromXml
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:
-