当前位置: 首页 > 工具软件 > Java Gems > 使用案例 >

java notifier_Java Notifier類代碼示例

常乐
2023-12-01

本文整理匯總了Java中org.apache.maven.model.Notifier類的典型用法代碼示例。如果您正苦於以下問題:Java Notifier類的具體用法?Java Notifier怎麽用?Java Notifier使用的例子?那麽恭喜您, 這裏精選的類代碼示例或許可以為您提供幫助。

Notifier類屬於org.apache.maven.model包,在下文中一共展示了Notifier類的20個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於我們的係統推薦出更棒的Java代碼示例。

示例1: writeCiManagement

​點讚 3

import org.apache.maven.model.Notifier; //導入依賴的package包/類

private void writeCiManagement(CiManagement ciManagement, String tagName, XmlSerializer serializer)

throws java.io.IOException {

serializer.startTag(NAMESPACE, tagName);

flush(serializer);

StringBuffer b = b(serializer);

int start = b.length();

if (ciManagement.getSystem() != null) {

writeValue(serializer, "system", ciManagement.getSystem(), ciManagement);

}

if (ciManagement.getUrl() != null) {

writeValue(serializer, "url", ciManagement.getUrl(), ciManagement);

}

if ((ciManagement.getNotifiers() != null) && (ciManagement.getNotifiers().size() > 0)) {

serializer.startTag(NAMESPACE, "notifiers");

for (Iterator iter = ciManagement.getNotifiers().iterator(); iter.hasNext();) {

Notifier o = (Notifier) iter.next();

writeNotifier(o, "notifier", serializer);

}

serializer.endTag(NAMESPACE, "notifiers");

}

serializer.endTag(NAMESPACE, tagName).flush();

logLocation(ciManagement, "", start, b.length());

}

開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:24,

示例2: updateNotifier

​點讚 3

import org.apache.maven.model.Notifier; //導入依賴的package包/類

/**

* Method updateNotifier

*

* @param value

* @param element

* @param counter

* @param xmlTag

*/

//CHECKSTYLE_OFF: LineLength

protected void updateNotifier( Notifier value, String xmlTag, Counter counter, Element element )

{

Element root = element;

Counter innerCount = new Counter( counter.getDepth() + 1 );

findAndReplaceSimpleElement( innerCount, root, "type", value.getType(), "mail" );

findAndReplaceSimpleElement( innerCount, root, "sendOnError",

value.isSendOnError() ? null : String.valueOf( value.isSendOnError() ), "true" );

findAndReplaceSimpleElement( innerCount, root, "sendOnFailure",

value.isSendOnFailure() ? null : String.valueOf( value.isSendOnFailure() ), "true" );

findAndReplaceSimpleElement( innerCount, root, "sendOnSuccess",

value.isSendOnSuccess() ? null : String.valueOf( value.isSendOnSuccess() ), "true" );

findAndReplaceSimpleElement( innerCount, root, "sendOnWarning",

value.isSendOnWarning() ? null : String.valueOf( value.isSendOnWarning() ), "true" );

findAndReplaceSimpleElement( innerCount, root, "address", value.getAddress(), null );

findAndReplaceProperties( innerCount, root, "configuration", value.getConfiguration() );

}

開發者ID:javiersigler,項目名稱:apache-maven-shade-plugin,代碼行數:26,

示例3: visitCiManagement

​點讚 3

import org.apache.maven.model.Notifier; //導入依賴的package包/類

private void visitCiManagement( ModelVisitor visitor, CiManagement ciManagement )

{

List notifiers = ciManagement.getNotifiers();

if ( notifiers != null )

{

ListIterator notifierIterator = notifiers.listIterator();

while ( notifierIterator.hasNext() )

{

Notifier notifier = notifierIterator.next();

visitor.visitCiManagementNotifier( notifier );

visitCiManagementNotifier( visitor, notifier );

notifier = visitor.replaceCiManagementNotifier( notifier );

if ( notifier == null )

notifierIterator.remove();

else

notifierIterator.set( notifier );

}

}

}

開發者ID:fedora-java,項目名稱:xmvn,代碼行數:20,

示例4: visitCiManagementNotifier

​點讚 3

import org.apache.maven.model.Notifier; //導入依賴的package包/類

private void visitCiManagementNotifier( ModelVisitor visitor, Notifier notifier )

{

Properties configuration = notifier.getConfiguration();

if ( configuration != null )

{

Iterator> configurationElementIterator = configuration.entrySet().iterator();

while ( configurationElementIterator.hasNext() )

{

Entry configurationElement = configurationElementIterator.next();

String configurationElementKey = (String) configurationElement.getKey();

String configurationElementValue = (String) configurationElement.getKey();

visitor.visitCiManagementNotifierConfiguration( configurationElementKey, configurationElementValue );

configurationElementValue =

visitor.replaceCiManagementNotifierConfiguration( configurationElementKey,

configurationElementValue );

if ( configurationElementValue == null )

configurationElementIterator.remove();

else

configurationElement.setValue( configurationElementValue );

}

}

}

