minor CMIS bug fixes and improvements

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30034 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Florian Mü
2011-08-24 15:44:55 +00:00
parent 6dbcb98f3c
commit 44aa5689bd
2 changed files with 16 additions and 8 deletions

View File

@@ -2478,12 +2478,18 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
return ((PropertyId) property).getFirstValue();
}
public String getNameProperty(Properties properties)
public String getNameProperty(Properties properties, String fallback)
{
String name = getStringProperty(properties, PropertyIds.NAME);
if ((name == null) || (name.trim().length() == 0))
{
throw new CmisInvalidArgumentException("Property " + PropertyIds.NAME + " must be set!");
if (fallback == null)
{
throw new CmisInvalidArgumentException("Property " + PropertyIds.NAME + " must be set!");
} else
{
name = fallback;
}
}
return name;