private DefaultServiceDefaultsContext resolveServiceDefaults ( ServiceDefaultsType serviceDefaults , RealmsContext realmsContext ) { if ( serviceDefaults == null ) { return null ; } DefaultAcceptOptionsContext acceptOptions = null ; ServiceAcceptOptionsType serviceAcceptOptions = serviceDefaults . getAcceptOptions ( ) ; if ( serviceAcceptOptions != null ) { acceptOptions = new DefaultAcceptOptionsContext ( null , serviceAcceptOptions ) ; } DefaultConnectOptionsContext connectOptions = null ; ServiceConnectOptionsType serviceConnectOptions = serviceDefaults . getConnectOptions ( ) ; if ( serviceConnectOptions != null ) { connectOptions = new DefaultConnectOptionsContext ( null , serviceConnectOptions ) ; } Map < String , String > mimeMappings = null ; MimeMappingType [ ] mimeMappingTypes = serviceDefaults . getMimeMappingArray ( ) ; if ( mimeMappingTypes != null ) { mimeMappings = new HashMap <> ( ) ; for ( MimeMappingType mmt : mimeMappingTypes ) { mimeMappings . put ( mmt . getExtension ( ) , mmt . getMimeType ( ) ) ; } } return new DefaultServiceDefaultsContext ( acceptOptions , connectOptions , mimeMappings ) ; }
own object to management .