protected final void setNonceForWffScript ( final String value ) { if ( autoremoveWffScript ) { throw new InvalidUsageException ( "Cannot remove while autoremoveWffScript is set as true. Please do setAutoremoveWffScript(false)" ) ; } if ( value != null ) { if ( nonceForWffScriptTag == null ) { nonceForWffScriptTag = new Nonce ( value ) ; if ( wffScriptTagId != null ) { final AbstractHtml [ ] ownerTags = wffScriptTagId . getOwnerTags ( ) ; if ( ownerTags . length > 0 ) { final AbstractHtml wffScript = ownerTags [ 0 ] ; wffScript . addAttributes ( nonceForWffScriptTag ) ; } } } else { nonceForWffScriptTag . setValue ( value ) ; } } else { if ( wffScriptTagId != null && nonceForWffScriptTag != null ) { final AbstractHtml [ ] ownerTags = wffScriptTagId . getOwnerTags ( ) ; if ( ownerTags . length > 0 ) { final AbstractHtml wffScript = ownerTags [ 0 ] ; wffScript . removeAttributes ( nonceForWffScriptTag ) ; } } nonceForWffScriptTag = null ; } }
Sets nonce attribute value for wff script .