/** * @see org.carewebframework.api.context.IManagedContext#getContextItems(boolean) */ @Override public ContextItems getContextItems(boolean pending) { contextItems.clear(); DomainClass domainObject = getContextObject(pending); return domainObject == null ? contextItems : toCCOWContext(domainObject); }
/** * @see org.carewebframework.api.context.IManagedContext#getContextItems(boolean) */ @Override public ContextItems getContextItems(boolean pending) { contextItems.clear(); DomainClass domainObject = getContextObject(pending); return domainObject == null ? contextItems : toCCOWContext(domainObject); }
/** * Initializes one or all managed contexts to their default state. * * @param item Managed context to initialize or, if null, initializes all managed contexts. * @param callback Callback to report subscriber responses. */ public void init(IManagedContext<?> item, ISurveyCallback callback) { contextItems.clear(); if (ccowIsActive()) { contextItems.addItems(ccowContextManager.getCCOWContext()); } if (item != null) { initItem(item, callback); } else { SurveyResponse response = new SurveyResponse(); initItem(managedContexts.iterator(), response, callback); } }
/** * Initializes one or all managed contexts to their default state. * * @param item Managed context to initialize or, if null, initializes all managed contexts. * @return True if the operation was successful. */ public boolean init(IManagedContext item) { contextItems.clear(); boolean result = true; if (ccowIsActive()) { contextItems.addItems(ccowContextManager.getCCOWContext()); } if (item != null) { result = initItem(item); } else { for (IManagedContext managedContext : managedContexts) { result &= initItem(managedContext); } } return result; }