開發者ID:fedora-java,項目名稱:xmvn,代碼行數:23,

示例5: updateNotifier

​點讚 3

import org.apache.maven.model.Notifier; //導入依賴的package包/類

/**

* Method updateNotifier

*

* @param value

* @param element

* @param counter

* @param xmlTag

*/

protected void updateNotifier( Notifier value, String xmlTag, Counter counter, Element element )

{

Element root = element;

Counter innerCount = new Counter( counter.getDepth() + 1 );

findAndReplaceSimpleElement( innerCount, root, "type", value.getType(), "mail" );

findAndReplaceSimpleElement( innerCount, root, "sendOnError",

value.isSendOnError() ? null : String.valueOf( value.isSendOnError() ), "true" );

findAndReplaceSimpleElement( innerCount, root, "sendOnFailure",

value.isSendOnFailure() ? null : String.valueOf( value.isSendOnFailure() ),

"true" );

findAndReplaceSimpleElement( innerCount, root, "sendOnSuccess",

value.isSendOnSuccess() ? null : String.valueOf( value.isSendOnSuccess() ),

"true" );

findAndReplaceSimpleElement( innerCount, root, "sendOnWarning",

value.isSendOnWarning() ? null : String.valueOf( value.isSendOnWarning() ),

"true" );

findAndReplaceSimpleElement( innerCount, root, "address", value.getAddress(), null );

findAndReplaceProperties( innerCount, root, "configuration", value.getConfiguration() );

}

開發者ID:immutables,項目名稱:maven-shade-plugin,代碼行數:28,

示例6: mergeNotifier_Configuration

​點讚 3

import org.apache.maven.model.Notifier; //導入依賴的package包/類

protected void mergeNotifier_Configuration( Notifier target, Notifier source, boolean sourceDominant,

Map context )

{

Properties merged = new Properties();

if ( sourceDominant )

{

merged.putAll( target.getConfiguration() );

merged.putAll( source.getConfiguration() );

}

else

{

merged.putAll( source.getConfiguration() );

merged.putAll( target.getConfiguration() );

}

target.setConfiguration( merged );

}

開發者ID:gems-uff,項目名稱:oceano,代碼行數:17,

示例7: writeNotifier

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

private void writeNotifier(Notifier notifier, String tagName, XmlSerializer serializer)

throws java.io.IOException {

serializer.startTag(NAMESPACE, tagName);

flush(serializer);

StringBuffer b = b(serializer);

int start = b.length();

if ((notifier.getType() != null) && !notifier.getType().equals("mail")) {

writeValue(serializer, "type", notifier.getType(), notifier);

}

if (notifier.isSendOnError() != true) {

writeValue(serializer, "sendOnError", String.valueOf(notifier.isSendOnError()), notifier);

}

if (notifier.isSendOnFailure() != true) {

writeValue(serializer, "sendOnFailure", String.valueOf(notifier.isSendOnFailure()), notifier);

}

if (notifier.isSendOnSuccess() != true) {

writeValue(serializer, "sendOnSuccess", String.valueOf(notifier.isSendOnSuccess()), notifier);

}

if (notifier.isSendOnWarning() != true) {

writeValue(serializer, "sendOnWarning", String.valueOf(notifier.isSendOnWarning()), notifier);

}

if (notifier.getAddress() != null) {

writeValue(serializer, "address", notifier.getAddress(), notifier);

}

if ((notifier.getConfiguration() != null) && (notifier.getConfiguration().size() > 0)) {

serializer.startTag(NAMESPACE, "configuration");

for (Iterator iter = notifier.getConfiguration().keySet().iterator(); iter.hasNext();) {

String key = (String) iter.next();

String value = (String) notifier.getConfiguration().get(key);

serializer.startTag(NAMESPACE, "" + key + "").text(value).endTag(NAMESPACE, "" + key + "");

}

serializer.endTag(NAMESPACE, "configuration");

}

serializer.endTag(NAMESPACE, tagName).flush();

logLocation(notifier, "", start, b.length());

}

開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:37,

示例8: mergeNotifier

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

protected void mergeNotifier( Notifier target, Notifier source, boolean sourceDominant,

Map context )

{

mergeNotifier_Type( target, source, sourceDominant, context );

mergeNotifier_Address( target, source, sourceDominant, context );

mergeNotifier_Configuration( target, source, sourceDominant, context );

mergeNotifier_SendOnError( target, source, sourceDominant, context );

mergeNotifier_SendOnFailure( target, source, sourceDominant, context );

mergeNotifier_SendOnSuccess( target, source, sourceDominant, context );

mergeNotifier_SendOnWarning( target, source, sourceDominant, context );

}

開發者ID:gems-uff,項目名稱:oceano,代碼行數:12,

