org.rhq.enterprise.gui.configuration.resource
Class ResourceConfigurationViewer

java.lang.Object
  extended by org.rhq.enterprise.gui.configuration.resource.ResourceConfigurationViewer
Direct Known Subclasses:
ResourceConfigurationEditor

@Name(value="configurationViewer")
@Scope(value=PAGE)
public class ResourceConfigurationViewer
extends Object


Field Summary
protected  boolean initialized
           
protected  WebUser loggedInUser
           
static boolean RAW_MODE
           
protected  Collection<RawConfigDirectory> rawConfigDirectories
           
protected  org.rhq.core.domain.configuration.Configuration resourceConfiguration
           
protected  org.rhq.core.domain.configuration.definition.ConfigurationDefinition resourceConfigurationDefinition
           
protected  Integer resourceId
           
protected  RawConfigUIBean selectedRawUIBean
           
static boolean STRUCTURED_MODE
           
 
Constructor Summary
ResourceConfigurationViewer()
           
 
Method Summary
 void changeTabs(javax.faces.event.ValueChangeEvent event)
           
protected  void changeToRawTab()
           
protected  void changeToStructuredTab()
           
protected  void doInitialization()
           
 String download()
           
protected  RawConfigUIBean findRawConfigUIBeanByPath(String path)
           
 String getModalEditorContents()
           
 String getModalEditorHeader()
           
 boolean getRenderModalEditor()
           
 String getSelectedTab()
           
 void initialize()
           This method "bootstraps" the viewer/editor and the model objects used in the view.
protected  void initRawConfigDirectories()
           
 boolean isInitialized()
           
 boolean isRawMode()
           
 boolean isRawSupported()
           
 boolean isStructuredAndRawSupported()
           
 boolean isStructuredMode()
           
 boolean isStructuredSupported()
           
 boolean isUpdateInProgress()
           
 void select(String path)
           
 void setSelectedTab(String tab)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRUCTURED_MODE

public static final boolean STRUCTURED_MODE
See Also:
Constant Field Values

RAW_MODE

public static final boolean RAW_MODE
See Also:
Constant Field Values

loggedInUser

@In(value="webUser")
protected WebUser loggedInUser

resourceConfiguration

@Out(required=false)
protected org.rhq.core.domain.configuration.Configuration resourceConfiguration

resourceConfigurationDefinition

@Out(required=false)
protected org.rhq.core.domain.configuration.definition.ConfigurationDefinition resourceConfigurationDefinition

rawConfigDirectories

@Out(required=false)
protected Collection<RawConfigDirectory> rawConfigDirectories

selectedRawUIBean

@Out(required=false)
protected RawConfigUIBean selectedRawUIBean

resourceId

protected Integer resourceId

initialized

protected boolean initialized
Constructor Detail

ResourceConfigurationViewer

public ResourceConfigurationViewer()
Method Detail

initialize

public void initialize()

This method "bootstraps" the viewer/editor and the model objects used in the view. Specifically, the resource configuration and the corresponding configuration definition are loaded from the database and are outjected for use in the view.

If the configuration definition or if the configuration fail to load for whatever reason, the initialized flag is set to false. When the configuration definition is null a message is added to the Faces context indicating that the resource does not expose a configuration. When the configuration is null, a message is added to the Faces context indicating that the resource configuration has not been initialized.


doInitialization

protected void doInitialization()

initRawConfigDirectories

protected void initRawConfigDirectories()

isInitialized

public boolean isInitialized()

isRawSupported

public boolean isRawSupported()
Returns:
true if the resource configuration supports raw only, false otherwise

isStructuredSupported

public boolean isStructuredSupported()
Returns:
true if the resource configuration supports structured only, false otherwise

isStructuredMode

public boolean isStructuredMode()

isRawMode

public boolean isRawMode()

getRenderModalEditor

public boolean getRenderModalEditor()

isStructuredAndRawSupported

public boolean isStructuredAndRawSupported()
Returns:
true if the resource configuration supports structured and raw, false otherwise

getSelectedTab

public String getSelectedTab()
Returns:
The currently selected tab, structured (i.e., Basic Mode) or raw (i.e., Advanced Mode).

setSelectedTab

public void setSelectedTab(String tab)

changeTabs

public void changeTabs(javax.faces.event.ValueChangeEvent event)

changeToRawTab

protected void changeToRawTab()

changeToStructuredTab

protected void changeToStructuredTab()

select

public void select(String path)

findRawConfigUIBeanByPath

protected RawConfigUIBean findRawConfigUIBeanByPath(String path)

isUpdateInProgress

public boolean isUpdateInProgress()

download

public String download()

getModalEditorHeader

public String getModalEditorHeader()

getModalEditorContents

public String getModalEditorContents()


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