public static synchronized void register ( Class < ? > clazz , boolean indexable ) { if ( ! resources . containsKey ( clazz ) ) { resources . put ( clazz , new RestResource ( clazz ) ) ; // Optionally register this service as Indexable if ( indexable ) { IndexableServiceRegistry . register ( clazz ) ; } revision ++ ; } }
Register a new resource - N . B . currently this resource cannot be safely unregistered without restarting the webapp