/** * Method toString */ public java.lang.String toString() { StringBuffer buf = new StringBuffer(); buf.append( "id = '" ); buf.append( getId() + "'" ); return buf.toString(); } //-- java.lang.String toString()
/** * Method toString. * * @return String */ public java.lang.String toString() { StringBuilder buf = new StringBuilder( 128 ); buf.append( "id = '" ); buf.append( getId() ); buf.append( "'" ); return buf.toString(); } //-- java.lang.String toString()
public ProjectNotifier getGroupNotifier( int projectGroupId, int notifierId ) throws ContinuumException { ProjectGroup projectGroup = getProjectGroupWithBuildDetails( projectGroupId ); List<ProjectNotifier> notifiers = projectGroup.getNotifiers(); ProjectNotifier notifier = null; for ( ProjectNotifier notif : notifiers ) { notifier = notif; if ( notifier.getId() == notifierId ) { break; } } return notifier; }
public ProjectNotifier getGroupNotifier( int projectGroupId, int notifierId ) throws ContinuumException { ProjectGroup projectGroup = getProjectGroupWithBuildDetails( projectGroupId ); List<ProjectNotifier> notifiers = projectGroup.getNotifiers(); ProjectNotifier notifier = null; for ( ProjectNotifier notif : notifiers ) { notifier = notif; if ( notifier.getId() == notifierId ) { break; } } return notifier; }
public ProjectNotifier getNotifier( int projectId, int notifierId ) throws ContinuumException { Project project = getProjectWithAllDetails( projectId ); List<ProjectNotifier> notifiers = project.getNotifiers(); ProjectNotifier notifier = null; for ( ProjectNotifier notif : notifiers ) { notifier = notif; if ( notifier.getId() == notifierId ) { break; } } return notifier; }
public ProjectNotifier getNotifier( int projectId, int notifierId ) throws ContinuumException { Project project = getProjectWithAllDetails( projectId ); List<ProjectNotifier> notifiers = project.getNotifiers(); ProjectNotifier notifier = null; for ( ProjectNotifier notif : notifiers ) { notifier = notif; if ( notifier.getId() == notifierId ) { break; } } return notifier; }
private void getProjectGroupNotifiers( ProjectGroup projectGroup, Map<String, List<ProjectNotifier>> notifiersMap ) { // perform the project group level notifications if ( projectGroup.getNotifiers() != null ) { for ( ProjectNotifier projectNotifier : (List<ProjectNotifier>) projectGroup.getNotifiers() ) { List<ProjectNotifier> projectNotifiers = notifiersMap.get( projectNotifier.getType() ); if ( projectNotifiers == null ) { projectNotifiers = new ArrayList<ProjectNotifier>(); } if ( !projectNotifier.isEnabled() ) { log.info( projectNotifier.getType() + " projectNotifier (id=" + projectNotifier.getId() + ") is disabled." ); continue; } projectNotifiers.add( projectNotifier ); notifiersMap.put( projectNotifier.getType(), projectNotifiers ); } } } }
private void getProjectNotifiers( Project project, Map<String, List<ProjectNotifier>> notifiersMap ) { if ( project.getNotifiers() != null ) { // perform the project level notifications for ( ProjectNotifier notifier : (List<ProjectNotifier>) project.getNotifiers() ) { List<ProjectNotifier> notifiers = notifiersMap.get( notifier.getType() ); if ( notifiers == null ) { notifiers = new ArrayList<ProjectNotifier>(); } if ( !notifier.isEnabled() ) { log.info( notifier.getType() + " notifier (id=" + notifier.getId() + ") is disabled." ); continue; } notifiers.add( notifier ); notifiersMap.put( notifier.getType(), notifiers ); } } }
if ( notifier.getId() == Integer.parseInt( notifierId ) && notifier.getConfiguration().containsKey( ADDRESS_FIELD ) )
public ProjectNotifier updateNotifier( int projectId, ProjectNotifier notifier ) throws ContinuumException { Project project = getProjectWithAllDetails( projectId ); ProjectNotifier notif = getNotifier( projectId, notifier.getId() ); // I remove notifier then add it instead of update it due to a ClassCastException in jpox project.removeNotifier( notif ); updateProject( project ); return addNotifier( projectId, notifier ); }
public ProjectNotifier updateNotifier( int projectId, ProjectNotifier notifier ) throws ContinuumException { Project project = getProjectWithAllDetails( projectId ); ProjectNotifier notif = getNotifier( projectId, notifier.getId() ); // I remove notifier then add it instead of update it due to a ClassCastException in jpox project.removeNotifier( notif ); updateProject( project ); return addNotifier( projectId, notifier ); }
private void sendNotification( String messageId, ProjectNotifier projectNotifier, Map context ) { String notifierType = projectNotifier.getType(); if ( !projectNotifier.isEnabled() ) { getLogger().info( notifierType + " notifier (id=" + projectNotifier.getId() + ") is disabled." ); return; } Map configuration = projectNotifier.getConfiguration(); try { context.put( CONTEXT_PROJECT_NOTIFIER, projectNotifier ); Notifier notifier = notifierManager.getNotifier( notifierType ); Set recipients = recipientSource.getRecipients( String.valueOf( projectNotifier.getId() ), messageId, configuration, context ); notifier.sendNotification( messageId, recipients, configuration, context ); } catch ( NotificationException e ) { getLogger().error( "Error while trying to use the " + notifierType + " notifier.", e ); } } }
public ProjectNotifier updateGroupNotifier( int projectGroupId, ProjectNotifier notifier ) throws ContinuumException { ProjectGroup projectGroup = getProjectGroupWithBuildDetails( projectGroupId ); ProjectNotifier notif = getGroupNotifier( projectGroupId, notifier.getId() ); // I remove notifier then add it instead of update it due to a ClassCastException in jpox projectGroup.removeNotifier( notif ); try { projectGroupDao.updateProjectGroup( projectGroup ); } catch ( ContinuumStoreException cse ) { throw new ContinuumException( "Unable to update project group.", cse ); } return addGroupNotifier( projectGroupId, notifier ); }
public ProjectNotifier updateGroupNotifier( int projectGroupId, ProjectNotifier notifier ) throws ContinuumException { ProjectGroup projectGroup = getProjectGroupWithBuildDetails( projectGroupId ); ProjectNotifier notif = getGroupNotifier( projectGroupId, notifier.getId() ); // I remove notifier then add it instead of update it due to a ClassCastException in jpox projectGroup.removeNotifier( notif ); try { store.updateProjectGroup( projectGroup ); } catch ( ContinuumStoreException cse ) { throw new ContinuumException( "Unable to update project group.", cse ); } return addGroupNotifier( projectGroupId, notifier ); }
removeNotifier( project.getId(), notifier.getId() );
removeNotifier( project.getId(), notifier.getId() );