org.rhq.bindings
Class StandardBindings

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Object>
          extended by org.rhq.bindings.StandardBindings
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class StandardBindings
extends HashMap<String,Object>

This class encapsulates the standard set of data inserted in the ScriptContext.ENGINE_SCOPE of the script engines.

Upon instantiation this class has all the properties initialized with the default values so that a common base is available for all the users of this class. The user is however able to later modify these defaults to provide use-case specific overrides (for example the CLI might want to supply impls that hook into the console to provide interactivity with user in some workflows, which, generically, is not possible in a common case).

Author:
Lukas Krejci
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
static String ASSERT
           
static String EXPORTER
           
static String PAGE_CONTROL
           
static String PRETTY
           
static String PROXY_FACTORY
           
static String SCRIPT_UTIL
           
static String SUBJECT
           
static String UNLIMITED_PC
           
 
Constructor Summary
StandardBindings(PrintWriter output, RhqFacade rhqFacade)
           
 
Method Summary
 Map.Entry<String,Exporter> getExporter()
           
 Map<String,Object> getManagers()
           
 Map.Entry<String,org.rhq.core.domain.util.PageControl> getPageControl()
           
 Map.Entry<String,TabularWriter> getPretty()
           
 Map.Entry<String,ResourceClientFactory> getProxyFactory()
           
 Map.Entry<String,ScriptUtil> getScriptUtil()
           
 Map.Entry<String,org.rhq.core.domain.auth.Subject> getSubject()
           
 Map.Entry<String,org.rhq.core.domain.util.PageControl> getUnlimitedPC()
           
 void postInject(ScriptEngine scriptEngine)
           
 void preInject(ScriptEngine scriptEngine)
           
 void setFacade(PrintWriter output, RhqFacade rhqFacade)
          If you want to preserve non-client-dependent bindings when the facade changes, call this as opposed to constructing new StandardBindings.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

UNLIMITED_PC

public static final String UNLIMITED_PC
See Also:
Constant Field Values

PAGE_CONTROL

public static final String PAGE_CONTROL
See Also:
Constant Field Values

EXPORTER

public static final String EXPORTER
See Also:
Constant Field Values

SUBJECT

public static final String SUBJECT
See Also:
Constant Field Values

PRETTY

public static final String PRETTY
See Also:
Constant Field Values

SCRIPT_UTIL

public static final String SCRIPT_UTIL
See Also:
Constant Field Values

PROXY_FACTORY

public static final String PROXY_FACTORY
See Also:
Constant Field Values

ASSERT

public static final String ASSERT
See Also:
Constant Field Values
Constructor Detail

StandardBindings

public StandardBindings(PrintWriter output,
                        RhqFacade rhqFacade)
Method Detail

setFacade

public void setFacade(PrintWriter output,
                      RhqFacade rhqFacade)
If you want to preserve non-client-dependent bindings when the facade changes, call this as opposed to constructing new StandardBindings.


preInject

public void preInject(ScriptEngine scriptEngine)

postInject

public void postInject(ScriptEngine scriptEngine)

getUnlimitedPC

public Map.Entry<String,org.rhq.core.domain.util.PageControl> getUnlimitedPC()

getPageControl

public Map.Entry<String,org.rhq.core.domain.util.PageControl> getPageControl()

getExporter

public Map.Entry<String,Exporter> getExporter()

getSubject

public Map.Entry<String,org.rhq.core.domain.auth.Subject> getSubject()

getPretty

public Map.Entry<String,TabularWriter> getPretty()

getScriptUtil

public Map.Entry<String,ScriptUtil> getScriptUtil()

getProxyFactory

public Map.Entry<String,ResourceClientFactory> getProxyFactory()

getManagers

public Map<String,Object> getManagers()


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.