/** * Method removeOtherArchive. * * @param string */ public void removeOtherArchive( String string ) { getOtherArchives().remove( string ); } //-- void removeOtherArchive( String )
/** * Method addOtherArchive. * * @param string */ public void addOtherArchive( String string ) { getOtherArchives().add( string ); } //-- void addOtherArchive( String )
protected void mergeMailingList_OtherArchives( MailingList target, MailingList source, boolean sourceDominant, Map<Object, Object> context ) { List<String> src = source.getOtherArchives(); if ( !src.isEmpty() ) { List<String> tgt = target.getOtherArchives(); List<String> merged = new ArrayList<>( tgt.size() + src.size() ); merged.addAll( tgt ); merged.addAll( src ); target.setOtherArchives( merged ); } }
if ( ( mailingList.getOtherArchives() != null ) && ( mailingList.getOtherArchives().size() > 0 ) ) for ( Iterator iter = mailingList.getOtherArchives().iterator(); iter.hasNext(); )
public static MailingList cloneMailingList( MailingList src ) { if ( src == null ) { return null; } MailingList result = new MailingList(); result.setArchive( src.getArchive() ); result.setName( src.getName() ); result.setOtherArchives( src.getOtherArchives() ); result.setPost( src.getPost() ); result.setSubscribe( src.getSubscribe() ); result.setUnsubscribe( src.getUnsubscribe() ); return result; }
private void mailingLists( List<MailingList> mailingLists ) { for( MailingList list : mailingLists ) { p.printStartBlock( "mailing_list", list.getName() ); p.println( "subscribe", list.getSubscribe() ); p.println( "unsubscribe", list.getUnsubscribe() ); p.println( "post", list.getPost() ); // not thread safe !! list.getOtherArchives().add( 0, list.getArchive() ); p.println( "archives", toArray( list.getOtherArchives() ) ); // keep model as is - not thread safe !! list.getOtherArchives().remove( 0 ); p.printEndBlock(); p.println(); } }
if ( ( mailingList.getOtherArchives() != null ) && ( mailingList.getOtherArchives().size() > 0 ) ) for ( Iterator iter = mailingList.getOtherArchives().iterator(); iter.hasNext(); )
/** * Method addOtherArchive. * * @param string */ public void addOtherArchive( String string ) { getOtherArchives().add( string ); } //-- void addOtherArchive( String )
/** * Method removeOtherArchive. * * @param string */ public void removeOtherArchive( String string ) { getOtherArchives().remove( string ); } //-- void removeOtherArchive( String )
/** * Method addOtherArchive * * @param string */ public void addOtherArchive(String string) { if ( !(string instanceof String) ) { throw new ClassCastException( "MailingList.addOtherArchives(string) parameter must be instanceof " + String.class.getName() ); } getOtherArchives().add( string ); } //-- void addOtherArchive(String)
/** * Method removeOtherArchive * * @param string */ public void removeOtherArchive(String string) { if ( !(string instanceof String) ) { throw new ClassCastException( "MailingList.removeOtherArchives(string) parameter must be instanceof " + String.class.getName() ); } getOtherArchives().remove( string ); } //-- void removeOtherArchive(String)
protected void mergeMailingList_OtherArchives( MailingList target, MailingList source, boolean sourceDominant, Map<Object, Object> context ) { List<String> src = source.getOtherArchives(); if ( !src.isEmpty() ) { List<String> tgt = target.getOtherArchives(); List<String> merged = new ArrayList<String>( tgt.size() + src.size() ); merged.addAll( tgt ); merged.addAll( src ); target.setOtherArchives( merged ); } }
private void mailingLists( List<MailingList> mailingLists ) { for( MailingList list : mailingLists ) { p.printStartBlock( "mailing_list", list.getName() ); p.println( "subscribe", list.getSubscribe() ); p.println( "unsubscribe", list.getUnsubscribe() ); p.println( "post", list.getPost() ); // not thread safe !! list.getOtherArchives().add( 0, list.getArchive() ); p.println( "archives", toArray( list.getOtherArchives() ) ); // keep model as is - not thread safe !! list.getOtherArchives().remove( 0 ); p.printEndBlock(); p.println(); } }
private void mailingLists( List<MailingList> mailingLists ) { for( MailingList list : mailingLists ) { p.printStartBlock( "mailing_list", list.getName() ); p.println( "subscribe", list.getSubscribe() ); p.println( "unsubscribe", list.getUnsubscribe() ); p.println( "post", list.getPost() ); // not thread safe !! list.getOtherArchives().add( 0, list.getArchive() ); p.println( "archives", toArray( list.getOtherArchives() ) ); // keep model as is - not thread safe !! list.getOtherArchives().remove( 0 ); p.printEndBlock(); p.println(); } }
private List<org.apache.archiva.metadata.model.MailingList> convertMailingLists( List<MailingList> mailingLists ) { List<org.apache.archiva.metadata.model.MailingList> l = new ArrayList<>(); for ( MailingList mailingList : mailingLists ) { org.apache.archiva.metadata.model.MailingList newMailingList = new org.apache.archiva.metadata.model.MailingList(); newMailingList.setName( mailingList.getName() ); newMailingList.setMainArchiveUrl( mailingList.getArchive() ); newMailingList.setPostAddress( mailingList.getPost() ); newMailingList.setSubscribeAddress( mailingList.getSubscribe() ); newMailingList.setUnsubscribeAddress( mailingList.getUnsubscribe() ); newMailingList.setOtherArchives( mailingList.getOtherArchives() ); l.add( newMailingList ); } return l; }
private List<org.apache.archiva.metadata.model.MailingList> convertMailingLists( List<MailingList> mailingLists ) { List<org.apache.archiva.metadata.model.MailingList> l = new ArrayList<>(); for ( MailingList mailingList : mailingLists ) { org.apache.archiva.metadata.model.MailingList newMailingList = new org.apache.archiva.metadata.model.MailingList(); newMailingList.setName( mailingList.getName() ); newMailingList.setMainArchiveUrl( mailingList.getArchive() ); newMailingList.setPostAddress( mailingList.getPost() ); newMailingList.setSubscribeAddress( mailingList.getSubscribe() ); newMailingList.setUnsubscribeAddress( mailingList.getUnsubscribe() ); newMailingList.setOtherArchives( mailingList.getOtherArchives() ); l.add( newMailingList ); } return l; }
/** * Method updateMailingList. * * @param value * @param element * @param counter * @param xmlTag */ protected void updateMailingList(MailingList value, String xmlTag, Counter counter, Element element) { Element root = element; Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null); findAndReplaceSimpleElement(innerCount, root, "subscribe", value.getSubscribe(), null); findAndReplaceSimpleElement(innerCount, root, "unsubscribe", value.getUnsubscribe(), null); findAndReplaceSimpleElement(innerCount, root, "post", value.getPost(), null); findAndReplaceSimpleElement(innerCount, root, "archive", value.getArchive(), null); findAndReplaceSimpleLists(innerCount, root, value.getOtherArchives(), "otherArchives", "otherArchive"); } // -- void updateMailingList(MailingList, String, Counter, Element)
/** * Method updateMailingList * * @param value * @param element * @param counter * @param xmlTag */ protected void updateMailingList( MailingList value, String xmlTag, Counter counter, Element element ) { Element root = element; Counter innerCount = new Counter( counter.getDepth() + 1 ); findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null ); findAndReplaceSimpleElement( innerCount, root, "subscribe", value.getSubscribe(), null ); findAndReplaceSimpleElement( innerCount, root, "unsubscribe", value.getUnsubscribe(), null ); findAndReplaceSimpleElement( innerCount, root, "post", value.getPost(), null ); findAndReplaceSimpleElement( innerCount, root, "archive", value.getArchive(), null ); findAndReplaceSimpleLists( innerCount, root, value.getOtherArchives(), "otherArchives", "otherArchive" ); } // -- void updateMailingList(MailingList, String, Counter, Element)
/** * Method updateMailingList * * @param value * @param element * @param counter * @param xmlTag */ protected void updateMailingList( MailingList value, String xmlTag, Counter counter, Element element ) { Element root = element; Counter innerCount = new Counter( counter.getDepth() + 1 ); findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null ); findAndReplaceSimpleElement( innerCount, root, "subscribe", value.getSubscribe(), null ); findAndReplaceSimpleElement( innerCount, root, "unsubscribe", value.getUnsubscribe(), null ); findAndReplaceSimpleElement( innerCount, root, "post", value.getPost(), null ); findAndReplaceSimpleElement( innerCount, root, "archive", value.getArchive(), null ); findAndReplaceSimpleLists( innerCount, root, value.getOtherArchives(), "otherArchives", "otherArchive" ); } // -- void updateMailingList(MailingList, String, Counter, Element)
/** * Method updateMailingList * * @param value * @param element * @param counter * @param xmlTag */ protected void updateMailingList(MailingList value, String xmlTag, Counter counter, Element element) { Element root = element; Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null); findAndReplaceSimpleElement(innerCount, root, "subscribe", value.getSubscribe(), null); findAndReplaceSimpleElement(innerCount, root, "unsubscribe", value.getUnsubscribe(), null); findAndReplaceSimpleElement(innerCount, root, "post", value.getPost(), null); findAndReplaceSimpleElement(innerCount, root, "archive", value.getArchive(), null); findAndReplaceSimpleLists(innerCount, root, value.getOtherArchives(), "otherArchives", "otherArchive"); } //-- void updateMailingList(MailingList, String, Counter, Element)