public static boolean isNonEmptyProperties(Properties props) { return props != null && props.getProperties() != null; }
/** * Shallow copy constructor. * * Creates a new collection of properties but references the original * property and extension objects. */ public PropertiesImpl(Properties properties) { if (properties == null) { throw new IllegalArgumentException("Properties not set!"); } addProperties(properties.getPropertyList()); setExtensions(properties.getExtensions()); }
@Override public List<PropertyData<?>> convertQueryProperties(Properties properties) { // check input if ((properties == null) || (properties.getProperties() == null)) { throw new IllegalArgumentException("Properties must be set!"); } return new ArrayList<PropertyData<?>>(properties.getPropertyList()); }
Map<String, PropertyData<?>> incomingPropsMap = properties.getProperties(); if (incomingPropsMap == null) List<CmisExtensionElement> extensions = properties.getExtensions(); if (extensions != null) boolean isNameChanging = properties.getProperties().containsKey(PropertyIds.NAME);
.getProperties().keySet()); result.getProperties().setExtensions( Collections.singletonList((CmisExtensionElement) new CmisExtensionElementImpl( ALFRESCO_EXTENSION_NAMESPACE, ASPECTS, null, extensions)));
if ((objectData.getProperties() != null) && (objectData.getProperties().getPropertyList() != null)) { properties = new HashMap<String, List<?>>(objectData.getProperties().getPropertyList().size()); for (PropertyData<?> property : objectData.getProperties().getPropertyList()) { properties.put(property.getId(), property.getValues());
result.setExtensions(Collections.singletonList(AlfrescoAspectsUtils .createSetAspectsExtension(alfrescoExtensionList)));
@Override public List<PropertyData<?>> convertQueryProperties(Properties properties) { // check input if ((properties == null) || (properties.getProperties() == null)) { throw new IllegalArgumentException("Properties must be set!"); } return new ArrayList<PropertyData<?>>(properties.getPropertyList()); }
Map<String, PropertyData<?>> incomingPropsMap = properties.getProperties(); if (incomingPropsMap == null) List<CmisExtensionElement> extensions = properties.getExtensions(); if (extensions != null) boolean isNameChanging = properties.getProperties().containsKey(PropertyIds.NAME);
.getProperties().keySet()); result.getProperties().setExtensions( Collections.singletonList((CmisExtensionElement) new CmisExtensionElementImpl( ALFRESCO_EXTENSION_NAMESPACE, ASPECTS, null, extensions)));
if ((objectData.getProperties() != null) && (objectData.getProperties().getPropertyList() != null)) { properties = new HashMap<String, List<?>>(objectData.getProperties().getPropertyList().size()); for (PropertyData<?> property : objectData.getProperties().getPropertyList()) { properties.put(property.getId(), property.getValues());
List<CmisExtensionElement> extensions = objectData.getProperties().getExtensions().iterator().next().getChildren();
cmisProperties.setExtensions(Collections.singletonList(AlfrescoAspectsUtils .createSetAspectsExtension(alfrescoExtensionList)));
/** * Returns the first value of a property or <code>null</code> if the * property is not set. */ private Object getFirstValue(String id) { if (properties == null || properties.getProperties() == null) { return null; } PropertyData<?> property = properties.getProperties().get(id); if (property == null) { return null; } return property.getFirstValue(); }
/** * Converts a properties object. */ public static CmisPropertiesType convert(Properties properties) { if (properties == null) { return null; } CmisPropertiesType result = new CmisPropertiesType(); if (properties.getProperties() != null) { for (PropertyData<?> property : properties.getPropertyList()) { result.getProperty().add(convert(property)); } } // handle extensions convertExtension(properties, result); return result; }
if (objectData.getProperties().getProperties() != null && objectData.getProperties().getProperties().containsKey(PropertyIds.SECONDARY_OBJECT_TYPE_IDS)) { @SuppressWarnings("unchecked") List<String> stids = (List<String>) objectData.getProperties().getProperties() .get(PropertyIds.SECONDARY_OBJECT_TYPE_IDS).getValues(); if (isNotEmpty(stids)) { extensions.put(ExtensionLevel.PROPERTIES, objectData.getProperties().getExtensions());
writer.writeStartElement(PREFIX_CMIS, TAG_BULK_UPDATE_PROPERTIES, NAMESPACE_CMIS); if (properties.getPropertyList() != null) { for (PropertyData<?> property : properties.getPropertyList()) { writeProperty(writer, property, false);
/** * Shallow copy constructor. * * Creates a new collection of properties but references the original * property and extension objects. */ public PropertiesImpl(Properties properties) { if (properties == null) { throw new IllegalArgumentException("Properties not set!"); } addProperties(properties.getPropertyList()); setExtensions(properties.getExtensions()); }
List<CmisExtensionElement> propertyExtensionList = objectData.getProperties().getExtensions(); assertEquals("propertyExtensionList should be singletonList", propertyExtensionList.size(), 1); List<CmisExtensionElement> extensions = propertyExtensionList.iterator().next().getChildren();