protected static List<ProjectNotifier> createMailNotifierList( String emailAddress ) { if ( emailAddress == null ) { return null; } ProjectNotifier notifier = new ProjectNotifier(); notifier.setType( "mail" ); Properties props = new Properties(); props.put( "address", emailAddress ); notifier.setConfiguration( props ); List<ProjectNotifier> notifiers = new ArrayList<ProjectNotifier>(); notifiers.add( notifier ); return notifiers; }
protected static List createMailNotifierList( String emailAddress ) { if ( emailAddress == null ) { return null; } ProjectNotifier notifier = new ProjectNotifier(); notifier.setType( "mail" ); Properties props = new Properties(); props.put( "address", emailAddress ); notifier.setConfiguration( props ); List notifiers = new ArrayList(); notifiers.add( notifier ); return notifiers; }
projectNotifier.setType( getTrimmedValue( xmlStreamReader.getElementText()) );
notifier.setType( projectNotifier.getType() );
projectNotifier.setType( getTrimmedValue( getDefaultValue( xmlStreamReader.getElementText(), "mail" ) ) );
userNotifier.setType( notifier.getType() );
notifier.setType( projectNotifier.getType() );
private List<ProjectNotifier> getProjectNotifiers( Map<String, Object> context ) { List<ProjectNotifier> projectNotifiers = new ArrayList<ProjectNotifier>(); List<Map<String, Object>> notifiers = ContinuumBuildConstant.getProjectNotifiers( context ); if ( notifiers != null ) { for ( Map<String, Object> map : notifiers ) { ProjectNotifier notifier = new ProjectNotifier(); notifier.setConfiguration( ContinuumBuildConstant.getNotifierConfiguration( map ) ); notifier.setEnabled( ContinuumBuildConstant.isNotifierEnabled( map ) ); notifier.setFrom( ContinuumBuildConstant.getNotifierFrom( map ) ); notifier.setRecipientType( ContinuumBuildConstant.getNotifierRecipientType( map ) ); notifier.setSendOnError( ContinuumBuildConstant.isNotifierSendOnError( map ) ); notifier.setSendOnFailure( ContinuumBuildConstant.isNotifierSendOnFailure( map ) ); notifier.setSendOnScmFailure( ContinuumBuildConstant.isNotifierSendOnScmFailure( map ) ); notifier.setSendOnSuccess( ContinuumBuildConstant.isNotifierSendOnSuccess( map ) ); notifier.setSendOnWarning( ContinuumBuildConstant.isNotifierSendOnWarning( map ) ); notifier.setType( ContinuumBuildConstant.getNotifierType( map ) ); projectNotifiers.add( notifier ); } } return projectNotifiers; }
public ProjectNotifier updateNotifier( int projectid, ProjectNotifier newNotifier ) throws ContinuumException { if ( StringUtils.isNotBlank( newNotifier.getType() ) && !newNotifier.getType().matches( NOTIFIER_TYPE_VALID_EXPRESSION ) ) { throw new ContinuumException( "Notifier Type can only be 'irc, jabber, msn, mail or wagon" ); } org.apache.maven.continuum.model.project.ProjectNotifier notifier = continuum.getNotifier( projectid, newNotifier.getId() ); notifier.setConfiguration( newNotifier.getConfiguration() ); notifier.setFrom( newNotifier.getFrom() ); notifier.setRecipientType( newNotifier.getRecipientType() ); notifier.setType( newNotifier.getType() ); notifier.setEnabled( newNotifier.isEnabled() ); notifier.setSendOnError( newNotifier.isSendOnError() ); notifier.setSendOnFailure( newNotifier.isSendOnFailure() ); notifier.setSendOnSuccess( newNotifier.isSendOnSuccess() ); notifier.setSendOnWarning( newNotifier.isSendOnWarning() ); return populateProjectNotifier( continuum.updateNotifier( projectid, notifier ) ); }
notifier.setType( projectNotifier.getType() );
public ProjectNotifier addNotifier( int projectid, ProjectNotifier newNotifier ) throws ContinuumException { if ( StringUtils.isNotBlank( newNotifier.getType() ) && !newNotifier.getType().matches( NOTIFIER_TYPE_VALID_EXPRESSION ) ) { throw new ContinuumException( "Notifier Type can only be 'irc, jabber, msn, mail or wagon'" ); } org.apache.maven.continuum.model.project.ProjectNotifier notifier = new org.apache.maven.continuum.model.project.ProjectNotifier(); notifier.setConfiguration( newNotifier.getConfiguration() ); notifier.setFrom( newNotifier.getFrom() ); notifier.setRecipientType( newNotifier.getRecipientType() ); notifier.setType( newNotifier.getType() ); notifier.setEnabled( newNotifier.isEnabled() ); notifier.setSendOnError( newNotifier.isSendOnError() ); notifier.setSendOnFailure( newNotifier.isSendOnFailure() ); notifier.setSendOnSuccess( newNotifier.isSendOnSuccess() ); notifier.setSendOnWarning( newNotifier.isSendOnWarning() ); return populateProjectNotifier( continuum.addNotifier( projectid, notifier ) ); }
public ProjectNotifier updateGroupNotifier( int projectgroupid, ProjectNotifier newNotifier ) throws ContinuumException { if ( StringUtils.isNotBlank( newNotifier.getType() ) && !newNotifier.getType().matches( NOTIFIER_TYPE_VALID_EXPRESSION ) ) { throw new ContinuumException( "Notifier Type can only be 'irc, jabber, msn, mail, or wagon" ); } org.apache.maven.continuum.model.project.ProjectNotifier notifier = continuum.getGroupNotifier( projectgroupid, newNotifier.getId() ); notifier.setConfiguration( newNotifier.getConfiguration() ); notifier.setFrom( newNotifier.getFrom() ); notifier.setRecipientType( newNotifier.getRecipientType() ); notifier.setType( newNotifier.getType() ); notifier.setEnabled( newNotifier.isEnabled() ); notifier.setSendOnError( newNotifier.isSendOnError() ); notifier.setSendOnFailure( newNotifier.isSendOnFailure() ); notifier.setSendOnSuccess( newNotifier.isSendOnSuccess() ); notifier.setSendOnWarning( newNotifier.isSendOnWarning() ); return populateProjectNotifier( continuum.updateGroupNotifier( projectgroupid, notifier ) ); }
public ProjectNotifier addGroupNotifier( int projectgroupid, ProjectNotifier newNotifier ) throws ContinuumException { org.apache.maven.continuum.model.project.ProjectNotifier notifier = new org.apache.maven.continuum.model.project.ProjectNotifier(); if ( StringUtils.isNotBlank( newNotifier.getType() ) && !newNotifier.getType().matches( NOTIFIER_TYPE_VALID_EXPRESSION ) ) { throw new ContinuumException( "Notifier Type can only be 'irc, jabber, msn, mail or wagon" ); } notifier.setConfiguration( newNotifier.getConfiguration() ); notifier.setFrom( newNotifier.getFrom() ); notifier.setRecipientType( newNotifier.getRecipientType() ); notifier.setType( newNotifier.getType() ); notifier.setEnabled( newNotifier.isEnabled() ); notifier.setSendOnError( newNotifier.isSendOnError() ); notifier.setSendOnFailure( newNotifier.isSendOnFailure() ); notifier.setSendOnSuccess( newNotifier.isSendOnSuccess() ); notifier.setSendOnWarning( newNotifier.isSendOnWarning() ); return populateProjectNotifier( continuum.addGroupNotifier( projectgroupid, notifier ) ); }
userNotifier.setType( notifier.getType() );
public ProjectNotifier addNotifier( int projectId, ProjectNotifier notifier ) throws ContinuumException { ProjectNotifier notif = new ProjectNotifier(); notif.setSendOnSuccess( notifier.isSendOnSuccess() ); notif.setSendOnFailure( notifier.isSendOnFailure() ); notif.setSendOnError( notifier.isSendOnError() ); notif.setSendOnWarning( notifier.isSendOnWarning() ); notif.setConfiguration( notifier.getConfiguration() ); notif.setType( notifier.getType() ); notif.setFrom( ProjectNotifier.FROM_USER ); Project project = getProjectWithAllDetails( projectId ); project.addNotifier( notif ); updateProject( project ); return notif; }
userNotifier.setType( notifier.getType() );
public ProjectNotifier addNotifier( int projectId, ProjectNotifier notifier ) throws ContinuumException { ProjectNotifier notif = new ProjectNotifier(); notif.setSendOnSuccess( notifier.isSendOnSuccess() ); notif.setSendOnFailure( notifier.isSendOnFailure() ); notif.setSendOnError( notifier.isSendOnError() ); notif.setSendOnWarning( notifier.isSendOnWarning() ); notif.setSendOnScmFailure( notifier.isSendOnScmFailure() ); notif.setConfiguration( notifier.getConfiguration() ); notif.setType( notifier.getType() ); notif.setFrom( ProjectNotifier.FROM_USER ); Project project = getProjectWithAllDetails( projectId ); project.addNotifier( notif ); updateProject( project ); return notif; }
public ProjectNotifier addGroupNotifier( int projectGroupId, ProjectNotifier notifier ) throws ContinuumException { ProjectNotifier notif = new ProjectNotifier(); notif.setSendOnSuccess( notifier.isSendOnSuccess() ); notif.setSendOnFailure( notifier.isSendOnFailure() ); notif.setSendOnError( notifier.isSendOnError() ); notif.setSendOnWarning( notifier.isSendOnWarning() ); notif.setConfiguration( notifier.getConfiguration() ); notif.setType( notifier.getType() ); notif.setFrom( ProjectNotifier.FROM_USER ); ProjectGroup projectGroup = getProjectGroupWithBuildDetails( projectGroupId ); projectGroup.addNotifier( notif ); try { store.updateProjectGroup( projectGroup ); } catch ( ContinuumStoreException cse ) { throw new ContinuumException( "unable to add notifier to project group", cse ); } return notif; }
public ProjectNotifier addGroupNotifier( int projectGroupId, ProjectNotifier notifier ) throws ContinuumException { ProjectNotifier notif = new ProjectNotifier(); notif.setSendOnSuccess( notifier.isSendOnSuccess() ); notif.setSendOnFailure( notifier.isSendOnFailure() ); notif.setSendOnError( notifier.isSendOnError() ); notif.setSendOnWarning( notifier.isSendOnWarning() ); notif.setSendOnScmFailure( notifier.isSendOnScmFailure() ); notif.setConfiguration( notifier.getConfiguration() ); notif.setType( notifier.getType() ); notif.setFrom( ProjectNotifier.FROM_USER ); ProjectGroup projectGroup = getProjectGroupWithBuildDetails( projectGroupId ); projectGroup.addNotifier( notif ); try { projectGroupDao.updateProjectGroup( projectGroup ); } catch ( ContinuumStoreException cse ) { throw new ContinuumException( "unable to add notifier to project group", cse ); } return notif; }
userNotifier.setType( notifier.getType() );