com.ibm.j2ca.extension.emd.discovery.properties
Class WBIMultiValuedPropertyImpl

java.lang.Object
  extended bycom.ibm.j2ca.extension.emd.discovery.properties.WBIPropertyDescriptorImpl
      extended bycom.ibm.j2ca.extension.emd.discovery.properties.WBIPropertyImpl
          extended bycom.ibm.j2ca.extension.emd.discovery.properties.WBISingleTypedPropertyImpl
              extended bycom.ibm.j2ca.extension.emd.discovery.properties.WBIMultiValuedPropertyImpl
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, IVetoableChangeListenerImpl, commonj.connector.metadata.discovery.properties.MultiValuedProperty, commonj.connector.metadata.discovery.properties.Property, commonj.connector.metadata.discovery.properties.PropertyChangeListener, commonj.connector.metadata.discovery.properties.PropertyDescriptor, commonj.connector.metadata.discovery.properties.SingleTypedProperty

public class WBIMultiValuedPropertyImpl
extends WBISingleTypedPropertyImpl
implements commonj.connector.metadata.discovery.properties.MultiValuedProperty

BaseMultiValuedProperty: A base implementation of a property that contains multiple values.


Field Summary
protected  java.util.List values
          The internal list that keeps track of all the set values.
 
Fields inherited from class com.ibm.j2ca.extension.emd.discovery.properties.WBISingleTypedPropertyImpl
propertyType
 
Fields inherited from class com.ibm.j2ca.extension.emd.discovery.properties.WBIPropertyImpl
set, valid, validationMessage
 
Fields inherited from class com.ibm.j2ca.extension.emd.discovery.properties.WBIPropertyDescriptorImpl
enabled, propertyChanges, surrogateList, vetoableChanges
 
Constructor Summary
WBIMultiValuedPropertyImpl(java.lang.String propertyName, java.lang.Class propertyType)
          Constructor for BaseMultiValuedProperty.
 
Method Summary
 void addValue(java.lang.Object value)
           
 void addValue(java.lang.Object value, int index)
           
 void addValueAsString(java.lang.String value)
           
 void addValueAsString(java.lang.String value, int index)
           
 java.lang.Object clone()
           
 java.lang.Object get(int index)
           
 java.lang.Object[] getValues()
           
 java.lang.String[] getValuesAsStrings()
           
 java.lang.Object removeValue(int index)
           
 boolean removeValue(java.lang.Object value)
           
 boolean removeValueAsString(java.lang.String value)
           
 void setDuplicates(boolean duplicates)
          Set to true if duplicate values must be allowed in multi property selection.
 void unSet()
           
 void vetoableChange(commonj.connector.metadata.discovery.properties.PropertyEvent evt)
           
 
Methods inherited from class com.ibm.j2ca.extension.emd.discovery.properties.WBISingleTypedPropertyImpl
getPropertyType, setDefaultValue, setDefaultValueDerived, setExpert, setHidden, setReadOnly, setRequired, setSensitive, setValidValues, setValidValuesEditable
 
Methods inherited from class com.ibm.j2ca.extension.emd.discovery.properties.WBIPropertyImpl
getValidationMessage, isSet, isValid, setSet, setValid, setValidNoNotify
 
Methods inherited from class com.ibm.j2ca.extension.emd.discovery.properties.WBIPropertyDescriptorImpl
addPropertyChangeListener, addVetoablePropertyChangeListener, getDescription, getDisplayName, getName, isEnabled, propertyChange, removePropertyChangeListener, removeVetoablePropertyChangeListener, setDescription, setDisplayName, setEnabled, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface commonj.connector.metadata.discovery.properties.SingleTypedProperty
getPropertyType
 
Methods inherited from interface commonj.connector.metadata.discovery.properties.Property
getValidationMessage, isSet, isValid
 
Methods inherited from interface commonj.connector.metadata.discovery.properties.PropertyDescriptor
addPropertyChangeListener, getDescription, getDisplayName, getName, isEnabled, removePropertyChangeListener
 

Field Detail

values

protected java.util.List values
The internal list that keeps track of all the set values.

Constructor Detail

WBIMultiValuedPropertyImpl

public WBIMultiValuedPropertyImpl(java.lang.String propertyName,
                                  java.lang.Class propertyType)
                           throws commonj.connector.metadata.MetadataException
