break; case INTEGER: result = new PropertyIntegerDefinitionImpl(); ((PropertyIntegerDefinitionImpl) result).setMinValue(getInteger(json, JSON_PROPERTY_TYPE_MIN_VALUE)); ((PropertyIntegerDefinitionImpl) result).setMaxValue(getInteger(json, JSON_PROPERTY_TYPE_MAX_VALUE)); ((PropertyIntegerDefinitionImpl) result) .setChoices(convertChoicesInteger(json.get(JSON_PROPERTY_TYPE_CHOICE))); break; case DATETIME:
assertTrue(intNoBoundsTypeDef.getMinValue().equals(minInteger)); assertTrue(intNoBoundsTypeDef.getMaxValue().equals(maxInteger)); assertTrue(longNoBoundsTypeDef.getMinValue().equals(minLong)); assertTrue(longNoBoundsTypeDef.getMaxValue().equals(maxLong)); assertTrue(intWithBoundsTypeDef.getMinValue().equals(BigInteger.valueOf(-10L))); assertTrue(intWithBoundsTypeDef.getMaxValue().equals(BigInteger.valueOf(10L))); assertTrue(longWithBoundsTypeDef.getMinValue().equals(BigInteger.valueOf(-10L))); assertTrue(longWithBoundsTypeDef.getMaxValue().equals(BigInteger.valueOf(10L)));
break; case INTEGER: result = new PropertyIntegerDefinitionImpl(); break; case STRING:
if (isTag(name, TAG_PROPERTY_TYPE_DEAULT_VALUE)) { PropertyInteger prop = PROPERTY_INTEGER_PARSER.walk(parser); ((PropertyIntegerDefinitionImpl) target).setDefaultValue(prop.getValues()); return true; ((PropertyIntegerDefinitionImpl) target).setMaxValue(readInteger(parser)); return true; ((PropertyIntegerDefinitionImpl) target).setMinValue(readInteger(parser)); return true;
break; case INTEGER: result = new PropertyIntegerDefinitionImpl(); break; case STRING:
if (isTag(name, TAG_PROPERTY_TYPE_DEAULT_VALUE)) { PropertyInteger prop = PROPERTY_INTEGER_PARSER.walk(parser); ((PropertyIntegerDefinitionImpl) target).setDefaultValue(prop.getValues()); return true; ((PropertyIntegerDefinitionImpl) target).setMaxValue(readInteger(parser)); return true; ((PropertyIntegerDefinitionImpl) target).setMinValue(readInteger(parser)); return true;
break; case INTEGER: result = new PropertyIntegerDefinitionImpl(); ((PropertyIntegerDefinitionImpl) result).setMinValue(getInteger(json, JSON_PROPERTY_TYPE_MIN_VALUE)); ((PropertyIntegerDefinitionImpl) result).setMaxValue(getInteger(json, JSON_PROPERTY_TYPE_MAX_VALUE)); ((PropertyIntegerDefinitionImpl) result) .setChoices(convertChoicesInteger(json.get(JSON_PROPERTY_TYPE_CHOICE))); break; case DATETIME:
@Override protected AbstractPropertyDefinition<?> prepareTarget(XMLStreamReader parser, QName name) throws XMLStreamException { AbstractPropertyDefinition<?> result = null; if (isTag(name, TAG_TYPE_PROP_DEF_STRING)) { result = new PropertyStringDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_ID)) { result = new PropertyIdDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_BOOLEAN)) { result = new PropertyBooleanDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_INTEGER)) { result = new PropertyIntegerDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_DATETIME)) { result = new PropertyDateTimeDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_DECIMAL)) { result = new PropertyDecimalDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_HTML)) { result = new PropertyHtmlDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_URI)) { result = new PropertyUriDefinitionImpl(); } if (result == null) { throw new CmisInvalidArgumentException("Cannot read property type definition!"); } return result; }
break; case INTEGER: result = new PropertyIntegerDefinitionImpl(); ((PropertyIntegerDefinitionImpl) result).setMinValue(((PropertyIntegerDefinition) sourcePropertyDefinition) .getMinValue()); ((PropertyIntegerDefinitionImpl) result).setMaxValue(((PropertyIntegerDefinition) sourcePropertyDefinition) .getMaxValue()); ((PropertyIntegerDefinitionImpl) result) .setDefaultValue(copyDefaultValue((PropertyIntegerDefinition) sourcePropertyDefinition)); ((PropertyIntegerDefinitionImpl) result) .setChoices(copyChoices((PropertyIntegerDefinition) sourcePropertyDefinition)); break; case STRING:
break; case INTEGER: result = new PropertyIntegerDefinitionImpl(); break; case STRING:
result = new PropertyIntegerDefinitionImpl(); .setChoices(convertChoiceIntegerList(((CmisPropertyIntegerDefinitionType) propertyDefinition) .getChoice())); ((PropertyIntegerDefinitionImpl) result).setDefaultValue(prop.getValue()); .setMinValue(((CmisPropertyIntegerDefinitionType) propertyDefinition).getMinValue()); ((PropertyIntegerDefinitionImpl) result) .setMaxValue(((CmisPropertyIntegerDefinitionType) propertyDefinition).getMaxValue()); } else if (propertyDefinition instanceof CmisPropertyDecimalDefinitionType) { result = new PropertyDecimalDefinitionImpl();
@Override protected AbstractPropertyDefinition<?> prepareTarget(XmlPullParser parser, QName name) throws XmlPullParserException { AbstractPropertyDefinition<?> result = null; if (isTag(name, TAG_TYPE_PROP_DEF_STRING)) { result = new PropertyStringDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_ID)) { result = new PropertyIdDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_BOOLEAN)) { result = new PropertyBooleanDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_INTEGER)) { result = new PropertyIntegerDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_DATETIME)) { result = new PropertyDateTimeDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_DECIMAL)) { result = new PropertyDecimalDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_HTML)) { result = new PropertyHtmlDefinitionImpl(); } else if (isTag(name, TAG_TYPE_PROP_DEF_URI)) { result = new PropertyUriDefinitionImpl(); } if (result == null) { throw new CmisInvalidArgumentException("Cannot read property type definition!"); } return result; }
break; case INTEGER: result = new PropertyIntegerDefinitionImpl(); break; case DATETIME: