private Document _safeGetUserLayout ( IPerson person , IUserProfile profile ) { Document layoutDoc ; Tuple < String , String > key = null ; final Cache < Tuple < String , String > , Document > layoutCache = getLayoutImportExportCache ( ) ; if ( layoutCache != null ) { key = new Tuple <> ( person . getUserName ( ) , profile . getProfileFname ( ) ) ; layoutDoc = layoutCache . getIfPresent ( key ) ; if ( layoutDoc != null ) { return ( Document ) layoutDoc . cloneNode ( true ) ; } } layoutDoc = super . getPersonalUserLayout ( person , profile ) ; Element layout = layoutDoc . getDocumentElement ( ) ; layout . setAttribute ( Constants . NS_DECL , Constants . NS_URI ) ; if ( layoutCache != null && key != null ) { layoutCache . put ( key , ( Document ) layoutDoc . cloneNode ( true ) ) ; } return layoutDoc ; }
Handles locking and identifying proper root and namespaces that used to take place in super class .