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; }
public boolean shouldNotify( ProjectScmRoot projectScmRoot, ProjectNotifier projectNotifier ) { if ( projectNotifier == null ) { projectNotifier = new ProjectNotifier(); } return projectScmRoot != null && ( alwaysSend || projectScmRoot.getState() == ContinuumProjectState.ERROR && projectNotifier.isSendOnScmFailure() && projectScmRoot.getOldState() != projectScmRoot.getState() ); }
throws IOException, XMLStreamException ProjectNotifier projectNotifier = new ProjectNotifier(); projectNotifier.setModelEncoding( encoding ); java.util.Set parsed = new java.util.HashSet();
ProjectNotifier notifier = new ProjectNotifier();
throws IOException, XMLStreamException ProjectNotifier projectNotifier = new ProjectNotifier(); java.util.Set parsed = new java.util.HashSet(); while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT )
ProjectNotifier notifier = new ProjectNotifier();
ProjectNotifier notifier = new ProjectNotifier();
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; }
ProjectNotifier notifier = new ProjectNotifier();
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 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 ) ); }
ProjectNotifier userNotifier = new ProjectNotifier();
ProjectNotifier notifier = new ProjectNotifier();
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; }
projectNotifier = new ProjectNotifier();
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; }
ProjectNotifier userNotifier = new ProjectNotifier();