use of com.fasterxml.jackson.annotation.JsonIgnore in project OpenAM by OpenRock.
the class PolicyCondition method getPolicyCondition.
/**
* Constructs a legacy policy {@link Condition} object based on the information contained in this adapter.
*
* @return the legacy policy condition.
* @throws EntitlementException if an error occurs constructing the condition.
*/
@JsonIgnore
public Condition getPolicyCondition() throws EntitlementException {
try {
Condition cond = Class.forName(className).asSubclass(Condition.class).newInstance();
cond.setProperties(properties);
return cond;
} catch (ClassNotFoundException cnfe) {
throw new EntitlementException(UNKNOWN_POLICY_CLASS, new String[] { className }, cnfe);
} catch (ClassCastException cce) {
throw new EntitlementException(POLICY_CLASS_CAST_EXCEPTION, new String[] { className, Condition.class.getName() }, cce);
} catch (InstantiationException ie) {
throw new EntitlementException(POLICY_CLASS_NOT_INSTANTIABLE, new String[] { className }, ie);
} catch (IllegalAccessException iae) {
throw new EntitlementException(POLICY_CLASS_NOT_ACCESSIBLE, new String[] { className }, iae);
} catch (PolicyException pe) {
throw new EntitlementException(INVALID_PROPERTY_VALUE_UNKNOWN_VALUE, new String[] { className }, pe);
}
}
use of com.fasterxml.jackson.annotation.JsonIgnore in project OpenAM by OpenRock.
the class PolicyResponseProvider method getResponseProvider.
/**
* Constructs a legacy response provider based on the information in this adapter.
*
* @return the legacy response provider
* @throws EntitlementException if an error occurs constructing the response provider.
*/
@JsonIgnore
public ResponseProvider getResponseProvider() throws EntitlementException {
try {
ResponseProvider rp = Class.forName(className).asSubclass(ResponseProvider.class).newInstance();
Map<String, Set<String>> properties = new HashMap<String, Set<String>>();
properties.put(propertyName, propertyValues);
rp.setProperties(properties);
return rp;
} catch (Exception ex) {
throw new EntitlementException(510, ex);
}
}
use of com.fasterxml.jackson.annotation.JsonIgnore in project XRTB by benmfaul.
the class WinObject method getJson.
/**
* The worker method for converting a WIN http target into a win
* notification in the bidder.
*
* @param target
* String. The HTTP url that makes up the win notification from
* the exchange.
* @return String. The ADM field to be used by exchange serving up the data.
* @throws Exception
* on REDIS errors.
*/
@JsonIgnore
public static String getJson(String target) throws Exception {
String image = null;
String[] parts = target.split("http");
String forward = "http:" + parts[1];
if (parts.length > 2)
image = "http:" + parts[2];
parts = parts[1].split("/");
String pubId = parts[5];
String price = parts[6];
String lat = parts[7];
String lon = parts[8];
String adId = parts[9];
String cridId = parts[10];
String hash = parts[11];
hash = hash.replaceAll("%23", "#");
if (image != null)
image = decoder.decode(image, "UTF-8");
forward = decoder.decode(forward, "UTF-8");
String cost = "";
/*
* This is synthetic, because in reality, adx has no win notification,
* this is a fake pixel fire that does the work
*/
if (pubId.equals(AdxBidRequest.ADX)) {
Long value = AdxWinObject.decrypt(price, System.currentTimeMillis());
Double dv = new Double(value);
dv /= 1000000;
convertBidToWin(hash, cost, lat, lon, adId, cridId, pubId, image, forward, dv.toString(), pubId);
BidRequest.incrementWins(pubId);
return "";
}
if (pubId.equals(OpenRTB.GOOGLE)) {
Double dv = GoogleWinObject.decrypt(price, System.currentTimeMillis());
dv /= 1000;
convertBidToWin(hash, cost, lat, lon, adId, cridId, pubId, image, forward, dv.toString(), pubId);
BidRequest.incrementWins(pubId);
return "";
}
Map bid = null;
try {
bid = Controller.getInstance().getBidData(hash);
} catch (Exception error) {
AerospikeHandler.reset();
return "";
}
// if (bid == null || bid.isEmpty()) {
// throw new Exception("No bid to convert to win: " + hash);
// }
String adm = null;
try {
adm = (String) bid.get("ADM");
cost = (String) bid.get("PRICE");
} catch (Exception error) {
// System.out.println("-----------> " + bid);
}
// the accounting works. just return ""
try {
convertBidToWin(hash, cost, lat, lon, adId, cridId, pubId, image, forward, price, adm);
} catch (Exception error) {
Controller.getInstance().sendLog(1, "WinObject:convertBidToWin", "Error: " + error.toString() + ", target = " + target);
}
BidRequest.incrementWins(pubId);
if (adm == null) {
return "";
}
return adm;
}
use of com.fasterxml.jackson.annotation.JsonIgnore in project killbill by killbill.
the class NodeInterval method isPartitionedByChildren.
@JsonIgnore
public boolean isPartitionedByChildren() {
if (leftChild == null) {
return false;
}
LocalDate curDate = start;
NodeInterval curChild = leftChild;
while (curChild != null) {
if (curChild.getStart().compareTo(curDate) > 0) {
return false;
}
curDate = curChild.getEnd();
curChild = curChild.getRightSibling();
}
return (curDate.compareTo(end) == 0);
}
use of com.fasterxml.jackson.annotation.JsonIgnore in project ambrose by twitter.
the class CascadingJob method setJobStats.
@JsonIgnore
public void setJobStats(HadoopStepStats stats) {
Counters counters = new Counters();
for (String groupName : stats.getCounterGroups()) {
for (String counterName : stats.getCountersFor(groupName)) {
Long counterValue = stats.getCounterValue(groupName, counterName);
counters.findCounter(groupName, counterName).setValue(counterValue);
}
}
setCounterGroupMap(CounterGroup.counterGroupsByName(counters));
}
Aggregations