Dashboard Builder Commons 6.0.0.Beta1

org.jboss.dashboard.factory
Class Component

java.lang.Object
  extended by org.jboss.dashboard.factory.Component

public class Component
extends Object

This class holds all the properties regarding a Factory bean definition. Such definition is usually implemented by means of a .properties file inside the etc/factory directory..


Field Summary
static String ALIAS_PROPERTY
           
static String CLASS_PROPERTY
           
static String DESC_PROPERTY
           
static String ENABLED_PROPERTY
           
static String SCOPE_GLOBAL
           
static String SCOPE_PANEL_SESSION
           
static String SCOPE_PROPERTY
           
static String SCOPE_REQUEST
           
static String SCOPE_SESSION
           
static String SCOPE_VOLATILE
           
static String SPECIAL_PROPERTY_PREFFIX
           
static int STATUS_INCOMPLETE
           
static int STATUS_INVALID
           
static int STATUS_VALID
           
 List VALID_SCOPES
           
 
Constructor Summary
Component(String name, ComponentsTree tree)
           
 
Method Summary
 String getAlias()
           
 String getClazz()
           
 Map getComponentConfiguredProperties()
           
 long getCreationOrderNumber()
           
 String getDescription()
           
protected  Field getField(Object obj, String propertyName)
           
protected  Method getGetter(Object obj, String propertyName)
           
protected  List getInitScopes()
           
 String getName()
           
 Object getObject()
           
 List getPropertiesFilesAdded()
           
 String getScope()
           
protected  Method getSetter(Object obj, Method getter, String propertyName)
           
 int getStatus()
           
protected  Object getTheInstance()
           
 ComponentsTree getTree()
           
protected  Object getValueForProperty(List values, Class expectedClass)
           
protected  boolean isValidPropertyName(String propertyName)
          Determine if the property name is a valid property identifier
protected  Object makeAndSetNewInstance()
           
 void setCreationOrderNumber(long creationOrderNumber)
           
protected  Object setObjectProperty(Object obj, String propertyName, List propertyValue, org.apache.commons.jxpath.JXPathContext ctx)
           
 void setProperty(String propertyName, File propertyValue)
           
 void setProperty(String propertyName, String[] propertyValues)
          Writes a property value to the component
protected  void setTheInstance(Object instance)
           
protected  void storeProperty(String propertyName, String propertyValue)
          Store in componentProperties the property given by name and value.
 String toString()
           
 void validate()
          Update the status attribute to reflect the component status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALIAS_PROPERTY

public static final String ALIAS_PROPERTY
See Also:
Constant Field Values

CLASS_PROPERTY

public static final String CLASS_PROPERTY
See Also:
Constant Field Values

SCOPE_PROPERTY

public static final String SCOPE_PROPERTY
See Also:
Constant Field Values

DESC_PROPERTY

public static final String DESC_PROPERTY
See Also:
Constant Field Values

ENABLED_PROPERTY

public static final String ENABLED_PROPERTY
See Also:
Constant Field Values

SPECIAL_PROPERTY_PREFFIX

public static final String SPECIAL_PROPERTY_PREFFIX
See Also:
Constant Field Values

SCOPE_GLOBAL

public static final String SCOPE_GLOBAL
See Also:
Constant Field Values

SCOPE_SESSION

public static final String SCOPE_SESSION
See Also:
Constant Field Values

SCOPE_PANEL_SESSION

public static final String SCOPE_PANEL_SESSION
See Also:
Constant Field Values

SCOPE_REQUEST

public static final String SCOPE_REQUEST
See Also:
Constant Field Values

SCOPE_VOLATILE

public static final String SCOPE_VOLATILE
See Also:
Constant Field Values

VALID_SCOPES

public final List VALID_SCOPES

STATUS_INCOMPLETE

public static final int STATUS_INCOMPLETE
See Also:
Constant Field Values

STATUS_VALID

public static final int STATUS_VALID
See Also:
Constant Field Values

STATUS_INVALID

public static final int STATUS_INVALID
See Also:
Constant Field Values
Constructor Detail

Component

public Component(String name,
                 ComponentsTree tree)
Method Detail

getCreationOrderNumber

public long getCreationOrderNumber()

setCreationOrderNumber

public void setCreationOrderNumber(long creationOrderNumber)

getTree

public ComponentsTree getTree()

getInitScopes

protected List getInitScopes()

getComponentConfiguredProperties

public Map getComponentConfiguredProperties()

isValidPropertyName

protected boolean isValidPropertyName(String propertyName)
Determine if the property name is a valid property identifier

Parameters:
propertyName - Property name to evaluate
Returns:
true if the property name is a valid property identifier

storeProperty

protected void storeProperty(String propertyName,
                             String propertyValue)
Store in componentProperties the property given by name and value.

Parameters:
propertyName -
propertyValue -

setProperty

public void setProperty(String propertyName,
                        String[] propertyValues)
                 throws Exception
Writes a property value to the component

Parameters:
propertyName -
propertyValues -
Throws:
Exception

setProperty

public void setProperty(String propertyName,
                        File propertyValue)
                 throws Exception
Throws:
Exception

getName

public String getName()

getClazz

public String getClazz()

getScope

public String getScope()

getAlias

public String getAlias()

getDescription

public String getDescription()

getPropertiesFilesAdded

public List getPropertiesFilesAdded()

toString

public String toString()
Overrides:
toString in class Object

validate

public void validate()
Update the status attribute to reflect the component status


getStatus

public int getStatus()

getObject

public Object getObject()
                 throws LookupException
Returns:
The object represented in this component.
Throws:
LookupException

getTheInstance

protected final Object getTheInstance()
                               throws LookupException
Throws:
LookupException

setTheInstance

protected final void setTheInstance(Object instance)

makeAndSetNewInstance

protected Object makeAndSetNewInstance()

setObjectProperty

protected Object setObjectProperty(Object obj,
                                   String propertyName,
                                   List propertyValue,
                                   org.apache.commons.jxpath.JXPathContext ctx)
                            throws Exception
Throws:
Exception

getField

protected Field getField(Object obj,
                         String propertyName)

getGetter

protected Method getGetter(Object obj,
                           String propertyName)

getSetter

protected Method getSetter(Object obj,
                           Method getter,
                           String propertyName)

getValueForProperty

protected Object getValueForProperty(List values,
                                     Class expectedClass)
                              throws Exception
Throws:
Exception

Dashboard Builder Commons 6.0.0.Beta1

Copyright © 2012-2013 JBoss by Red Hat. All Rights Reserved.