use of org.glassfish.web.config.serverbeans.WebModuleConfig in project Payara by payara.
the class SetWebContextParamCommand method setContextParam.
private void setContextParam(final Engine owningEngine, final String paramName, final String paramValue, final String description, final Boolean ignoreDescriptorItem, final ActionReport report) throws PropertyVetoException, TransactionFailure {
WebModuleConfig config = WebModuleConfig.Duck.webModuleConfig(owningEngine);
if (config == null) {
createContextParamOnNewWMC(owningEngine, paramName, paramValue, description, ignoreDescriptorItem);
} else {
ContextParam cp = config.getContextParam(paramName);
if (cp == null) {
createContextParamOnExistingWMC(config, paramName, paramValue, description, ignoreDescriptorItem);
} else {
modifyContextParam(cp, paramValue, description, ignoreDescriptorItem);
succeed(report, "setWebContextParamOverride", "Previous context-param setting of {0} for application/module {1} was overridden.", name, appNameAndOptionalModuleName());
}
}
}
use of org.glassfish.web.config.serverbeans.WebModuleConfig in project Payara by payara.
the class UnsetWebEnvEntryCommand method execute.
public void execute(AdminCommandContext context) {
ActionReport report = context.getActionReport();
try {
WebModuleConfig config = webModuleConfig(report);
if (config == null) {
return;
}
config.deleteEnvEntry(name);
} catch (Exception e) {
fail(report, e, "errUnsetEnvEntry", "Error unsetting env-entry");
}
}
Aggregations