*
* @param connObject connector object.
* @return connector object TO.
*/
public ConnObjectTO getConnObjectTO(final ConnectorObject connObject) {
final ConnObjectTO connObjectTO = new ConnObjectTO();
for (Attribute attr : connObject.getAttributes()) {
AttributeTO attrTO = new AttributeTO();
attrTO.setSchema(attr.getName());
if (attr.getValue() != null) {
for (Object value : attr.getValue()) {
if (value != null) {
if (value instanceof GuardedString || value instanceof GuardedByteArray) {
attrTO.addValue(getPassword(value));
} else {
attrTO.addValue(value.toString());
}
}
}
}
connObjectTO.addAttribute(attrTO);
}
return connObjectTO;
}