@SuppressWarnings({ "unchecked", "rawtypes" })
	private StringBuffer getAllPublishedInterfaces(ServletContext servletContext) {
		
		StringBuffer sb = new StringBuffer();

		// List all containers to find all DWR interfaces
		List<Container> containers = ContainerUtil.getAllPublishedContainers(servletContext);
		for(Iterator<Container> it = containers.iterator();it.hasNext();) {
			Container container = (Container) it.next();
			
			// The creatormanager holds the list of beans
			CreatorManager ctManager = (CreatorManager) container.getBean(CreatorManager.class.getName());
			
			if(null != ctManager) {
				// The remoter builds interface scripts. 
				Remoter remoter = (Remoter) container.getBean(Remoter.class.getName());
				
				String path = getPathReplacementString(container);
				boolean debugMode = ctManager.isDebug();
				Collection creators = null;
				if(!(ctManager instanceof DefaultCreatorManager)) {
					if(!debugMode)
						LOGGER.warn("The current creatormanager is a custom implementation [" 
								+ ctManager.getClass().getName() 
								+ "]. Debug mode is off, so the mapping dwr:_** is likely to trigger a SecurityException." +
								" Attempting to get all published creators..." );
					creators = ctManager.getCreatorNames();
					
				}
				else {	
					DefaultCreatorManager dfCreator = (DefaultCreatorManager) ctManager;					
					try 
					{
						dfCreator.setDebug(true);
						creators = ctManager.getCreatorNames();
					}
					finally{
						// restore debug mode no matter what
						dfCreator.setDebug(debugMode);
					}
				}
				for(Iterator<String> names = creators.iterator();names.hasNext();) {
					String script = remoter.generateInterfaceScript(names.next(), path);
					// Must remove the engine init script to avoid unneeded duplication
					script = removeEngineInit(script);
					sb.append(script);
				}
			}
		}
		return sb;
	}
@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) private StringBuffer getAllPublishedInterfaces ( ServletContext servletContext ) { StringBuffer sb = new StringBuffer ( ) ; List < Container > containers = ContainerUtil . getAllPublishedContainers ( servletContext ) ; for ( Iterator < Container > it = containers . iterator ( ) ; it . hasNext ( ) ; ) { Container container = ( Container ) it . next ( ) ; CreatorManager ctManager = ( CreatorManager ) container . getBean ( CreatorManager . class . getName ( ) ) ; if ( null != ctManager ) { Remoter remoter = ( Remoter ) container . getBean ( Remoter . class . getName ( ) ) ; String path = getPathReplacementString ( container ) ; boolean debugMode = ctManager . isDebug ( ) ; Collection creators = null ; if ( ! ( ctManager instanceof DefaultCreatorManager ) ) { if ( ! debugMode ) LOGGER . warn ( "The current creatormanager is a custom implementation [" + ctManager . getClass ( ) . getName ( ) + "]. Debug mode is off, so the mapping dwr:_** is likely to trigger a SecurityException." + " Attempting to get all published creators..." ) ; creators = ctManager . getCreatorNames ( ) ; } else { DefaultCreatorManager dfCreator = ( DefaultCreatorManager ) ctManager ; try { dfCreator . setDebug ( true ) ; creators = ctManager . getCreatorNames ( ) ; } finally { dfCreator . setDebug ( debugMode ) ; } } for ( Iterator < String > names = creators . iterator ( ) ; names . hasNext ( ) ; ) { String script = remoter . generateInterfaceScript ( names . next ( ) , path ) ; script = removeEngineInit ( script ) ; sb . append ( script ) ; } } } return sb ; }
Returns a script with all the DWR interfaces available in the servletcontext
@param basePath
@return