本文整理了Java中org.apache.maven.continuum.model.project.Project.getNotifiers()
方法的一些代码示例,展示了Project.getNotifiers()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.getNotifiers()
方法的具体详情如下:
包路径:org.apache.maven.continuum.model.project.Project
类名称:Project
方法名:getNotifiers
[英]Method getNotifiers
[中]方法getNotifiers
代码示例来源:origin: org.apache.continuum/continuum-model
/**
* Method addNotifier.
*
* @param projectNotifier
*/
public void addNotifier( ProjectNotifier projectNotifier )
{
getNotifiers().add( projectNotifier );
} //-- void addNotifier( ProjectNotifier )
代码示例来源:origin: org.apache.continuum/continuum-model
/**
* Method removeNotifier.
*
* @param projectNotifier
*/
public void removeNotifier( ProjectNotifier projectNotifier )
{
getNotifiers().remove( projectNotifier );
} //-- void removeNotifier( ProjectNotifier )
代码示例来源:origin: org.apache.maven.continuum/continuum-model
/**
* Method addNotifier
*
* @param projectNotifier
*/
public void addNotifier(ProjectNotifier projectNotifier)
{
if ( !(projectNotifier instanceof ProjectNotifier) )
{
throw new ClassCastException( "Project.addNotifiers(projectNotifier) parameter must be instanceof " + ProjectNotifier.class.getName() );
}
getNotifiers().add( projectNotifier );
} //-- void addNotifier(ProjectNotifier)
代码示例来源:origin: org.apache.maven.continuum/continuum-model
/**
* Method removeNotifier
*
* @param projectNotifier
*/
public void removeNotifier(ProjectNotifier projectNotifier)
{
if ( !(projectNotifier instanceof ProjectNotifier) )
{
throw new ClassCastException( "Project.removeNotifiers(projectNotifier) parameter must be instanceof " + ProjectNotifier.class.getName() );
}
getNotifiers().remove( projectNotifier );
} //-- void removeNotifier(ProjectNotifier)
代码示例来源:origin: org.apache.continuum/continuum-core
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;
}
代码示例来源:origin: org.apache.maven.continuum/continuum-core
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;
}
代码示例来源:origin: org.apache.continuum/continuum-core
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 );
}
}
}
代码示例来源:origin: org.apache.maven.continuum/continuum-core
else if ( project.getNotifiers() != null && !project.getNotifiers().isEmpty() )
for ( ProjectNotifier notifier : (List<ProjectNotifier>) project.getNotifiers() )
代码示例来源:origin: org.apache.maven.continuum/continuum-test
public void assertProjectEquals( String name, List notifiers, String version, Project actual )
{
assertEquals( "project.name", name, actual.getName() );
// assertEquals( "project.scmUrl", scmUrl, actual.getScmUrl() );
if ( notifiers != null )
{
assertNotNull( "project.notifiers", actual.getNotifiers() );
assertEquals( "project.notifiers.size", notifiers.size(), actual.getNotifiers().size() );
for ( int i = 0; i < notifiers.size(); i++ )
{
ProjectNotifier notifier = (ProjectNotifier) notifiers.get( i );
ProjectNotifier actualNotifier = (ProjectNotifier) actual.getNotifiers().get( i );
assertEquals( "project.notifiers.notifier.type", notifier.getType(), actualNotifier.getType() );
assertEquals( "project.notifiers.notifier.configuration.address",
notifier.getConfiguration().get( "address" ),
actualNotifier.getConfiguration().get( "address" ) );
}
}
assertEquals( "project.version", version, actual.getVersion() );
}
代码示例来源:origin: org.apache.continuum/continuum-test
public void assertProjectEquals( String name, List<ProjectNotifier> notifiers, String version, Project actual )
{
assertEquals( "project.name", name, actual.getName() );
// assertEquals( "project.scmUrl", scmUrl, actual.getScmUrl() );
if ( notifiers != null )
{
assertNotNull( "project.notifiers", actual.getNotifiers() );
assertEquals( "project.notifiers.size", notifiers.size(), actual.getNotifiers().size() );
for ( int i = 0; i < notifiers.size(); i++ )
{
ProjectNotifier notifier = notifiers.get( i );
ProjectNotifier actualNotifier = (ProjectNotifier) actual.getNotifiers().get( i );
assertEquals( "project.notifiers.notifier.type", notifier.getType(), actualNotifier.getType() );
assertEquals( "project.notifiers.notifier.configuration.address", notifier.getConfiguration().get(
"address" ), actualNotifier.getConfiguration().get( "address" ) );
}
}
assertEquals( "project.version", version, actual.getVersion() );
}
代码示例来源:origin: org.apache.continuum/continuum-test
public void assertProjectEquals( Project expected, Project actual )
{
assertProjectEquals( expected.getName(), expected.getNotifiers(), expected.getVersion(), actual );
}
代码示例来源:origin: org.apache.maven.continuum/continuum-test
public void assertProjectEquals( Project expected, Project actual )
{
assertProjectEquals( expected.getName(), expected.getNotifiers(), expected.getVersion(), actual );
}
代码示例来源:origin: org.apache.continuum/continuum-buildagent-core
projectMap.put( ContinuumBuildAgentUtil.KEY_PROJECT_DEPENDENCIES, getProjectDependencies(
project.getDependencies() ) );
projectMap.put( ContinuumBuildAgentUtil.KEY_PROJECT_NOTIFIERS, getProjectNotifiers( project.getNotifiers() ) );
代码示例来源:origin: org.apache.maven.continuum/continuum-core
for ( Iterator i = project.getNotifiers().iterator(); i.hasNext(); )
代码示例来源:origin: org.apache.maven.continuum/continuum-core
for ( Iterator notifierIt = project.getNotifiers().iterator(); notifierIt.hasNext(); )
代码示例来源:origin: org.apache.continuum/continuum-buildagent-core
if ( project.getNotifiers() != null && !project.getNotifiers().isEmpty() )
for ( ProjectNotifier notif : (List<ProjectNotifier>) project.getNotifiers() )
代码示例来源:origin: org.apache.maven.continuum/continuum-core
if ( project.getNotifiers() != null && !project.getNotifiers().isEmpty() )
for ( Iterator i = project.getNotifiers().iterator(); i.hasNext(); )
代码示例来源:origin: org.apache.continuum/continuum-buildagent-core
if ( continuumProject.getNotifiers() != null )
for ( int i = 0; i < continuumProject.getNotifiers().size(); i++ )
ProjectNotifier notifier = (ProjectNotifier) continuumProject.getNotifiers().get( i );
代码示例来源:origin: org.apache.continuum/continuum-core
for ( ProjectNotifier notifier : (List<ProjectNotifier>) project.getNotifiers() )
代码示例来源:origin: org.apache.continuum/continuum-core
if ( project.getNotifiers() != null )
for ( ProjectNotifier notifier : project.getNotifiers() )
内容来源于网络,如有侵权,请联系作者删除!