use of life.genny.qwanda.message.QDataBaseEntityMessage in project rulesservice by genny-project.
the class RulesUtils method getBaseEntitysByChildAndLinkCodeWithAttributes.
/**
* @param qwandaServiceUrl
* @param decodedToken
* @param token
* @param parentCode
* @param linkCode
* @return baseEntitys
*/
public static List<BaseEntity> getBaseEntitysByChildAndLinkCodeWithAttributes(final String qwandaServiceUrl, Map<String, Object> decodedToken, final String token, final String childCode, final String linkCode) {
String beJson = getBaseEntitysJsonByChildAndLinkCodeWithAttributes(qwandaServiceUrl, decodedToken, token, childCode, linkCode);
QDataBaseEntityMessage msg = JsonUtils.fromJson(beJson, QDataBaseEntityMessage.class);
BaseEntity[] beArray = msg.getItems();
ArrayList<BaseEntity> arrayList = new ArrayList<BaseEntity>(Arrays.asList(beArray));
return arrayList;
}
use of life.genny.qwanda.message.QDataBaseEntityMessage in project rulesservice by genny-project.
the class RulesUtils method getBaseEntitysByParentAndLinkCodeWithAttributesAndStakeholderCode.
/**
* @param qwandaServiceUrl
* @param decodedToken
* @param token
* @param parentCode
* @param linkCode
* @param stakeholderCode
* @return baseEntitys
*/
public static List<BaseEntity> getBaseEntitysByParentAndLinkCodeWithAttributesAndStakeholderCode(final String qwandaServiceUrl, Map<String, Object> decodedToken, final String token, final String parentCode, final String linkCode, final String stakeholderCode) {
if (parentCode.equalsIgnoreCase("GRP_NEW_ITEMS")) {
println("Group New Items Debug");
}
String beJson = getBaseEntitysJsonByParentAndLinkCodeWithAttributesAndStakeholderCode(qwandaServiceUrl, decodedToken, token, parentCode, linkCode, stakeholderCode);
QDataBaseEntityMessage msg = fromJson(beJson, QDataBaseEntityMessage.class);
if (msg == null) {
log.error("Error in fetching BE from Qwanda Service");
} else {
BaseEntity[] beArray = msg.getItems();
ArrayList<BaseEntity> arrayList = new ArrayList<BaseEntity>(Arrays.asList(beArray));
return arrayList;
}
// TODO get exception =s in place
return null;
}
use of life.genny.qwanda.message.QDataBaseEntityMessage in project rulesservice by genny-project.
the class RulesUtils method getBaseEntitysArrayByParentAndLinkCodeAndLinkValueWithAttributes.
/**
* @param qwandaServiceUrl
* @param decodedToken
* @param token
* @param parentCode
* @param linkCode
* @param linkValue
* @param pageStart
* @param pageSize
* @return baseEntitys
*/
public static BaseEntity[] getBaseEntitysArrayByParentAndLinkCodeAndLinkValueWithAttributes(final String qwandaServiceUrl, Map<String, Object> decodedToken, final String token, final String parentCode, final String linkCode, final String linkValue, final Integer pageStart, final Integer pageSize) {
String beJson = getBaseEntitysJsonByParentAndLinkCodeAndLinkValue(qwandaServiceUrl, decodedToken, token, parentCode, linkCode, linkValue, pageStart, pageSize);
QDataBaseEntityMessage msg = JsonUtils.fromJson(beJson, QDataBaseEntityMessage.class);
return msg.getItems();
}
use of life.genny.qwanda.message.QDataBaseEntityMessage in project rulesservice by genny-project.
the class RulesUtils method getBaseEntitysArrayByParentAndLinkCodeWithAttributes.
/**
* @param qwandaServiceUrl
* @param decodedToken
* @param token
* @param parentCode
* @param linkCode
* @return baseEntitys
*/
public static BaseEntity[] getBaseEntitysArrayByParentAndLinkCodeWithAttributes(final String qwandaServiceUrl, Map<String, Object> decodedToken, final String token, final String parentCode, final String linkCode) {
String beJson = getBaseEntitysJsonByParentAndLinkCode(qwandaServiceUrl, decodedToken, token, parentCode, linkCode);
QDataBaseEntityMessage msg = JsonUtils.fromJson(beJson, QDataBaseEntityMessage.class);
return msg.getItems();
}
use of life.genny.qwanda.message.QDataBaseEntityMessage in project rulesservice by genny-project.
the class RulesUtils method getBaseEntitysArrayByParentAndLinkCodeWithAttributes.
/**
* @param qwandaServiceUrl
* @param decodedToken
* @param token
* @param parentCode
* @param linkCode
* @param pageStart
* @param pageSize
* @return baseEntitys
*/
public static BaseEntity[] getBaseEntitysArrayByParentAndLinkCodeWithAttributes(final String qwandaServiceUrl, Map<String, Object> decodedToken, final String token, final String parentCode, final String linkCode, final Integer pageStart, final Integer pageSize) {
String beJson = getBaseEntitysJsonByParentAndLinkCode(qwandaServiceUrl, decodedToken, token, parentCode, linkCode, pageStart, pageSize);
QDataBaseEntityMessage msg = JsonUtils.fromJson(beJson, QDataBaseEntityMessage.class);
return msg.getItems();
}
Aggregations