Class IisPublishDelegate
- All Implemented Interfaces:
IWebServerPublishDelegate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(WebServer webServer, Publication publication) Checks existence of a publication instance in the given web server.Returns a publication with the given name from the given web server.Returns all registered on the given web server publications.getDefaultPublicationLocation(WebServer webServer) Returns default location for the new publications for the given web server.getPublicationUrl(WebServer webServer, String name) ReturnsURLof the publication by the provided publication name in the web server instance.getWebExtension(Publication publication, WebServer webServer) Returns path to the registered 1C:Enterprise runtime ornullif no 1C:Enterprise runtime web extension component was registered.booleanisPublishSupported(WebServer webServer, PublicationType type) Check support of publish process on the given web server instance.booleanisWebExtensionConfigured(Publication publication, Path webExtension, WebServer webServer) Returns whether the provided 1C:Enterprise runtime web extension component is correctly configured for the web server publication.voidpublish(Publication publication, WebServer webServer, Path webExtensions) Publish the given publication instance on the given web server.booleanremove(WebServer webServer, Publication publication) Removes publication with given name from given web server.booleanRestart the target web server.voidupdate(Publication publication, String name, WebServer webServer, Path webExtensions) Edit the given publication on the server.
-
Constructor Details
-
IisPublishDelegate
public IisPublishDelegate()
-
-
Method Details
-
publish
public void publish(Publication publication, WebServer webServer, Path webExtensions) throws WebServerAccessException Description copied from interface:IWebServerPublishDelegatePublish the given publication instance on the given web server. Publications can configure the web server ability to work with 1C:Enterprise web clients, mobile devices, etc.Publication process depends on the
publication typeand may be various.Also can register the given 1C:Enterprise runtime web extension component on the given web server. Note, that some publication types does not support working without 1C:Enterprise runtime web extension component registration.
- Specified by:
publishin interfaceIWebServerPublishDelegate- Parameters:
publication- the publication instance to publish, cannot benullwebServer- the web server to publish the given publication instance to, cannot benullwebExtensions- the path to 1C:Enterprise runtime web component, ornullif component publishing is not needed- Throws:
WebServerAccessException- if publication process fails with some reason
-
update
public void update(Publication publication, String name, WebServer webServer, Path webExtensions) throws WebServerAccessException Description copied from interface:IWebServerPublishDelegateEdit the given publication on the server. Searches publication by the given name in the target web server. Does nothing, if publication not found. Overwrite old publication properties with new values from the given publication.Publication process depends on the
publication typeand may be various.Also can register the given 1C:Enterprise runtime web extension component on the given web server. Note, that some publication types does not support working without 1C:Enterprise runtime web extension component registration.
- Specified by:
updatein interfaceIWebServerPublishDelegate- Parameters:
publication- the publication instance to overwrite found publication with, cannot benullname- of publication to edit, cannot benullor emptywebServer- the web server to edit the given publication instance in, cannot benullwebExtensions- the path to registered 1C:Enterprise runtime web component, ornullif component publishing is not needed- Throws:
WebServerAccessException- if publication process fails with some reason
-
remove
Description copied from interface:IWebServerPublishDelegateRemoves publication with given name from given web server. Returns whether specified publication was actually removed.Note, that actual publication content will not be deleted, but only removed from web server configuration.
- Specified by:
removein interfaceIWebServerPublishDelegate- Parameters:
webServer- the web server to remove publication from, cannot benullpublication- to remove, cannot benull, publication must contain non-null and non-empty name and location values- Returns:
- whether if an element was removed as a result of this call
- Throws:
WebServerAccessException- if removing fails
-
getAll
Description copied from interface:IWebServerPublishDelegateReturns all registered on the given web server publications.- Specified by:
getAllin interfaceIWebServerPublishDelegate- Parameters:
webServer- web server to get publications for, cannot benull- Returns:
- list of all registered on the given web server publications, never
null - Throws:
WebServerAccessException- request fails
-
get
Description copied from interface:IWebServerPublishDelegateReturns a publication with the given name from the given web server.- Specified by:
getin interfaceIWebServerPublishDelegate- Parameters:
webServer- the web server to get publication on, cannot benullname- of publication to get, cannot benull- Returns:
- found publication with given name, or
nullif publication not found - Throws:
WebServerAccessException- request fails
-
contains
public boolean contains(WebServer webServer, Publication publication) throws WebServerAccessException Description copied from interface:IWebServerPublishDelegateChecks existence of a publication instance in the given web server.- Specified by:
containsin interfaceIWebServerPublishDelegate- Parameters:
webServer- the web server to check publication existence on, cannot benullpublication- to check for the existence in the web server, cannot benull- Returns:
- whether the given publication exists on the target web server
- Throws:
WebServerAccessException- if request fails
-
isPublishSupported
Description copied from interface:IWebServerPublishDelegateCheck support of publish process on the given web server instance.- Specified by:
isPublishSupportedin interfaceIWebServerPublishDelegate- Parameters:
webServer- the web server to check publish support for, cannot benulltype- the publication type to check, cannot benull- Returns:
trueif web server supports publishing with the given publication type,falseotherwise
-
restart
Description copied from interface:IWebServerPublishDelegateRestart the target web server.Returns whether web server was successfully restarted. If delegate does not support restarting, it can return
falseimmediately in method implementation.- Specified by:
restartin interfaceIWebServerPublishDelegate- Returns:
- whether the web server was successfully restarted
- Throws:
WebServerAccessException- if request fails
-
getDefaultPublicationLocation
Description copied from interface:IWebServerPublishDelegateReturns default location for the new publications for the given web server. The default publication location is a folder, that can contain sub-folders with publications. Can returnnull, if not defined or web server does not support default publication location.- Specified by:
getDefaultPublicationLocationin interfaceIWebServerPublishDelegate- Parameters:
webServer- the web server to get default publication location for, cannot benull- Returns:
- default location for the new publications for the given web server or
null, if not defined
-
getWebExtension
public Path getWebExtension(Publication publication, WebServer webServer) throws WebServerAccessException Description copied from interface:IWebServerPublishDelegateReturns path to the registered 1C:Enterprise runtime ornullif no 1C:Enterprise runtime web extension component was registered. However returned web extension may not be correctly configured and clients need to check whether web extensionis configured.- Specified by:
getWebExtensionin interfaceIWebServerPublishDelegatewebServer- the web server to get default publication location for, cannot benull- Returns:
- default location for the new publications for the given web server or
nullif not defined - Throws:
WebServerAccessException
-
isWebExtensionConfigured
public boolean isWebExtensionConfigured(Publication publication, Path webExtension, WebServer webServer) throws WebServerAccessException Description copied from interface:IWebServerPublishDelegateReturns whether the provided 1C:Enterprise runtime web extension component is correctly configured for the web server publication. Iffalseis returned then re-publish is required for this publication with this web extension for correct work.- Specified by:
isWebExtensionConfiguredin interfaceIWebServerPublishDelegate- Parameters:
publication- the publication to check, cannot benullwebExtension- path to the 1C:Enterprise runtime web extension component, cannot benullwebServer- the web server to check, cannot benull- Returns:
- whether the provided 1C:Enterprise runtime web extension component is correctly configured for the web server publication
- Throws:
WebServerAccessException- if request fails
-
getPublicationUrl
Description copied from interface:IWebServerPublishDelegateReturnsURLof the publication by the provided publication name in the web server instance.- Specified by:
getPublicationUrlin interfaceIWebServerPublishDelegate- Parameters:
webServer- the web server to get URL for web server, cannot benullname- the name of publication, cannot benullor empty- Returns:
- the URL of publication, never
null - Throws:
WebServerAccessException- if request fails
-