/** * Returns the managed location context. * * @return Location context. */ static public LocationContext getLocationContext() { return (LocationContext) ContextManager.getInstance().getSharedContext(LocationContext.class.getName()); }
/** * @see org.carewebframework.api.context.ISharedContext#requestContextChange(Object) */ @Override public void requestContextChange(DomainClass newContextObject) throws ContextException { if (isSameContext(newContextObject, getContextObject(false))) { return; } if (isPending) { throw new ContextException("A context change is already pending."); } contextManager.localChangeBegin(this); domainObject[CONTEXT_PENDING] = newContextObject; isPending = true; contextManager.localChangeEnd(this, null); }
log.trace("Logging Out"); IContextManager contextManager = ContextManager.getInstance(); boolean result = contextManager == null || contextManager.reset(force) || force;
/** * @see org.carewebframework.api.context.ISharedContext#requestContextChange(Object) */ @Override public void requestContextChange(DomainClass newContextObject) throws ContextException { if (isSameContext(newContextObject, getContextObject(false))) { return; } if (isPending) { throw new ContextException("A context change is already pending."); } contextManager.localChangeBegin(this); domainObject[CONTEXT_PENDING] = newContextObject; isPending = true; contextManager.localChangeEnd(this); }
/** * Returns the managed patient context. * * @return Patient context. */ @SuppressWarnings("unchecked") public static ISharedContext<Patient> getPatientContext() { return (ISharedContext<Patient>) ContextManager.getInstance().getSharedContext(PatientContext.class.getName()); }
/** * Returns the managed user context. * * @return User context */ @SuppressWarnings("unchecked") public static ISharedContext<IUser> getUserContext() { return (ISharedContext<IUser>) ContextManager.getInstance().getSharedContext(UserContext.class.getName()); }
/** * Returns the managed participant context. * * @return Participant context. */ @SuppressWarnings("unchecked") static public ISharedContext<Participant> getParticipantContext() { return (ISharedContext<Participant>) ContextManager.getInstance().getSharedContext( EncounterParticipantContext.class.getName()); }
/** * Returns the managed participant context. * * @return EncounterParticipantComponent context. */ @SuppressWarnings("unchecked") static public ISharedContext<EncounterParticipantComponent> getParticipantContext() { return (ISharedContext<EncounterParticipantComponent>) ContextManager.getInstance() .getSharedContext(EncounterParticipantContext.class.getName()); }
/** * Returns the managed patient context. * * @return Patient context. */ public static PatientContext getPatientContext() { return (PatientContext) ContextManager.getInstance().getSharedContext(PatientContext.class.getName()); }
/** * Returns the managed encounter context. * * @return Encounter context. */ @SuppressWarnings("unchecked") static public ISharedContext<Encounter> getEncounterContext() { return (ISharedContext<Encounter>) ContextManager.getInstance().getSharedContext(EncounterContext.class.getName()); }
/** * Returns the managed user context. * * @return User context */ @SuppressWarnings("unchecked") public static ISharedContext<IUser> getUserContext() { return (ISharedContext<IUser>) ContextManager.getInstance().getSharedContext(UserContext.class.getName()); }
/** * Returns the managed encounter context. * * @return Encounter context. */ static public EncounterContext getEncounterContext() { return (EncounterContext) ContextManager.getInstance().getSharedContext(EncounterContext.class.getName()); }
/** * Returns the managed location context. * * @return Location context. */ @SuppressWarnings("unchecked") static public ISharedContext<Location> getLocationContext() { return (ISharedContext<Location>) ContextManager.getInstance().getSharedContext(LocationContext.class.getName()); }