示例9: mergeNotifier_Type

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

protected void mergeNotifier_Type( Notifier target, Notifier source, boolean sourceDominant,

Map context )

{

String src = source.getType();

if ( src != null )

{

if ( sourceDominant || target.getType() == null )

{

target.setType( src );

}

}

}

開發者ID:gems-uff,項目名稱:oceano,代碼行數:13,

示例10: mergeNotifier_Address

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

protected void mergeNotifier_Address( Notifier target, Notifier source, boolean sourceDominant,

Map context )

{

String src = source.getAddress();

if ( src != null )

{

if ( sourceDominant || target.getAddress() == null )

{

target.setAddress( src );

}

}

}

開發者ID:gems-uff,項目名稱:oceano,代碼行數:13,

示例11: mergeNotifier_SendOnError

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

protected void mergeNotifier_SendOnError( Notifier target, Notifier source, boolean sourceDominant,

Map context )

{

if ( sourceDominant )

{

target.setSendOnError( source.isSendOnError() );

}

}

開發者ID:gems-uff,項目名稱:oceano,代碼行數:9,

示例12: mergeNotifier_SendOnFailure

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

protected void mergeNotifier_SendOnFailure( Notifier target, Notifier source, boolean sourceDominant,

Map context )

{

if ( sourceDominant )

{

target.setSendOnFailure( source.isSendOnFailure() );

}

}

開發者ID:gems-uff,項目名稱:oceano,代碼行數:9,

示例13: mergeNotifier_SendOnSuccess

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

protected void mergeNotifier_SendOnSuccess( Notifier target, Notifier source, boolean sourceDominant,

Map context )

{

if ( sourceDominant )

{

target.setSendOnSuccess( source.isSendOnSuccess() );

}

}

開發者ID:gems-uff,項目名稱:oceano,代碼行數:9,

示例14: mergeNotifier_SendOnWarning

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

protected void mergeNotifier_SendOnWarning( Notifier target, Notifier source, boolean sourceDominant,

Map context )

{

if ( sourceDominant )

{

target.setSendOnWarning( source.isSendOnWarning() );

}

}

開發者ID:gems-uff,項目名稱:oceano,代碼行數:9,

示例15: replaceCiManagementNotifier

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

@Override

public Notifier replaceCiManagementNotifier( Notifier notifier )

{

return notifier;

}

開發者ID:fedora-java,項目名稱:xmvn,代碼行數:6,

示例16: visitCiManagementNotifier

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

@Override

public void visitCiManagementNotifier( Notifier notifier )

{

}

開發者ID:fedora-java,項目名稱:xmvn,代碼行數:5,

示例17: iterateNotifier

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

/**

* Method iterateNotifier

*

* @param counter

* @param childTag

* @param parentTag

* @param list

* @param parent

*/

protected void iterateNotifier( Counter counter, Element parent, java.util.Collection list,

java.lang.String parentTag, java.lang.String childTag )

{

boolean shouldExist = list != null && list.size() > 0;

Element element = updateElement( counter, parent, parentTag, shouldExist );

if ( shouldExist )

{

Iterator it = list.iterator();

Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();

if ( !elIt.hasNext() )

{

elIt = null;

}

Counter innerCount = new Counter( counter.getDepth() + 1 );

while ( it.hasNext() )

{

Notifier value = (Notifier) it.next();

Element el;

if ( elIt != null && elIt.hasNext() )

{

el = (Element) elIt.next();

if ( !elIt.hasNext() )

{

elIt = null;

}

}

else

{

el = factory.element( childTag, element.getNamespace() );

insertAtPreferredLocation( element, el, innerCount );

}

updateNotifier( value, childTag, innerCount, el );

innerCount.increaseCount();

}

if ( elIt != null )

{

while ( elIt.hasNext() )

{

elIt.next();

elIt.remove();

}

}

}

}

開發者ID:immutables,項目名稱:maven-shade-plugin,代碼行數:54,

示例18: getNotifierKey

​點讚 2

import org.apache.maven.model.Notifier; //導入依賴的package包/類

protected Object getNotifierKey( Notifier object )

{

return object;

}

開發者ID:gems-uff,項目名稱:oceano,代碼行數:5,

示例19: replaceCiManagementNotifier

​點讚 1

import org.apache.maven.model.Notifier; //導入依賴的package包/類

Notifier replaceCiManagementNotifier( Notifier notifier );

開發者ID:fedora-java,項目名稱:xmvn,代碼行數:2,

示例20: visitCiManagementNotifier

​點讚 1

import org.apache.maven.model.Notifier; //導入依賴的package包/類

void visitCiManagementNotifier( Notifier notifier );

開發者ID:fedora-java,項目名稱:xmvn,代碼行數:2,

注:本文中的org.apache.maven.model.Notifier類示例整理自Github/MSDocs等源碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。

 类似资料: