/** * Retrieves the value of a named attribute from the attribute cache. * * @param key Attribute name * @return Attribute value. * @throws IllegalStateException if AppFramework is not initialized */ public static Object getAttribute(final String key) { assertInitialized(); return getAppFramework().getAttribute(key); }
/** * Register with the framework to connect any context change listeners. */ public PluginStatus() { FrameworkUtil.getAppFramework().registerObject(this); }
/** * Returns a reference to the attribute map used to store persistent references to arbitrary * objects. * * @return Attribute map */ public static Map<String, Object> getAttributes() { return isInitialized() ? getAppFramework().getAttributes() : null; }
/** * Stores an arbitrary named attribute in the attribute cache. * * @param key Attribute name. * @param value Attribute value. If null, value is removed from cache. * @throws IllegalStateException if AppFramework is not initialized */ public static void setAttribute(String key, Object value) { assertInitialized(); getAppFramework().setAttribute(key, value); }
/** * Sets the default layout scope. * * @param isShared If true, the default scope is shared. If false, it is private. */ public static void defaultIsShared(boolean isShared) { FrameworkUtil.setAttribute(ATTR_DEFAULT_SCOPE, isShared ? true : null); }
/** * Returns true if the application framework has been initialized. * * @return boolean whether AppFramework has been initialized */ public static boolean isInitialized() { return getAppFramework() != null; }
/** * Sets the path of the resource containing the plugin definition. This is used to locate the * manifest entry from which version and source information can be extracted. * * @param path Path of the resource containing this plugin definition. */ public void setPath(String path) { if (path != null) { manifest = ManifestIterator.getInstance().findByPath(path); } }
/** * Returns the application name for this instance of the CareWeb shell. * * @return Application name, or null if not set. */ public static String getApplicationName() { return FrameworkUtil.getAppName(); }
/** * Creates composite exception message */ @Override public String getMessage() { return getMessage(false); }
/** * <b>IAppContextFinder.getAppContext</b>: Returns the application context for the current * scope. */ @Override public ApplicationContext getAppContext() { return appFramework.getApplicationContext(); }
/** * Returns a stopwatch instance initialized with the specified tag and data. * * @param tag Tag to identify the interval being timed. * @param data Arbitrary metadata. * @return An initialized stopwatch instance. Will be null if the factory has not been * initialized. */ public static IStopWatch create(String tag, Map<String, Object> data) { IStopWatch sw = create(); sw.init(tag, data); return sw; } }
/** * Returns the primary manifest for the application, if any. * * @return The primary manifest, or null if not found. */ public Manifest getPrimaryManifest() { init(); return primaryManifest; }
/** * Registers the patient context change listener. */ private void registerListener() { FrameworkUtil.getAppFramework().registerObject(contextListener); }
/** * Returns a reference to the attribute map used to store persistent references to arbitrary * objects. * * @return Attribute map */ public static Map<String, Object> getAttributes() { return isInitialized() ? getAppFramework().getAttributes() : null; }
/** * Retrieves the value of a named attribute from the attribute cache. * * @param key Attribute name * @return Attribute value. * @throws IllegalStateException if AppFramework is not initialized */ public static Object getAttribute(String key) { assertInitialized(); return getAppFramework().getAttribute(key); }
/** * Stores an arbitrary named attribute in the attribute cache. * * @param key Attribute name. * @param value Attribute value. If null, value is removed from cache. * @throws IllegalStateException if AppFramework is not initialized */ public static void setAttribute(final String key, final Object value) { assertInitialized(); getAppFramework().setAttribute(key, value); }
/** * Returns true if the application framework has been initialized. * * @return boolean whether AppFramework has been initialized */ public static boolean isInitialized() { return getAppFramework() != null; }
/** * Creates composite exception message */ @Override public String getLocalizedMessage() { return getMessage(true); }
/** * Creates composite exception message */ @Override public String getMessage() { return getMessage(false); }
/** * Creates composite exception message */ @Override public String getLocalizedMessage() { return getMessage(true); }