你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

StaticWebsite Class

  • java.lang.Object
    • com.azure.storage.blob.models.StaticWebsite

Implements

public final class StaticWebsite
implements XmlSerializable<StaticWebsite>

The properties that enable an account to host a static website.

Constructor Summary

Constructor Description
StaticWebsite()

Creates an instance of StaticWebsite class.

Method Summary

Modifier and Type Method and Description
static StaticWebsite fromXml(XmlReader xmlReader)

Reads an instance of StaticWebsite from the XmlReader.

static StaticWebsite fromXml(XmlReader xmlReader, String rootElementName)

Reads an instance of StaticWebsite from the XmlReader.

String getDefaultIndexDocumentPath()

Get the defaultIndexDocumentPath property: Absolute path of the default index page.

String getErrorDocument404Path()

Get the errorDocument404Path property: The absolute path of the custom 404 page.

String getIndexDocument()

Get the indexDocument property: The default name of the index page under each directory.

boolean isEnabled()

Get the enabled property: Indicates whether this account is hosting a static website.

StaticWebsite setDefaultIndexDocumentPath(String defaultIndexDocumentPath)

Set the defaultIndexDocumentPath property: Absolute path of the default index page.

StaticWebsite setEnabled(boolean enabled)

Set the enabled property: Indicates whether this account is hosting a static website.

StaticWebsite setErrorDocument404Path(String errorDocument404Path)

Set the errorDocument404Path property: The absolute path of the custom 404 page.

StaticWebsite setIndexDocument(String indexDocument)

Set the indexDocument property: The default name of the index page under each directory.

XmlWriter toXml(XmlWriter xmlWriter)
XmlWriter toXml(XmlWriter xmlWriter, String rootElementName)

Methods inherited from java.lang.Object

Constructor Details

StaticWebsite

public StaticWebsite()

Creates an instance of StaticWebsite class.

Method Details

fromXml

public static StaticWebsite fromXml(XmlReader xmlReader)

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(XmlReader xmlReader, String rootElementName)

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.

getDefaultIndexDocumentPath

public String getDefaultIndexDocumentPath()

Get the defaultIndexDocumentPath property: Absolute path of the default index page.

Returns:

the defaultIndexDocumentPath value.

getErrorDocument404Path

public String getErrorDocument404Path()

Get the errorDocument404Path property: The absolute path of the custom 404 page.

Returns:

the errorDocument404Path value.

getIndexDocument

public String getIndexDocument()

Get the indexDocument property: The default name of the index page under each directory.

Returns:

the indexDocument value.

isEnabled

public boolean isEnabled()

Get the enabled property: Indicates whether this account is hosting a static website.

Returns:

the enabled value.

setDefaultIndexDocumentPath

public StaticWebsite setDefaultIndexDocumentPath(String defaultIndexDocumentPath)

Set the defaultIndexDocumentPath property: Absolute path of the default index page.

Parameters:

defaultIndexDocumentPath - the defaultIndexDocumentPath value to set.

Returns:

the StaticWebsite object itself.

setEnabled

public StaticWebsite setEnabled(boolean enabled)

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.

setErrorDocument404Path

public StaticWebsite setErrorDocument404Path(String errorDocument404Path)

Set the errorDocument404Path property: The absolute path of the custom 404 page.

Parameters:

errorDocument404Path - the errorDocument404Path value to set.

Returns:

the StaticWebsite object itself.

setIndexDocument

public StaticWebsite setIndexDocument(String indexDocument)

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.

toXml

public XmlWriter toXml(XmlWriter xmlWriter)

Parameters:

xmlWriter

Throws:

toXml

public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName)

Parameters:

xmlWriter
rootElementName

Throws:

Applies to