configuration.httpListeners.jsf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of console-web-plugin Show documentation
Show all versions of console-web-plugin Show documentation
Web container plugin bundle for GlassFish Admin Console
The newest version!
$attribute{tableRowGroup});
getSelectedSingleMapRows(TableRowGroup="${tableRowGroup}" selectedRows=>$attribute{selectedRows});
foreach (var="row" list="${selectedRows}") {
setPageSessionAttribute(key="networkListenerName" value="#{row['name']}");
setPageSessionAttribute(key="networkListenerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners/network-listener");
gf.restRequest(endpoint="#{pageSession.networkListenerUrl}/#{pageSession.networkListenerName}", method="get", result="#{pageSession.networkListAttrs}");
setPageSessionAttribute(key="protocolName" value="#{pageSession.networkListAttrs.data.extraProperties.entity['protocol']}");
setPageSessionAttribute(key="protocolUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/protocols/protocol/#{pageSession.protocolName}");
setPageSessionAttribute(key="protocolHttpUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/protocols/protocol/#{pageSession.protocolName}/http");
setPageSessionAttribute(key="virtualServerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/http-service/virtual-server");
gf.checkIfEndPointExist(endpoint="#{pageSession.protocolHttpUrl}", exists="#{pageSession.protocolHttpExist}");
// check if there is no listener exists for this protocol and it was created by GUI, then delete
gf.getChildrenNamesList(endpoint="#{pageSession.networkListenerUrl}", id="name", result="#{pageSession.networkListeners}");
createList(size="0" result="#{pageSession.listenerList}");
foreach (var="listener" list="#{pageSession.networkListeners}") {
gf.restRequest(endpoint="#{pageSession.networkListenerUrl}/#{listener}.json", method="get", result="#{pageSession.networkListenerAttrs}");
if ("#{pageSession.networkListenerAttrs.data.extraProperties.entity['protocol']}=#{pageSession.protocolName}"){
listAdd(value="#{pageSession.networkListAttrs.data.extraProperties.entity['name']}" list="#{pageSession.listenerList}");
}
setPageSessionAttribute(key="listSize" value="#{pageSession.listenerList.size()}");
setPageSessionAttribute(key="protocolExtn" value="$resource{i18n_web.grizzly.protocolExtension}");
setPageSessionAttribute(key="deleteProcotol" value="#{false}");
if ("#{pageSession.listSize}=1") {
if ("#{pageSession.protocolName}=#{pageSession.networkListenerName}$resource{i18n_web.grizzly.protocolExtension}") {
setPageSessionAttribute(key="deleteProcotol" value="#{true}");
}
}
}
if (#{pageSession.protocolHttpExist}) {
gf.restRequest(endpoint="#{pageSession.protocolHttpUrl}", method="get", result="#{pageSession.protocolAttrHttp}");
setPageSessionAttribute(key="vsName" value="#{pageSession.protocolAttrHttp.data.extraProperties.entity['defaultVirtualServer']}");
gf.restRequest(endpoint="#{pageSession.virtualServerUrl}/#{vsName}", method="get", result="#{pageSession.vsAttrs}");
changeNetworkListenersInVS(vsAttrs="#{pageSession.vsAttrs.data.extraProperties.entity}", listenerName="#{pageSession.networkListAttrs.data.extraProperties.entity['name']}", addFlag="{#false}", result="#{pageSession.vsAttrModified}");
gf.restRequest(endpoint="#{pageSession.virtualServerUrl}/#{vsName}", attrs="#{pageSession.vsAttrModified}", method="post");
}
gf.restRequest(endpoint="#{pageSession.networkListenerUrl}/#{pageSession.networkListenerName}?target=#{pageSession.valueMap['target']}", method="delete");
if (#{pageSession.deleteProcotol}) {
gf.restRequest(endpoint="#{pageSession.protocolUrl}?target=#{pageSession.valueMap['target']}", method="delete");
}
}
gf.redirect(page="#{pageSession.listLink}");
/>
$page{configName} );
urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}");
setPageSessionAttribute(key="childType" value="network-listener");
setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners");
setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}");
setPageSessionAttribute(key="rest-api" value="true");
gf.getChildList(parentEndpoint="#{pageSession.parentUrl}", childType="#{pageSession.childType}", result="#{requestScope.listOfRows}");
createMap(result="#{pageSession.valueMap}");
mapPut(map="#{pageSession.valueMap}" key="target" value="#{pageSession.configName}");
setPageSessionAttribute(key="confirmDeleteMsg" value="$resource{i18n_web.msg.JS.confirmDeleteNL}");
setPageSessionAttribute(key="createLink" value="#{request.contextPath}/web/configuration/httpListenerNew.jsf?configName=#{configName}");
setPageSessionAttribute(key="listLink" value="#{request.contextPath}/web/configuration/httpListeners.jsf?configName=#{configName}");
setPageSessionAttribute(key="editLink" value="#{request.contextPath}/web/configuration/httpListenerEdit.jsf?configName=#{configName}");
setPageSessionAttribute(key="tableTitle" value="$resource{i18n_web.grizzly.networkListeners.tableName}");
/>
"
#include "/common/shared/alertMsg.inc"
#include "/common/shared/configNameSection.inc"
$page{tableId});
/>
#include "/common/shared/listTableConfigButtons.inc"
$page{tableRowGroupId});
/>
#include "/common/shared/changeButtonsJS.inc"