// Javadoc inherited.
protected Value execute(ExpressionContext expressionContext,
DevicePolicyValueAccessor accessor,Value defaultValue) {
Value value = null;
ExpressionFactory factory = expressionContext.getFactory();
// determine the size of the colour palette
String palette = accessor.getDependentPolicyValue(
DevicePolicyConstants.PALETTE);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Size of colour palette (from repository):" +
palette);
}
try {
value = factory.createIntValue(Integer.parseInt(palette));
} catch (NumberFormatException e) {
// log it but continue
LOGGER.info("function-bad-parameter-value",
new Object[] {palette, DevicePolicyConstants.PALETTE});
}