use of org.kie.workbench.common.dmn.api.definition.v1_1.Context in project webtools.servertools by eclipse.
the class Tomcat50Configuration method modifyWebModule.
/**
* Change a web module.
* @param index int
* @param docBase java.lang.String
* @param path java.lang.String
* @param reloadable boolean
*/
public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
try {
Context context = serverInstance.getContext(index);
if (context != null) {
context.setPath(path);
context.setDocBase(docBase);
context.setReloadable(reloadable ? "true" : "false");
isServerDirty = true;
WebModule module = new WebModule(path, docBase, null, reloadable);
firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
}
} catch (Exception e) {
Trace.trace(Trace.SEVERE, "Error modifying web module " + index, e);
}
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.Context in project webtools.servertools by eclipse.
the class Tomcat55Configuration method modifyWebModule.
/**
* Change a web module.
* @param index int
* @param docBase java.lang.String
* @param path java.lang.String
* @param reloadable boolean
*/
public void modifyWebModule(int index, String docBase, String path, boolean reloadable) {
try {
Context context = serverInstance.getContext(index);
if (context != null) {
context.setPath(path);
context.setDocBase(docBase);
context.setReloadable(reloadable ? "true" : "false");
isServerDirty = true;
WebModule module = new WebModule(path, docBase, null, reloadable);
firePropertyChangeEvent(MODIFY_WEB_MODULE_PROPERTY, new Integer(index), module);
}
} catch (Exception e) {
Trace.trace(Trace.SEVERE, "Error modifying web module " + index, e);
}
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.Context in project webtools.servertools by eclipse.
the class Tomcat55Configuration method addWebModule.
/**
* @see ITomcatConfigurationWorkingCopy#addWebModule(int, ITomcatWebModule)
*/
public void addWebModule(int index, ITomcatWebModule module) {
try {
Context context = serverInstance.createContext(index);
if (context != null) {
context.setDocBase(module.getDocumentBase());
context.setPath(module.getPath());
context.setReloadable(module.isReloadable() ? "true" : "false");
if (module.getMemento() != null && module.getMemento().length() > 0)
context.setSource(module.getMemento());
isServerDirty = true;
firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
}
} catch (Exception e) {
Trace.trace(Trace.SEVERE, "Error adding web module " + module.getPath(), e);
}
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.Context in project webtools.servertools by eclipse.
the class Tomcat60Configuration method addWebModule.
/**
* @see ITomcatConfigurationWorkingCopy#addWebModule(int, ITomcatWebModule)
*/
public void addWebModule(int index, ITomcatWebModule module) {
try {
Context context = serverInstance.createContext(index);
if (context != null) {
context.setDocBase(module.getDocumentBase());
context.setPath(module.getPath());
context.setReloadable(module.isReloadable() ? "true" : "false");
if (module.getMemento() != null && module.getMemento().length() > 0)
context.setSource(module.getMemento());
isServerDirty = true;
firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
}
} catch (Exception e) {
Trace.trace(Trace.SEVERE, "Error adding web module " + module.getPath(), e);
}
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.Context in project webtools.servertools by eclipse.
the class Tomcat70Configuration method addWebModule.
/**
* @see ITomcatConfigurationWorkingCopy#addWebModule(int, ITomcatWebModule)
*/
public void addWebModule(int index, ITomcatWebModule module) {
try {
Context context = serverInstance.createContext(index);
if (context != null) {
context.setDocBase(module.getDocumentBase());
context.setPath(module.getPath());
context.setReloadable(module.isReloadable() ? "true" : "false");
if (module.getMemento() != null && module.getMemento().length() > 0)
context.setSource(module.getMemento());
isServerDirty = true;
firePropertyChangeEvent(ADD_WEB_MODULE_PROPERTY, null, module);
}
} catch (Exception e) {
Trace.trace(Trace.SEVERE, "Error adding web module " + module.getPath(), e);
}
}
Aggregations