Package com.azure.storage.blob.models
Class StaticWebsite
java.lang.Object
com.azure.storage.blob.models.StaticWebsite
- All Implemented Interfaces:
com.azure.xml.XmlSerializable<StaticWebsite>
public final class StaticWebsite
extends Object
implements com.azure.xml.XmlSerializable<StaticWebsite>
The properties that enable an account to host a static website.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StaticWebsite
fromXml
(com.azure.xml.XmlReader xmlReader) Reads an instance of StaticWebsite from the XmlReader.static StaticWebsite
Reads an instance of StaticWebsite from the XmlReader.Get the defaultIndexDocumentPath property: Absolute path of the default index page.Get the errorDocument404Path property: The absolute path of the custom 404 page.Get the indexDocument property: The default name of the index page under each directory.boolean
Get the enabled property: Indicates whether this account is hosting a static website.setDefaultIndexDocumentPath
(String defaultIndexDocumentPath) Set the defaultIndexDocumentPath property: Absolute path of the default index page.setEnabled
(boolean enabled) Set the enabled property: Indicates whether this account is hosting a static website.setErrorDocument404Path
(String errorDocument404Path) Set the errorDocument404Path property: The absolute path of the custom 404 page.setIndexDocument
(String indexDocument) Set the indexDocument property: The default name of the index page under each directory.com.azure.xml.XmlWriter
toXml
(com.azure.xml.XmlWriter xmlWriter) com.azure.xml.XmlWriter
-
Constructor Details
-
StaticWebsite
public StaticWebsite()Creates an instance of StaticWebsite class.
-
-
Method Details
-
isEnabled
public boolean isEnabled()Get the enabled property: Indicates whether this account is hosting a static website.- Returns:
- the enabled value.
-
setEnabled
Set the enabled property: Indicates whether this account is hosting a static website.- Parameters:
enabled
- the enabled value to set.- Returns:
- the StaticWebsite object itself.
-
getIndexDocument
Get the indexDocument property: The default name of the index page under each directory.- Returns:
- the indexDocument value.
-
setIndexDocument
Set the indexDocument property: The default name of the index page under each directory.- Parameters:
indexDocument
- the indexDocument value to set.- Returns:
- the StaticWebsite object itself.
-
getErrorDocument404Path
Get the errorDocument404Path property: The absolute path of the custom 404 page.- Returns:
- the errorDocument404Path value.
-
setErrorDocument404Path
Set the errorDocument404Path property: The absolute path of the custom 404 page.- Parameters:
errorDocument404Path
- the errorDocument404Path value to set.- Returns:
- the StaticWebsite object itself.
-
getDefaultIndexDocumentPath
Get the defaultIndexDocumentPath property: Absolute path of the default index page.- Returns:
- the defaultIndexDocumentPath value.
-
setDefaultIndexDocumentPath
Set the defaultIndexDocumentPath property: Absolute path of the default index page.- Parameters:
defaultIndexDocumentPath
- the defaultIndexDocumentPath value to set.- Returns:
- the StaticWebsite object itself.
-
toXml
- Specified by:
toXml
in interfacecom.azure.xml.XmlSerializable<StaticWebsite>
- Throws:
XMLStreamException
-
toXml
public com.azure.xml.XmlWriter toXml(com.azure.xml.XmlWriter xmlWriter, String rootElementName) throws XMLStreamException - Specified by:
toXml
in interfacecom.azure.xml.XmlSerializable<StaticWebsite>
- Throws:
XMLStreamException
-
fromXml
Reads an instance of StaticWebsite from the XmlReader.- Parameters:
xmlReader
- The XmlReader being read.- Returns:
- An instance of StaticWebsite if the XmlReader was pointing to an instance of it, or null if it was pointing to XML null.
- Throws:
XMLStreamException
- If an error occurs while reading the StaticWebsite.
-
fromXml
public static StaticWebsite fromXml(com.azure.xml.XmlReader xmlReader, String rootElementName) throws XMLStreamException Reads an instance of StaticWebsite from the XmlReader.- Parameters:
xmlReader
- The XmlReader being read.rootElementName
- Optional root element name to override the default defined by the model. Used to support cases where the model can deserialize from different root element names.- Returns:
- An instance of StaticWebsite if the XmlReader was pointing to an instance of it, or null if it was pointing to XML null.
- Throws:
XMLStreamException
- If an error occurs while reading the StaticWebsite.
-