SerializerException.COMPONENTMANAGER_DOES_NOT_EXIST
.create("org.apache.jetspeed.profiler.Profiler"));
Class standardRuleClass = null;
try
{
ProfilingRule tempStandardRule = pm.createProfilingRule(true);
standardRuleClass = tempStandardRule.getClass();
}
catch (Exception e)
{
throw new SerializerException(
SerializerException.CREATE_OBJECT_FAILED
.create(new String[]
{ "Standard Rule", e.getMessage()}));
}
Iterator list = null;
try
{
list = pm.getRules().iterator();
} catch (Exception e)
{
throw new SerializerException(
SerializerException.GET_EXISTING_OBJECTS
.create(new String[]
{ "ProfilingRules", e.getMessage()}));
}
while (list.hasNext())
{
try
{
ProfilingRule p = (ProfilingRule) list.next();
if (!(this.rulesMap.containsKey(p.getId())))
{
JSProfilingRule rule = createProfilingRule(p, (standardRuleClass == p.getClass()));
rulesMap.put(rule.getId(), rule);
((JSSeedData)getSnapshot()).getRules().add(rule);
}
} catch (Exception e)
{
throw new SerializerException(
SerializerException.CREATE_SERIALIZED_OBJECT_FAILED
.create(new String[]
{ "ProfilingRules", e.getMessage()}));
}
}
// determine the defualt rule
ProfilingRule defaultRule = pm.getDefaultRule();
if (defaultRule != null)
((JSSeedData)getSnapshot()).setDefaultRule(defaultRule.getId());
// get Rules for each user
Iterator _itUsers = this.userMap.values().iterator();
while (_itUsers.hasNext())