private List < NodeTypeData > registerListOfNodeTypes ( final List < NodeTypeData > nodeTypes , final int alreadyExistsBehaviour ) throws RepositoryException { // validate nodeTypeDataValidator . validateNodeType ( nodeTypes ) ; nodeTypeRepository . registerNodeType ( nodeTypes , this , accessControlPolicy , alreadyExistsBehaviour ) ; for ( NodeTypeData nodeType : nodeTypes ) { for ( NodeTypeManagerListener listener : listeners . values ( ) ) { listener . nodeTypeRegistered ( nodeType . getName ( ) ) ; } } if ( started && rpcService != null && repository != null && repository . getState ( ) == ManageableRepository . ONLINE ) { try { String [ ] names = new String [ nodeTypes . size ( ) ] ; for ( int i = 0 ; i < names . length ; i ++ ) { names [ i ] = nodeTypes . get ( i ) . getName ( ) . getAsString ( ) ; } rpcService . executeCommandOnAllNodes ( registerNodeTypes , false , id , names ) ; } catch ( Exception e ) { LOG . warn ( "Could not register the node types on other cluster nodes" , e ) ; } } return nodeTypes ; }
Registers the provided node types