use of life.genny.qwanda.message.QDataBaseEntityMessage in project rulesservice by genny-project.
the class QRules method publishBaseEntityByCode.
public void publishBaseEntityByCode(final String be, final String parentCode, final String linkCode, final String[] recipientCodes) {
BaseEntity item = getBaseEntityByCode(be);
BaseEntity[] itemArray = new BaseEntity[1];
itemArray[0] = item;
QDataBaseEntityMessage msg = new QDataBaseEntityMessage(itemArray, parentCode, linkCode);
msg.setRecipientCodeArray(recipientCodes);
publishData(msg, recipientCodes);
}
use of life.genny.qwanda.message.QDataBaseEntityMessage in project rulesservice by genny-project.
the class QRules method publishCmd.
public void publishCmd(final BaseEntity be, final String aliasCode, final String[] recipientsCode) {
QDataBaseEntityMessage msg = new QDataBaseEntityMessage(be, aliasCode);
msg.setToken(getToken());
if (recipientsCode != null) {
msg.setRecipientCodeArray(recipientsCode);
}
publish("cmds", JsonUtils.toJson(msg));
}
use of life.genny.qwanda.message.QDataBaseEntityMessage in project rulesservice by genny-project.
the class QRules method fastClearBaseEntity.
/* sets delete field to true so that FE removes the BE from their store */
public void fastClearBaseEntity(String baseEntityCode, String[] recipients) {
BaseEntity be = new BaseEntity(baseEntityCode, "FastBE");
QDataBaseEntityMessage beMsg = new QDataBaseEntityMessage(be);
beMsg.setDelete(true);
publishData(beMsg, recipients);
}
use of life.genny.qwanda.message.QDataBaseEntityMessage in project rulesservice by genny-project.
the class QRules method publishData.
public void publishData(final BaseEntity be, final String aliasCode, final String[] recipientsCode) {
QDataBaseEntityMessage msg = new QDataBaseEntityMessage(be, aliasCode);
msg.setToken(getToken());
if (recipientsCode != null) {
msg.setRecipientCodeArray(recipientsCode);
}
publish("cmds", RulesUtils.toJsonObject(msg));
}
use of life.genny.qwanda.message.QDataBaseEntityMessage in project rulesservice by genny-project.
the class QRules method publishData.
public void publishData(final List<BaseEntity> beList, final String parentCode, final String linkCode, String[] recipientCodes) {
QDataBaseEntityMessage msg = new QDataBaseEntityMessage(beList.toArray(new BaseEntity[0]));
msg.setParentCode(parentCode);
msg.setLinkCode(linkCode);
msg.setToken(getToken());
if (recipientCodes != null) {
msg.setRecipientCodeArray(recipientCodes);
}
publish("data", RulesUtils.toJsonObject(msg));
}
Aggregations