try {
categoryDescriptors =
srcAccessor.retrieveCategoryDescriptors(
categoryName);
} catch (RepositoryException e) {
throw new RepositoryException(
exceptionLocalizer.format(
"cannot-read-category-descriptor", categoryName),
e);
}
for (Iterator iter = categoryDescriptors.iterator();
iter.hasNext();) {
final CategoryDescriptor categoryDescriptor =
(CategoryDescriptor) iter.next();
// Write the descriptors to the destination for this
// category.
try {
dstAccessor.addCategoryDescriptor(
categoryName, categoryDescriptor);
} catch (RepositoryException e) {
throw new RepositoryException(
exceptionLocalizer.format(
"cannot-write-policy-descriptor",
new Object[]{categoryName, categoryDescriptor}), e);
}
}