if ((capabilities != null) && (capabilities.size() > 0))
{
Iterator _it = capabilities.iterator();
while (_it.hasNext())
{
JSCapability _c = (JSCapability)_it.next();
// create a new Capability
try
{
Capability capability = caps.createCapability(_c.getName());
/** THE KEY_OVERWRITE_EXISTING test is not required for capabilites, since they carry no other information than the name
* Used here for consistency, though
*/
if ((this.getSetting(JetspeedSerializer.KEY_OVERWRITE_EXISTING)) || (capability.getCapabilityId() == 0))
{
caps.storeCapability(capability);
}
this.capabilityMap.put(_c.getName(), capability);
}
catch (Exception e)
{
throw new SerializerException(
SerializerException.CREATE_OBJECT_FAILED