if (prop == null) {
logger.log(Level.FINEST, "{0} property is null", propertyName);
return;
}
if (prop instanceof PropertyId) {
Id val = prop.getIdValue();
if (val != null) {
String id = val.toString();
valuesList.add(Value.getStringValue(id.substring(1, id.length() - 1)));
} else {
logger.log(Level.FINEST,
"{0} property [PropertyId] contains NULL value", propertyName);
}
} else if (prop instanceof PropertyIdList) {
IdList idList = prop.getIdListValue();
Iterator iter = idList.iterator();
while (iter.hasNext()) {
Id val = (Id) iter.next();
if (val != null) {
// Whenever the ID is retrieved from FileNet, it comes with
// "{" and "}" surrounded and ID is in between these curly braces.
// FileNet connector needs ID without curly braces. Thus removing
// the curly braces.
String id = val.toString();
valuesList.add(
Value.getStringValue(id.substring(1, id.length() - 1)));
} else {
logger.log(Level.FINEST,
"{0} property [PropertyIdList] contains NULL value",