/** * Initialize context objects to their default state. The default state should match the CCOW * context if one exists, or an initial state as determined by the context object. * * @return {@link #init(IManagedContext)} */ public boolean init() { return init(null); }
/** * Initialize context objects to their default state. The default state should match the CCOW * context if one exists, or an initial state as determined by the context object. * * @param callback Callback to report subscriber responses. */ public void init(ISurveyCallback callback) { init(null, callback); }
/** * Joins the CCOW common context, if available. */ public void ccowJoin() { if (ccowIsActive()) { return; } if (ccowContextManager == null && ccowEnabled) { ccowContextManager = new CCOWContextManager(); ccowContextManager.subscribe(this); ccowContextManager.run("CareWebFramework#", "", true, "*"); } if (ccowContextManager != null) { if (!ccowContextManager.isActive()) { ccowContextManager.resume(); } init(response -> { if (response.rejected()) { ccowContextManager.suspend(); } updateCCOWStatus(); }); } }
/** * Joins the CCOW common context, if available. * * @return True if the operation was successful. */ public boolean ccowJoin() { if (ccowIsActive()) { return true; } if (ccowContextManager == null && ccowEnabled) { ccowContextManager = new CCOWContextManager(); ccowContextManager.subscribe(this); ccowContextManager.run("CareWebFramework#", "", true, "*"); } if (ccowContextManager != null) { if (!ccowContextManager.isActive()) { ccowContextManager.resume(); } if (!init()) { ccowContextManager.suspend(); } } updateCCOWStatus(); return ccowIsActive(); }