private transient State _state;
private transient String _value;
private transient PopupMenu _popup;
+ /**
+ * Injected application settings service.
+ */
+ private ApplicationSettings _applicationSettings;
private enum State {
closed, open
// Constructor
// ==============================================================================================================================
- public KnowledgeElementFacade(final KnowledgeElementDTO represented) {
+ public KnowledgeElementFacade(final KnowledgeElementDTO represented,
+ final ApplicationSettings app) {
_my = represented;
_state = State.closed;
+ setApplicationSettings(app);
this.refresh(); // Initializes the presentation of my knowledge
}
private void refresh() {
String[] tags = { "<b>", "<i>", "<u>", "<sup>", "<sub>" };
- _popup = ApplicationSettings.getPopupMenu("feedbex");
+ _popup = getApplicationSettings().getPopupMenu("feedbex");
_value = _my.getValue();
// One line extract of the knowledge value
}
return res;
}
+
+ /**
+ * Get the applicationSettings.
+ *
+ * @return the applicationSettings
+ */
+ public ApplicationSettings getApplicationSettings() {
+ return _applicationSettings;
+ }
+
+ /**
+ * Set the applicationSettings.
+ *
+ * @param applicationSettings
+ * the applicationSettings to set
+ */
+ private void setApplicationSettings(
+ final ApplicationSettings applicationSettings) {
+ _applicationSettings = applicationSettings;
+ }
}
\ No newline at end of file