use of com.dexels.navajo.document.Property in project navajo by Dexels.
the class TmlToXmlMap method appendMessages.
private final void appendMessages(Message m, TagMap parent) throws UserException {
if (!m.getMode().equals(Message.MSG_MODE_IGNORE)) {
// Check for array messages. Only append array children
TagMap child;
if (!m.getType().equals(Message.MSG_TYPE_ARRAY)) {
child = new TagMap();
child.setCompact(true);
child.setName(m.getName());
parent.setChild(child);
} else {
child = parent;
}
List<Property> allProperties = m.getAllProperties();
for (int i = 0; i < allProperties.size(); i++) {
appendProperty(allProperties.get(i), child);
}
List<Message> allMessages = m.getAllMessages();
for (int i = 0; i < allMessages.size(); i++) {
appendMessages(allMessages.get(i), child);
}
}
}
use of com.dexels.navajo.document.Property in project navajo by Dexels.
the class TmlToXmlMap method setProcessSoapData.
/**
* @param b
*/
public void setProcessSoapData(boolean b) throws UserException {
Message settings = this.document.getMessage("_SoapSettings");
Message headers = this.document.getMessage("_SoapHeaders");
settings.setMode(Message.MSG_MODE_IGNORE);
headers.setMode(Message.MSG_MODE_IGNORE);
setTargetNamespace(settings.getProperty("TargetNamespace").getValue());
logger.debug("Using namespace: {}", settings.getProperty("TargetNamespace").getValue());
Property parts = settings.getProperty("Parts");
String partList = parts.getValue();
String[] partArray = partList.split(",");
for (String pt : partArray) {
logger.debug("Part: {}", pt);
Message rootParent = this.document.getMessage(pt);
// should have only one child, if I'm not mistaken.
for (Message child : rootParent.getAllMessages()) {
setRootPath(child.getFullMessageName());
setBuildContent(true);
}
}
}
use of com.dexels.navajo.document.Property in project navajo by Dexels.
the class ResultMessage method processSuppressedProperties.
public final void processSuppressedProperties(Message m) {
if (m.isArrayMessage() && m.getDefinitionMessage() != null) {
processSuppressedProperties(m.getDefinitionMessage());
}
Iterator<Property> allProps = new ArrayList<Property>(m.getAllProperties()).iterator();
while (allProps.hasNext()) {
Property p = allProps.next();
if (isPropertyInList(p, this.suppressProperties)) {
m.removeProperty(p);
}
}
Iterator<Message> subMessages = m.getAllMessages().iterator();
while (subMessages.hasNext()) {
processSuppressedProperties(subMessages.next());
}
}
use of com.dexels.navajo.document.Property in project navajo by Dexels.
the class NQLContext method set.
public void set(String path, String value) {
if (current == null) {
current = NavajoFactory.getInstance().createNavajo();
}
Property p = current.getProperty(path);
if (p == null) {
return;
}
p.setValue(value);
}
use of com.dexels.navajo.document.Property in project navajo by Dexels.
the class NavajoContext method getProperty.
public Property getProperty(String service, String path) {
Navajo n = getNavajo(service);
Property p = n.getProperty(path);
if (p == null) {
throw new IllegalStateException("Unknown property: " + path + " in service " + service);
}
return p;
}
Aggregations