public synchronized void putItem ( TopLevelItem item ) throws IOException , InterruptedException { String name = item . getName ( ) ; TopLevelItem old = items . get ( name ) ; if ( old == item ) return ; // noop checkPermission ( Item . CREATE ) ; if ( old != null ) old . delete ( ) ; items . put ( name , item ) ; ItemListener . fireOnCreated ( item ) ; }
Overwrites the existing item by new one .