Constructor for BaseMultiValuedProperty.

Parameters:
propertyName - - The name of the property.
propertyType - - the Java type of the property.
Method Detail

vetoableChange

public void vetoableChange(commonj.connector.metadata.discovery.properties.PropertyEvent evt)
                    throws WBIPropertyVetoException
Specified by:
vetoableChange in interface IVetoableChangeListenerImpl
Throws:
WBIPropertyVetoException

setDuplicates

public void setDuplicates(boolean duplicates)
Set to true if duplicate values must be allowed in multi property selection.

Parameters:
duplicates -

addValue

public void addValue(java.lang.Object value)
              throws commonj.connector.metadata.MetadataException
Specified by:
addValue in interface commonj.connector.metadata.discovery.properties.MultiValuedProperty
Throws:
commonj.connector.metadata.MetadataException
See Also:
com.ibm.propertygroup.api.IMultiValuedProperty#addValue(Object)

addValue

public void addValue(java.lang.Object value,
                     int index)
              throws commonj.connector.metadata.MetadataException,
                     java.lang.IndexOutOfBoundsException
Specified by:
addValue in interface commonj.connector.metadata.discovery.properties.MultiValuedProperty
Throws:
commonj.connector.metadata.MetadataException
java.lang.IndexOutOfBoundsException

addValueAsString

public void addValueAsString(java.lang.String value)
                      throws commonj.connector.metadata.MetadataException
Specified by:
addValueAsString in interface commonj.connector.metadata.discovery.properties.MultiValuedProperty
Throws:
commonj.connector.metadata.MetadataException
See Also:
com.ibm.propertygroup.api.IMultiValuedProperty#addValueAsString(java.lang.String)

addValueAsString

public void addValueAsString(java.lang.String value,
                             int index)
                      throws commonj.connector.metadata.MetadataException,
                             java.lang.IndexOutOfBoundsException
Specified by:
addValueAsString in interface commonj.connector.metadata.discovery.properties.MultiValuedProperty
Throws:
commonj.connector.metadata.MetadataException
java.lang.IndexOutOfBoundsException
See Also:
com.ibm.propertygroup.api.IMultiValuedProperty#addValueAsString(java.lang.String, int)

clone

public java.lang.Object clone()
Specified by:
clone in interface commonj.connector.metadata.discovery.properties.PropertyDescriptor
Overrides:
clone in class WBISingleTypedPropertyImpl
See Also:
Object.clone()

get

public java.lang.Object get(int index)
                     throws java.lang.IndexOutOfBoundsException
Specified by:
get in interface commonj.connector.metadata.discovery.properties.MultiValuedProperty
Throws:
java.lang.IndexOutOfBoundsException
See Also:
com.ibm.propertygroup.api.IMultiValuedProperty#get(int)

getValues

public java.lang.Object[] getValues()
Specified by:
getValues in interface commonj.connector.metadata.discovery.properties.MultiValuedProperty
See Also:
com.ibm.propertygroup.api.IMultiValuedProperty#getValues()

getValuesAsStrings

public java.lang.String[] getValuesAsStrings()
Specified by:
getValuesAsStrings in interface commonj.connector.metadata.discovery.properties.MultiValuedProperty
See Also:
com.ibm.propertygroup.api.IMultiValuedProperty#getValuesAsStrings()

removeValue

public java.lang.Object removeValue(int index)
Specified by:
removeValue in interface commonj.connector.metadata.discovery.properties.MultiValuedProperty
See Also:
com.ibm.propertygroup.api.IMultiValuedProperty#removeValue(int)

removeValue

public boolean removeValue(java.lang.Object value)
Specified by:
removeValue in interface commonj.connector.metadata.discovery.properties.MultiValuedProperty
See Also:
com.ibm.propertygroup.api.IMultiValuedProperty#removeValue(Object)

removeValueAsString

public boolean removeValueAsString(java.lang.String value)
Specified by:
removeValueAsString in interface commonj.connector.metadata.discovery.properties.MultiValuedProperty
See Also:
com.ibm.propertygroup.api.IMultiValuedProperty#removeValueAsString(java.lang.String)

unSet

public void unSet()
Specified by:
unSet in interface commonj.connector.metadata.discovery.properties.Property