protected final ModelFactory modelFactory() { if(this.modelFactory==null) { this.modelFactory=runtimeDelegate().getModelFactory(); } return this.modelFactory; }
private ApplicationLoader(Class<? extends Application<T>> appClass) { this.appClass=appClass; RuntimeDelegate instance = RuntimeDelegate.getInstance(); this.transactionManager=instance.getTransactionManager(); this.modelFactory=instance.getModelFactory(); ServiceRegistry serviceRegistry=ServiceRegistry.getInstance(); this.writeSessionService=serviceRegistry.getService(WriteSessionService.class); this.templateManagementService=serviceRegistry.getService(TemplateManagementService.class); }
private EndpointManagementService(TemplateManagementService templateManagementService) { this.templateManagementService = templateManagementService; this.modelFactory=RuntimeDelegate.getInstance().getModelFactory(); this.endpointRepository=RuntimeDelegate.getInstance().getEndpointRepository(); this.resourceRepository=RuntimeDelegate.getInstance().getResourceRepository(); this.listenerManager=ListenerManager.<EndpointLifecycleListener>newInstance(); }
@Before public void setUp() throws Exception { this.sut = ServiceRegistry. getInstance(). getService(ResourceControllerService.class); this.tms = ServiceRegistry. getInstance(). getService(TemplateManagementService.class); this.modelFactory= RuntimeDelegate. getInstance(). getModelFactory(); }
@Before public void setUp() throws Exception { ServiceRegistry.setInstance(null); RuntimeDelegate.setInstance(new InMemoryRuntimeDelegate()); this.templateManagementService = ServiceRegistry. getInstance(). getService(TemplateManagementService.class); this.templateManagementService. configure( Lists.<Class<?>>newArrayList(), Arrays.<ResourceHandler>asList(new PersonHandler())); this.modelFactory= RuntimeDelegate. getInstance(). getModelFactory(); this.writeSessionService= ServiceRegistry. getInstance(). getService(WriteSessionService.class); }
getInstance(). getEndpointRepository(); this.modelFactory = RuntimeDelegate.getInstance().getModelFactory(); Class<? extends ResourceHandler> handlerClass = PersonHandler.class; this.resource=createResource(handlerClass, NAME1);