ARoad0.gBaseBeanInfo
Class ResourceImplBeanInfo

java.lang.Object
  extended by java.beans.SimpleBeanInfo
      extended by ARoad0.gBaseBeanInfo.BasicImplBeanInfo
          extended by ARoad0.gBaseBeanInfo.ResourceImplBeanInfo
All Implemented Interfaces:
BeanInfoPattern, java.beans.BeanInfo
Direct Known Subclasses:
ActorImplBeanInfo, BasesSetMySQLImplBeanInfo, DirectoryImplBeanInfo, ResourceMySQLImplBeanInfo, ResourceUbuntuImplBeanInfo

public class ResourceImplBeanInfo
extends BasicImplBeanInfo
implements BeanInfoPattern

This class is responsible for describing the ResourceImpl class. It is used for displaying and editing the properties of ResourceImpl, to create it and to copy it. This is the reference class for BeanInfo descriptions.


Field Summary
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
ResourceImplBeanInfo()
           
 
Method Summary
 java.lang.String getBaseBeanManagerBoundProperty()
          Get the property name for which a change fires an PropertyChangeEvent in the BaseBeanManager, when the bean instance is closed or deleted.
 java.lang.reflect.Method getBaseBeanManagerGetMethod()
          Get the bean method, without parameters, that allows to get the BaseBeanManager instance, if it exists, which fires an event when the bean instance is closed or deleted.
 BaseBeanManager getBaseBeanManagerInstance()
          Get the instance, if it exists, which fires an event when the bean is closed or deleted.
 java.beans.BeanDescriptor getBeanDescriptor()
          Gets the description of the bean.
protected  java.beans.BeanDescriptor getCommonBeanDescriptor(java.beans.BeanDescriptor _result)
          Get the common description of the bean.
 java.beans.PropertyDescriptor[] getPropertyDescriptors()
          Each property descriptor has specific values that are get with PropertyDescriptor.getValue().
 
Methods inherited from class java.beans.SimpleBeanInfo
getAdditionalBeanInfo, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, loadImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.BeanInfo
getAdditionalBeanInfo, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors
 

Constructor Detail

ResourceImplBeanInfo

public ResourceImplBeanInfo()
Method Detail

getBeanDescriptor

public java.beans.BeanDescriptor getBeanDescriptor()
Gets the description of the bean. The properties to handle in the GUI are set in the descriptor. They are get through BeanDescriptor.getValue().

Specified by:
getBeanDescriptor in interface java.beans.BeanInfo
Overrides:
getBeanDescriptor in class BasicImplBeanInfo
Returns:
the bean descriptor

getCommonBeanDescriptor

protected java.beans.BeanDescriptor getCommonBeanDescriptor(java.beans.BeanDescriptor _result)
Get the common description of the bean. The bean descriptor stores some values :

- 'withTabbedPanes' is true when several tabbed panes are necessary to display all the panels (property, value),

- 'withDeleteMethod' is true to display the 'delete' button in the beamer,

- 'commonBeanClass' is the class which has the bean info defining getCommonBeanDescriptor(), and then which is the class or the superclass of the bean,

- 'constrArgumentClasses' is the list of argument classes for the class constructor,

- 'constrArgumentPropertyNames' is the list of property names for the class constructor,

- 'constrArgumentConcatenedNameSource' indicates, when an argument is entered by the user as a relative name which has then to be concatenate to another constructor argument, what is this another argument which provides the first part of the name if it is not null. The relative name is an ImmutableName or a String,

- 'constrNullArgumentPossible' indicates if an argument may be null in the constructor,

- 'constrOptionalArgument' indicates if an argument must not be used in the call to the constructor when it is null,

- 'constrRestrictedArgument' indicates if an argument is restricted to some specified values, which are strings or BaseObject names. Is optional. If it is true, the array of restricted values for an argument is searched through BaseUtilityImpl.getRestrictedValues(): 1/ in 3 ACS maps which define the constraints from the ACS, and then "constrArgumentPropertyNames" must contain the property descriptor name; 2/ in the value "staticSetOfItems" of the property in this BeanInfo,

- 'constrNonVisibleArgument' indicates if an argument is masqued in the constructor window and sets to null in the constructor; true when the ACS does not manage the property, and then, this value gets the name of the ACS method which returns a boolean 'false' when the argument has to be null and to be not displayed; if the returned value is 'true', the argument is displayed as usual; for each non null value, "constrNullArgumentPossible" has to be Boolean.TRUE, "constrOptionalArgument" has to be Boolean.FALSE.

There is two property descriptors for the property 'AcsControllers'. The first one is for the ACL tabbed pane, and the second one is for the Privileges tabbed pane. In most of the cases, a Resource has not both AclEntries and Linked Privileges, and the BeamerManager does not display the two descriptors. In the rare cases where there are both managed, the Resource ACS forbids to have both external AclEntries and external Linked Privileges. The property 'AcsControllers' is then filled up by one of the two types of external objects.

Used by the subclasses.

Overrides:
getCommonBeanDescriptor in class BasicImplBeanInfo
Parameters:
_result - is the BeanDescriptor to configure
Returns:
the bean descriptor

getPropertyDescriptors

public java.beans.PropertyDescriptor[] getPropertyDescriptors()
Each property descriptor has specific values that are get with PropertyDescriptor.getValue(). To read a property, use the read method in the prooperty descriptor.

To update a property, there are 3 means, in this order:

- if it is not a single value, use the "choiceMethodForNew" value to add one value

- or, if it is not a single value, use the "addMethod" value to add one value and "removeMethod", for BaseObjects only,

- or, in any cases, use the write method in the property descriptor

Specified by:
getPropertyDescriptors in interface java.beans.BeanInfo
Overrides:
getPropertyDescriptors in class BasicImplBeanInfo
Returns:
array of property descriptors

getBaseBeanManagerInstance

public BaseBeanManager getBaseBeanManagerInstance()
Get the instance, if it exists, which fires an event when the bean is closed or deleted.

Specified by:
getBaseBeanManagerInstance in interface BeanInfoPattern
Overrides:
getBaseBeanManagerInstance in class BasicImplBeanInfo
Returns:
null.

getBaseBeanManagerGetMethod

public java.lang.reflect.Method getBaseBeanManagerGetMethod()
Get the bean method, without parameters, that allows to get the BaseBeanManager instance, if it exists, which fires an event when the bean instance is closed or deleted.

Specified by:
getBaseBeanManagerGetMethod in interface BeanInfoPattern
Overrides:
getBaseBeanManagerGetMethod in class BasicImplBeanInfo
Returns:
the get method. Is null when there is an active BeanInfoPattern.getBaseBeanManagerInstance(), or when it is not applicable.

getBaseBeanManagerBoundProperty

public java.lang.String getBaseBeanManagerBoundProperty()
Get the property name for which a change fires an PropertyChangeEvent in the BaseBeanManager, when the bean instance is closed or deleted. This is used to register the BeamerManager as a PropertyChangeListener.

Specified by:
getBaseBeanManagerBoundProperty in interface BeanInfoPattern
Overrides:
getBaseBeanManagerBoundProperty in class BasicImplBeanInfo
Returns:
the property name.