* @throws ServiceException
*/
private ProductAttributeSet getAttributeSet(String id)
throws ServiceException {
ProductAttributeSet prdAttSet = new ProductAttributeSet();
Integer set_id = Integer.parseInt(id);
// if are the default attribute set, that not list on the api, so we
// have to set manually
if (set_id.equals(soapClient.getConfig().getDefaultAttributeSetId())) {
prdAttSet.setId(set_id);
prdAttSet.setName("Default");
} else {
List<Map<String, Object>> setList;
try {
setList = (List<Map<String, Object>>) soapClient.call(
ResourcePath.ProductAttributeSetList, "");
} catch (AxisFault e) {
if (debug)
e.printStackTrace();
throw new ServiceException(e.getMessage());
}
if (setList != null) {
for (Map<String, Object> set : setList) {
if (set.get("set_id").equals(set_id.toString())) {
for (Map.Entry<String, Object> att : set.entrySet())
prdAttSet.set(att.getKey(), att.getValue());
break;
}
}
}