* @return SUCCESS if no exceptions
*/
public String doInitialize() {
- mystudy = getOpenStudy();
+ _openStudy = getOpenStudy();
setMenuProperty("study");
setTitleProperty("study");
try {
User user = getConnectedUser();
- mystudy = getOpenStudy();
+ _openStudy = getOpenStudy();
- Step step = mystudy.getSelectedStep();
+ Step step = _openStudy.getSelectedStep();
Scenario scene = (Scenario) step.getOwner(); // It is necessarily a Scenario
if ((title == null) || (value == null)) {
} else { // Edition of a knowledge
getKnowledgeElementService().update(kelm, value);
}
- mystudy.update(kelm); // For updating the truncated value
+ _openStudy.update(kelm); // For updating the truncated value
} else { // Addition of a new Knowledge Element
KnowledgeElement.Properties kprop = new KnowledgeElement.Properties();
KnowledgeElementType ktype = getKnowledgeElementTypeService()
.selectType(Integer.valueOf(type));
kprop.setType(ktype).setTitle(title).setValue(value).setAuthor(
user);
- mystudy.add(getScenarioService().addKnowledgeElement(scene,
+ _openStudy.add(getScenarioService().addKnowledgeElement(scene,
kprop));
- getMenu("study").selects(mystudy.getSelection()); // Updates the menu icon, in case of first added document
+ getMenu("study").selects(_openStudy.getSelection()); // Updates the menu icon, in case of first added document
}
return SUCCESS;
} catch (RuntimeException saverror) {
* @return SUCCESS if no exceptions
*/
public String doDeleteKnowledge() {
- mystudy = getOpenStudy();
- Step step = mystudy.getSelectedStep();
+ _openStudy = getOpenStudy();
+ Step step = _openStudy.getSelectedStep();
Scenario scene = (Scenario) step.getOwner(); // It is necessarily a Scenario
KnowledgeElement kelm = scene.getKnowledgeElement(Integer
- .valueOf(myindex));
+ .valueOf(_myindex));
getScenarioService().removeKnowledgeElement(scene, kelm); // The knowledge element necessarily exists
- mystudy.remove(kelm);
+ _openStudy.remove(kelm);
updateMenu();
return SUCCESS;
* @return the selected knowledge element
*/
private KnowledgeElement getKnowledgeElement() {
- mystudy = getOpenStudy();
- Step step = mystudy.getSelectedStep();
+ _openStudy = getOpenStudy();
+ Step step = _openStudy.getSelectedStep();
Scenario scene = (Scenario) step.getOwner(); // It is necessarily a Scenario
- return scene.getKnowledgeElement(Integer.valueOf(myindex));
+ return scene.getKnowledgeElement(Integer.valueOf(_myindex));
}
/**
* Update current menu.
*/
private void updateMenu() {
- getMenu("study").selects(mystudy.getSelection()); // Updates the menu icon, in case of last removed document
+ getMenu("study").selects(_openStudy.getSelection()); // Updates the menu icon, in case of last removed document
setMenuProperty("study");
setTitleProperty("study");
*/
public String getSelectedKnowledge() {
// -------------------------------------
- return myindex;
+ return _myindex;
}
/**