catch ( ContinuumException e )
{
logger.debug( "Unexpected error getting schedule" );
}
AuditLog event = new AuditLog( getName(), AuditLogConstants.ADD_SCHEDULE );
event.setCategory( AuditLogConstants.SCHEDULE );
event.setCurrentUser( getPrincipal() );
if ( id == 0 )
{
try
{
getContinuum().addSchedule( setFields( new Schedule() ) );
event.log();
}
catch ( ContinuumException e )
{
addActionError( getText( "schedule.buildqueues.add.error" ) );
return ERROR;
}
return SUCCESS;
}
else
{
try
{
getContinuum().updateSchedule( setFields( getContinuum().getSchedule( id ) ) );
event.setAction( AuditLogConstants.MODIFY_SCHEDULE );
event.log();
}
catch ( ContinuumException e )
{
addActionError( getText( "schedule.buildqueues.add.error" ) );
return ERROR;