protected void setTranslationUniqueIds ( final ContentSpec contentSpec , final TranslatedContentSpecWrapper translatedContentSpec ) throws BuildProcessingException { final List < TranslatedCSNodeWrapper > translatedCSNodes = translatedContentSpec . getTranslatedNodes ( ) . getItems ( ) ; for ( final TranslatedCSNodeWrapper translatedCSNode : translatedCSNodes ) { final org . jboss . pressgang . ccms . contentspec . Node node = ContentSpecUtilities . findMatchingContentSpecNode ( contentSpec , translatedCSNode . getNodeId ( ) ) ; if ( node != null ) { node . setTranslationUniqueId ( translatedCSNode . getId ( ) . toString ( ) ) ; if ( node instanceof KeyValueNode && ( ( KeyValueNode ) node ) . getValue ( ) instanceof SpecTopic ) { ( ( SpecTopic ) ( ( KeyValueNode ) node ) . getValue ( ) ) . setTranslationUniqueId ( translatedCSNode . getId ( ) . toString ( ) ) ; } } else { // This shouldn't happen, but take care of it incase it does due to another bug throw new BuildProcessingException ( "Unable to find a matching Content Spec Node object for Translated Node " + translatedCSNode . getId ( ) ) ; } } }
Sets the Translation Unique Ids on all the content spec nodes that have a matching translated node .