private void addPropertyListBoolean( PropertiesImpl props, String typeId, Set<String> filter, String id, List<Boolean> value) { if (!checkAddProperty(props, typeId, filter, id)) { return; } props.addProperty(new PropertyBooleanImpl(id, value)); }
private void addPropertyDateTime( PropertiesImpl props, String typeId, Set<String> filter, String id, GregorianCalendar value) { if (!checkAddProperty(props, typeId, filter, id)) { return; } props.addProperty(new PropertyDateTimeImpl(id, value)); }
private void addPropertyListBigInteger( PropertiesImpl props, String typeId, Set<String> filter, String id, List<BigInteger> value) { if (!checkAddProperty(props, typeId, filter, id)) { return; } props.addProperty(new PropertyIntegerImpl(id, value)); }
private void addPropertyDouble( PropertiesImpl props, String typeId, Set<String> filter, String id, Double value) { if (!checkAddProperty(props, typeId, filter, id)) { return; } BigDecimal bigDecimalValue = new BigDecimal(value, MathContext.DECIMAL64); props.addProperty(new PropertyDecimalImpl(id, bigDecimalValue)); }
private void addPropertyEnum( PropertiesImpl props, String typeId, Set<String> filter, String id, EnumWithSmallCode value) { if (!checkAddProperty(props, typeId, filter, id)) { return; } props.addProperty(new PropertyStringImpl(id, value == null ? null : value.getCode())); }
private void addPropertyString( PropertiesImpl props, String typeId, Set<String> filter, String id, String value) { if (!checkAddProperty(props, typeId, filter, id)) { return; } props.addProperty(new PropertyStringImpl(id, value)); }
/** Test of the <code>PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS</code> of the CMIS object. */ @Test public void testJcrTypeProperty() { getRootFolder().getProperties(); PropertiesImpl properties = new PropertiesImpl(); properties.addProperty(new PropertyIdImpl(PropertyIds.OBJECT_TYPE_ID, "cmis:folder")); properties.addProperty(new PropertyStringImpl(PropertyIds.NAME, "TestFolder")); String testFolderId = getJcrRepository().createFolder(getSession(), properties, getRootFolder().getId()); ObjectData testFolder = getJcrRepository().getObject(getSession(), testFolderId, null, null, null, false); Assert.assertNotNull( testFolder .getProperties() .getProperties() .get(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS) .getValues()); }
private void addPropertyListEnum( PropertiesImpl props, String typeId, Set<String> filter, String id, List<EnumWithSmallCode> value) { if (!checkAddProperty(props, typeId, filter, id)) { return; } List<String> convertedValues = new ArrayList<>(); if (value != null) { for (EnumWithSmallCode item : value) { convertedValues.add(item.getCode()); } } props.addProperty(new PropertyStringImpl(id, convertedValues)); }