catch ( AuthorizationRequiredException e )
{
return REQUIRES_AUTHORIZATION;
}
BuildTrigger buildTrigger = new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, getPrincipal() );
try
{
if ( projectId > 0 )
{
if ( buildDefinitionId > 0 )
{
getContinuum().buildProjectWithBuildDefinition( projectId, buildDefinitionId, buildTrigger );
}
else
{
getContinuum().buildProject( projectId, buildTrigger.getUsername() );
}
}
else
{
if ( buildDefinitionId > 0 )
{
getContinuum().buildProjectGroupWithBuildDefinition( projectGroupId, buildDefinitionId, buildTrigger );
}
else
{
//TODO: Check if this code is called, I don't think
//If it is, it should used the projectId
getContinuum().buildProjects( buildTrigger.getUsername() );
}
}
}
catch ( NoBuildAgentException e )
{