|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ViewContext
Context object available to the view components to provide access to the view and instance attributes as well as run time information about the current execution context.
| Field Summary | |
|---|---|
static String |
CONTEXT_ATTRIBUTE
Key for mapping a view context as a property. |
| Method Summary | |
|---|---|
String |
getAmbariProperty(String key)
Get a property for the given key from the ambari configuration. |
ViewController |
getController()
Get a view controller associated with this context. |
DataStore |
getDataStore()
Get a data store for view persistence entities. |
HttpImpersonator |
getHttpImpersonator()
Get the HTTP Impersonator. |
ImpersonatorSetting |
getImpersonatorSetting()
Get the default settings for the Impersonator. |
Map<String,String> |
getInstanceData()
Get the instance data values. |
String |
getInstanceData(String key)
Get the instance data value for the given key. |
String |
getInstanceName()
Get the view instance name. |
Map<String,String> |
getProperties()
Get the property values specified to create the view instance. |
ResourceProvider<?> |
getResourceProvider(String type)
Get the view resource provider for the given resource type. |
URLStreamProvider |
getURLStreamProvider()
Get a URL stream provider. |
String |
getUsername()
Get the current user name. |
ViewDefinition |
getViewDefinition()
Get the view definition associated with this context. |
Collection<ViewDefinition> |
getViewDefinitions()
Get all of the available view definitions. |
ViewInstanceDefinition |
getViewInstanceDefinition()
Get the view instance definition associated with this context. |
Collection<ViewInstanceDefinition> |
getViewInstanceDefinitions()
Get all of the available view instance definitions. |
String |
getViewName()
Get the view name. |
void |
hasPermission(String userName,
String permissionName)
Determine whether or not the access specified by the given permission name is permitted for the given user. |
void |
putInstanceData(String key,
String value)
Save an instance data value for the given key. |
void |
removeInstanceData(String key)
Remove the instance data value for the given key. |
| Field Detail |
|---|
static final String CONTEXT_ATTRIBUTE
| Method Detail |
|---|
String getUsername()
void hasPermission(String userName,
String permissionName)
throws SecurityException
userName - the user namepermissionName - the permission name
SecurityException - if the access specified by the given permission name
is not permittedString getViewName()
ViewDefinition getViewDefinition()
String getInstanceName()
ViewInstanceDefinition getViewInstanceDefinition()
Map<String,String> getProperties()
void putInstanceData(String key,
String value)
key - the keyvalue - the value
IllegalStateException - if no instance is associatedString getInstanceData(String key)
key - the key
Map<String,String> getInstanceData()
void removeInstanceData(String key)
key - the key
IllegalStateException - if no instance is associatedString getAmbariProperty(String key)
key - the property key
ResourceProvider<?> getResourceProvider(String type)
type - the resource type
URLStreamProvider getURLStreamProvider()
DataStore getDataStore()
Collection<ViewDefinition> getViewDefinitions()
Collection<ViewInstanceDefinition> getViewInstanceDefinitions()
ViewController getController()
HttpImpersonator getHttpImpersonator()
ImpersonatorSetting getImpersonatorSetting()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||