use of de.janrufmonitor.framework.configuration.IConfigManager in project janrufmonitor by tbrandt77.
the class MacAddressBookProxy method ensureEditorConfigurationCatergories.
@SuppressWarnings("unchecked")
public void ensureEditorConfigurationCatergories(List subfolders) {
List ol = new ArrayList();
IConfigManager mgr = this.getRuntime().getConfigManagerFactory().getConfigManager();
String value = mgr.getProperty("ui.jface.application.editor.Editor", "categories");
if (value.trim().length() > 0) {
String[] values = value.split(",");
for (int i = 0; i < values.length; i++) {
ol.add(values[i]);
}
}
for (int i = 0; i < subfolders.size(); i++) {
if (!ol.contains(subfolders.get(i))) {
ol.add(subfolders.get(i));
// mgr.setProperty("ui.jface.application.editor.Editor", "filter_cat_ol"+i, "(5,category="+subfolders.get(i)+")");
}
}
value = "";
for (int i = 0; i < ol.size(); i++) {
value += ol.get(i) + ",";
}
mgr.setProperty("ui.jface.application.editor.Editor", "categories", value);
mgr.saveConfiguration();
getRuntime().getConfigurableNotifier().notifyByNamespace("ui.jface.application.editor.Editor");
}
use of de.janrufmonitor.framework.configuration.IConfigManager in project janrufmonitor by tbrandt77.
the class Formatter method getParsedPhonenumber.
/**
* Parses phonenumber object in the specified text representation.
* The wildcard definitions are taken for parsing.
*
* @param text text to parse
* @param phonenumber object to get the information from
* @return parsed text
* @deprecated
*/
public String getParsedPhonenumber(String text, IPhonenumber pn) {
if (pn == null)
return text;
IConfigManager cfg = this.m_runtime.getConfigManagerFactory().getConfigManager();
String callernumberExpression = cfg.getProperty(IJAMConst.GLOBAL_NAMESPACE, IJAMConst.GLOBAL_VARIABLE_CALLERNUMBER);
if (pn.isClired()) {
text = StringUtils.replaceString(text, IJAMConst.GLOBAL_VARIABLE_CALLERNUMBER, this.m_runtime.getConfigManagerFactory().getConfigManager().getProperty(IJAMConst.GLOBAL_NAMESPACE, IJAMConst.GLOBAL_CLIR));
} else if (pn.getIntAreaCode().equalsIgnoreCase(IJAMConst.INTERNAL_CALL)) {
// added: 2009/01/21: handling for internal calls
text = StringUtils.replaceString(text, IJAMConst.GLOBAL_VARIABLE_CALLERNUMBER, pn.getCallNumber());
} else {
text = StringUtils.replaceString(text, IJAMConst.GLOBAL_VARIABLE_CALLERNUMBER, callernumberExpression);
text = this.getParsedIntAreaCode(text, pn);
text = this.getParsedAreaCode(text, pn);
text = this.getParsedCallnumber(text, pn);
// added: 2003/10/29: remove internal string on internal calls
text = StringUtils.replaceString(text, IJAMConst.INTERNAL_CALL, "");
}
text = this.cleanString(text.trim());
return text.trim();
}
use of de.janrufmonitor.framework.configuration.IConfigManager in project janrufmonitor by tbrandt77.
the class Formatter method getParsedName.
/**
* Parses Name object in the specified text representation.
* The wildcard definitions are taken for parsing.
*
* @param text text to parse
* @param Name object to get the information from
* @return parsed text
* @deprecated
*/
public String getParsedName(String text, IName name) {
if (name == null)
return text;
IConfigManager cfg = this.m_runtime.getConfigManagerFactory().getConfigManager();
// komplex types
String callernameExpression = cfg.getProperty(IJAMConst.GLOBAL_NAMESPACE, IJAMConst.GLOBAL_VARIABLE_CALLERNAME);
text = StringUtils.replaceString(text, IJAMConst.GLOBAL_VARIABLE_CALLERNAME, callernameExpression);
// parse caller attributes
IAttributeMap m = this.m_runtime.getCallerFactory().createAttributeMap();
m.add(this.m_runtime.getCallerFactory().createAttribute(IJAMConst.ATTRIBUTE_NAME_FIRSTNAME, name.getFirstname()));
m.add(this.m_runtime.getCallerFactory().createAttribute(IJAMConst.ATTRIBUTE_NAME_LASTNAME, name.getLastname()));
m.add(this.m_runtime.getCallerFactory().createAttribute(IJAMConst.ATTRIBUTE_NAME_ADDITIONAL, name.getAdditional()));
text = this.getParsedAttributes(text, m, true);
text = StringUtils.replaceString(text, ", ", " ");
text = this.cleanString(text.trim());
return text.trim();
}
use of de.janrufmonitor.framework.configuration.IConfigManager in project janrufmonitor by tbrandt77.
the class Formatter method getParsedMSNFormat.
private String getParsedMSNFormat(String text, IMsn msn) {
if (msn == null)
return text;
IConfigManager cfg = this.m_runtime.getConfigManagerFactory().getConfigManager();
String msnformatExpression = cfg.getProperty(IJAMConst.GLOBAL_NAMESPACE, IJAMConst.GLOBAL_VARIABLE_MSNFORMAT);
text = StringUtils.replaceString(text, IJAMConst.GLOBAL_VARIABLE_MSNFORMAT, msnformatExpression);
text = this.getParsedMSN(text, msn);
text = this.cleanString(text);
return text;
}
use of de.janrufmonitor.framework.configuration.IConfigManager in project janrufmonitor by tbrandt77.
the class Formatter method getParsedCalltime.
/**
* Parses date object in the specified text representation.
* The wildcard definitions are taken for parsing.
*
* @param text text to parse
* @param date object to get the information from
* @return parsed text
* @deprecated
*/
public String getParsedCalltime(String text, Date date) {
if (date == null)
return text;
IConfigManager cfg = this.m_runtime.getConfigManagerFactory().getConfigManager();
String calltimeExpression = cfg.getProperty(IJAMConst.GLOBAL_NAMESPACE, IJAMConst.GLOBAL_VARIABLE_CALLTIME);
text = StringUtils.replaceString(text, IJAMConst.GLOBAL_VARIABLE_CALLTIME, calltimeExpression);
text = this.getParsedDate(text, date);
text = this.cleanString(text);
return text;
}
Aggregations